From 80924d0c0daae6f0a87850b0c546bdca39e58936 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Fri, 5 Apr 2019 04:48:55 -0700 Subject: [PATCH] Regenerate compute client (#4909) --- .../compute/v1/AcceleratorTypeClient.java | 32 +- .../cloud/compute/v1/AddressClient.java | 48 +- ...dListNetworkEndpointGroupsHttpRequest.java | 684 +++++++ ...pointsNetworkEndpointGroupHttpRequest.java | 559 ++++++ .../cloud/compute/v1/AutoscalerClient.java | 64 +- .../com/google/cloud/compute/v1/Backend.java | 109 ++ .../cloud/compute/v1/BackendBucketClient.java | 68 +- .../compute/v1/BackendServiceClient.java | 96 +- .../compute/v1/BackendServiceReference.java | 148 ++ .../com/google/cloud/compute/v1/Binding.java | 18 +- ...DeleteNetworkEndpointGroupHttpRequest.java | 509 +++++ .../cloud/compute/v1/DeprecationStatus.java | 6 +- ...pointsNetworkEndpointGroupHttpRequest.java | 559 ++++++ .../google/cloud/compute/v1/DiskClient.java | 96 +- .../cloud/compute/v1/DiskTypeClient.java | 32 +- .../cloud/compute/v1/FirewallClient.java | 52 +- .../compute/v1/ForwardingRuleClient.java | 56 +- .../compute/v1/ForwardingRuleReference.java | 148 ++ .../GetNetworkEndpointGroupHttpRequest.java | 429 +++++ ...edInstanceIdentityInstanceHttpRequest.java | 423 +++++ .../cloud/compute/v1/GlobalAddressClient.java | 36 +- .../v1/GlobalForwardingRuleClient.java | 44 +- .../compute/v1/GlobalOperationClient.java | 40 +- .../cloud/compute/v1/HealthCheckClient.java | 52 +- .../v1/HealthStatusForNetworkEndpoint.java | 256 +++ .../cloud/compute/v1/Http2HealthCheck.java | 65 +- .../cloud/compute/v1/HttpHealthCheck.java | 65 +- .../compute/v1/HttpHealthCheckClient.java | 52 +- .../cloud/compute/v1/HttpSHealthCheck.java | 65 +- .../compute/v1/HttpsHealthCheckClient.java | 52 +- .../google/cloud/compute/v1/ImageClient.java | 84 +- ...InsertNetworkEndpointGroupHttpRequest.java | 543 ++++++ .../v1/InsertNodeGroupHttpRequest.java | 12 +- .../cloud/compute/v1/InstanceClient.java | 645 +++++-- .../cloud/compute/v1/InstanceGroupClient.java | 84 +- .../v1/InstanceGroupManagerClient.java | 112 +- .../cloud/compute/v1/InstanceProperties.java | 32 + .../cloud/compute/v1/InstanceSettings.java | 52 + .../compute/v1/InstanceTemplateClient.java | 60 +- .../v1/InterconnectAttachmentClient.java | 56 +- .../cloud/compute/v1/InterconnectClient.java | 52 +- .../v1/InterconnectLocationClient.java | 20 +- .../cloud/compute/v1/LicenseClient.java | 60 +- .../cloud/compute/v1/LicenseCodeClient.java | 16 +- .../ListNetworkEndpointGroupsHttpRequest.java | 685 +++++++ ...ointsNetworkEndpointGroupsHttpRequest.java | 736 ++++++++ .../cloud/compute/v1/MachineTypeClient.java | 32 +- .../cloud/compute/v1/NetworkClient.java | 68 +- .../cloud/compute/v1/NetworkEndpoint.java | 265 +++ .../compute/v1/NetworkEndpointGroup.java | 603 ++++++ .../NetworkEndpointGroupAggregatedList.java | 356 ++++ .../v1/NetworkEndpointGroupClient.java | 1663 +++++++++++++++++ .../compute/v1/NetworkEndpointGroupList.java | 358 ++++ .../v1/NetworkEndpointGroupSettings.java | 339 ++++ ...kEndpointGroupsAttachEndpointsRequest.java | 168 ++ ...kEndpointGroupsDetachEndpointsRequest.java | 168 ++ ...orkEndpointGroupsListEndpointsRequest.java | 164 ++ ...orkEndpointGroupsListNetworkEndpoints.java | 329 ++++ .../v1/NetworkEndpointGroupsScopedList.java | 210 +++ .../v1/NetworkEndpointWithHealthStatus.java | 201 ++ .../google/cloud/compute/v1/NodeGroup.java | 2 +- .../cloud/compute/v1/NodeGroupClient.java | 114 +- .../cloud/compute/v1/NodeTemplateClient.java | 72 +- .../cloud/compute/v1/NodeTypeClient.java | 32 +- .../cloud/compute/v1/ProjectClient.java | 112 +- .../ProjectZoneNetworkEndpointGroupName.java | 201 ++ ...tZoneNetworkEndpointGroupResourceName.java | 199 ++ .../compute/v1/RegionAutoscalerClient.java | 52 +- .../v1/RegionBackendServiceClient.java | 60 +- .../google/cloud/compute/v1/RegionClient.java | 20 +- .../compute/v1/RegionCommitmentClient.java | 40 +- .../cloud/compute/v1/RegionDiskClient.java | 68 +- .../compute/v1/RegionDiskTypeClient.java | 20 +- .../compute/v1/RegionInstanceGroupClient.java | 40 +- .../v1/RegionInstanceGroupManagerClient.java | 100 +- .../compute/v1/RegionOperationClient.java | 28 +- .../google/cloud/compute/v1/RouteClient.java | 36 +- .../google/cloud/compute/v1/RouterClient.java | 92 +- .../cloud/compute/v1/SSLHealthCheck.java | 67 +- .../compute/v1/SecurityPolicyClient.java | 76 +- ...nceIntegrityPolicyInstanceHttpRequest.java | 611 ++++++ .../com/google/cloud/compute/v1/Snapshot.java | 55 +- .../cloud/compute/v1/SnapshotClient.java | 60 +- .../compute/v1/SslCertificateClient.java | 36 +- .../cloud/compute/v1/SslPolicyClient.java | 52 +- .../cloud/compute/v1/SubnetworkClient.java | 108 +- .../cloud/compute/v1/TCPHealthCheck.java | 67 +- .../compute/v1/TargetHttpProxyClient.java | 44 +- .../compute/v1/TargetHttpsProxyClient.java | 68 +- .../compute/v1/TargetInstanceClient.java | 48 +- .../cloud/compute/v1/TargetPoolClient.java | 96 +- .../compute/v1/TargetSslProxyClient.java | 68 +- .../compute/v1/TargetTcpProxyClient.java | 52 +- .../compute/v1/TargetVpnGatewayClient.java | 48 +- ...ssionsNetworkEndpointGroupHttpRequest.java | 472 +++++ ...ldedInstanceConfigInstanceHttpRequest.java | 607 ++++++ .../google/cloud/compute/v1/UrlMapClient.java | 68 +- .../cloud/compute/v1/VpnTunnelClient.java | 48 +- .../google/cloud/compute/v1/ZoneClient.java | 20 +- .../cloud/compute/v1/ZoneOperationClient.java | 28 +- .../google/cloud/compute/v1/package-info.java | 16 + .../compute/v1/stub/HttpJsonInstanceStub.java | 136 ++ ...onNetworkEndpointGroupCallableFactory.java | 84 + .../HttpJsonNetworkEndpointGroupStub.java | 592 ++++++ .../cloud/compute/v1/stub/InstanceStub.java | 25 + .../compute/v1/stub/InstanceStubSettings.java | 115 +- .../v1/stub/NetworkEndpointGroupStub.java | 143 ++ .../NetworkEndpointGroupStubSettings.java | 860 +++++++++ .../cloud/compute/v1/InstanceClientTest.java | 254 ++- .../v1/NetworkEndpointGroupClientTest.java | 797 ++++++++ .../google-cloud-compute/synth.metadata | 8 +- 111 files changed, 18350 insertions(+), 1803 deletions(-) create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceReference.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEndpointGroupHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRuleReference.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GetNetworkEndpointGroupHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GetShieldedInstanceIdentityInstanceHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointGroupsHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAggregatedList.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupClient.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupList.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupSettings.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsAttachEndpointsRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsDetachEndpointsRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListEndpointsRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListNetworkEndpoints.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsScopedList.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointWithHealthStatus.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectZoneNetworkEndpointGroupName.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectZoneNetworkEndpointGroupResourceName.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkEndpointGroupHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UpdateShieldedInstanceConfigInstanceHttpRequest.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupCallableFactory.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupStub.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkEndpointGroupStub.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkEndpointGroupStubSettings.java create mode 100644 google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/NetworkEndpointGroupClientTest.java diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java index 58dc4d542ccf..ed3172caa2db 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java @@ -216,9 +216,9 @@ public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAccelerat * *

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (AcceleratorTypesScopedList element : acceleratorTypeClient.aggregatedListAcceleratorTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -243,9 +243,9 @@ public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAccelerat
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListAcceleratorTypesPagedResponse> future = acceleratorTypeClient.aggregatedListAcceleratorTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -270,9 +270,9 @@ public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAccelerat
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     AcceleratorTypeAggregatedList response = acceleratorTypeClient.aggregatedListAcceleratorTypesCallable().call(request);
@@ -354,9 +354,9 @@ public final AcceleratorType getAcceleratorType(String acceleratorType) {
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
-   *   ProjectZoneAcceleratorTypeName acceleratorType = ProjectZoneAcceleratorTypeName.of("[PROJECT]", "[ZONE]", "[ACCELERATOR_TYPE]");
+   *   String formattedAcceleratorType = ProjectZoneAcceleratorTypeName.format("[PROJECT]", "[ZONE]", "[ACCELERATOR_TYPE]");
    *   GetAcceleratorTypeHttpRequest request = GetAcceleratorTypeHttpRequest.newBuilder()
-   *     .setAcceleratorType(acceleratorType.toString())
+   *     .setAcceleratorType(formattedAcceleratorType)
    *     .build();
    *   AcceleratorType response = acceleratorTypeClient.getAcceleratorType(request);
    * }
@@ -378,9 +378,9 @@ public final AcceleratorType getAcceleratorType(GetAcceleratorTypeHttpRequest re
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
-   *   ProjectZoneAcceleratorTypeName acceleratorType = ProjectZoneAcceleratorTypeName.of("[PROJECT]", "[ZONE]", "[ACCELERATOR_TYPE]");
+   *   String formattedAcceleratorType = ProjectZoneAcceleratorTypeName.format("[PROJECT]", "[ZONE]", "[ACCELERATOR_TYPE]");
    *   GetAcceleratorTypeHttpRequest request = GetAcceleratorTypeHttpRequest.newBuilder()
-   *     .setAcceleratorType(acceleratorType.toString())
+   *     .setAcceleratorType(formattedAcceleratorType)
    *     .build();
    *   ApiFuture<AcceleratorType> future = acceleratorTypeClient.getAcceleratorTypeCallable().futureCall(request);
    *   // Do something
@@ -454,9 +454,9 @@ public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(String zone)
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListAcceleratorTypesHttpRequest request = ListAcceleratorTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (AcceleratorType element : acceleratorTypeClient.listAcceleratorTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -481,9 +481,9 @@ public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListAcceleratorTypesHttpRequest request = ListAcceleratorTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListAcceleratorTypesPagedResponse> future = acceleratorTypeClient.listAcceleratorTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -507,9 +507,9 @@ public final ListAcceleratorTypesPagedResponse listAcceleratorTypes(
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListAcceleratorTypesHttpRequest request = ListAcceleratorTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     AcceleratorTypeList response = acceleratorTypeClient.listAcceleratorTypesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AddressClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AddressClient.java
index 08d31b3cd55b..bc68eea23212 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AddressClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AddressClient.java
@@ -211,9 +211,9 @@ public final AggregatedListAddressesPagedResponse aggregatedListAddresses(String
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAddressesHttpRequest request = AggregatedListAddressesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (AddressesScopedList element : addressClient.aggregatedListAddresses(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -238,9 +238,9 @@ public final AggregatedListAddressesPagedResponse aggregatedListAddresses(
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAddressesHttpRequest request = AggregatedListAddressesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListAddressesPagedResponse> future = addressClient.aggregatedListAddressesPagedCallable().futureCall(request);
    *   // Do something
@@ -265,9 +265,9 @@ public final AggregatedListAddressesPagedResponse aggregatedListAddresses(
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAddressesHttpRequest request = AggregatedListAddressesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     AddressAggregatedList response = addressClient.aggregatedListAddressesCallable().call(request);
@@ -348,9 +348,9 @@ public final Operation deleteAddress(String address) {
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionAddressName address = ProjectRegionAddressName.of("[PROJECT]", "[REGION]", "[ADDRESS]");
+   *   String formattedAddress = ProjectRegionAddressName.format("[PROJECT]", "[REGION]", "[ADDRESS]");
    *   DeleteAddressHttpRequest request = DeleteAddressHttpRequest.newBuilder()
-   *     .setAddress(address.toString())
+   *     .setAddress(formattedAddress)
    *     .build();
    *   Operation response = addressClient.deleteAddress(request);
    * }
@@ -372,9 +372,9 @@ public final Operation deleteAddress(DeleteAddressHttpRequest request) {
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionAddressName address = ProjectRegionAddressName.of("[PROJECT]", "[REGION]", "[ADDRESS]");
+   *   String formattedAddress = ProjectRegionAddressName.format("[PROJECT]", "[REGION]", "[ADDRESS]");
    *   DeleteAddressHttpRequest request = DeleteAddressHttpRequest.newBuilder()
-   *     .setAddress(address.toString())
+   *     .setAddress(formattedAddress)
    *     .build();
    *   ApiFuture<Operation> future = addressClient.deleteAddressCallable().futureCall(request);
    *   // Do something
@@ -444,9 +444,9 @@ public final Address getAddress(String address) {
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionAddressName address = ProjectRegionAddressName.of("[PROJECT]", "[REGION]", "[ADDRESS]");
+   *   String formattedAddress = ProjectRegionAddressName.format("[PROJECT]", "[REGION]", "[ADDRESS]");
    *   GetAddressHttpRequest request = GetAddressHttpRequest.newBuilder()
-   *     .setAddress(address.toString())
+   *     .setAddress(formattedAddress)
    *     .build();
    *   Address response = addressClient.getAddress(request);
    * }
@@ -468,9 +468,9 @@ public final Address getAddress(GetAddressHttpRequest request) {
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionAddressName address = ProjectRegionAddressName.of("[PROJECT]", "[REGION]", "[ADDRESS]");
+   *   String formattedAddress = ProjectRegionAddressName.format("[PROJECT]", "[REGION]", "[ADDRESS]");
    *   GetAddressHttpRequest request = GetAddressHttpRequest.newBuilder()
-   *     .setAddress(address.toString())
+   *     .setAddress(formattedAddress)
    *     .build();
    *   ApiFuture<Address> future = addressClient.getAddressCallable().futureCall(request);
    *   // Do something
@@ -553,10 +553,10 @@ public final Operation insertAddress(String region, Address addressResource) {
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Address addressResource = Address.newBuilder().build();
    *   InsertAddressHttpRequest request = InsertAddressHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setAddressResource(addressResource)
    *     .build();
    *   Operation response = addressClient.insertAddress(request);
@@ -579,10 +579,10 @@ public final Operation insertAddress(InsertAddressHttpRequest request) {
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Address addressResource = Address.newBuilder().build();
    *   InsertAddressHttpRequest request = InsertAddressHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setAddressResource(addressResource)
    *     .build();
    *   ApiFuture<Operation> future = addressClient.insertAddressCallable().futureCall(request);
@@ -656,9 +656,9 @@ public final ListAddressesPagedResponse listAddresses(String region) {
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListAddressesHttpRequest request = ListAddressesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (Address element : addressClient.listAddresses(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -682,9 +682,9 @@ public final ListAddressesPagedResponse listAddresses(ListAddressesHttpRequest r
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListAddressesHttpRequest request = ListAddressesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListAddressesPagedResponse> future = addressClient.listAddressesPagedCallable().futureCall(request);
    *   // Do something
@@ -708,9 +708,9 @@ public final ListAddressesPagedResponse listAddresses(ListAddressesHttpRequest r
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListAddressesHttpRequest request = ListAddressesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     AddressList response = addressClient.listAddressesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsHttpRequest.java
new file mode 100644
index 000000000000..ad0e5c045c7c
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsHttpRequest.java
@@ -0,0 +1,684 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.networkEndpointGroups.aggregatedList. Retrieves the list of
+ * network endpoint groups and sorts them by zone.
+ */
+public final class AggregatedListNetworkEndpointGroupsHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String filter;
+  private final String key;
+  private final Integer maxResults;
+  private final String orderBy;
+  private final String pageToken;
+  private final String prettyPrint;
+  private final String project;
+  private final String quotaUser;
+  private final String userIp;
+
+  private AggregatedListNetworkEndpointGroupsHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.filter = null;
+    this.key = null;
+    this.maxResults = null;
+    this.orderBy = null;
+    this.pageToken = null;
+    this.prettyPrint = null;
+    this.project = null;
+    this.quotaUser = null;
+    this.userIp = null;
+  }
+
+  private AggregatedListNetworkEndpointGroupsHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String filter,
+      String key,
+      Integer maxResults,
+      String orderBy,
+      String pageToken,
+      String prettyPrint,
+      String project,
+      String quotaUser,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.filter = filter;
+    this.key = key;
+    this.maxResults = maxResults;
+    this.orderBy = orderBy;
+    this.pageToken = pageToken;
+    this.prettyPrint = prettyPrint;
+    this.project = project;
+    this.quotaUser = quotaUser;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("filter".equals(fieldName)) {
+      return filter;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("maxResults".equals(fieldName)) {
+      return maxResults;
+    }
+    if ("orderBy".equals(fieldName)) {
+      return orderBy;
+    }
+    if ("pageToken".equals(fieldName)) {
+      return pageToken;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("project".equals(fieldName)) {
+      return project;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /**
+   * A filter expression that filters resources listed in the response. The expression must specify
+   * the field name, a comparison operator, and the value that you want to use for filtering. The
+   * value must be a string, a number, or a boolean. The comparison operator must be either =, !=,
+   * >, or <.
+   *
+   * 

For example, if you are filtering Compute Engine instances, you can exclude instances named + * example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. For + * example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each + * expression is an AND expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND + * (scheduling.automaticRestart = true). + */ + public String getFilter() { + return filter; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order + * based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public String getOrderBy() { + return orderBy; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public String getPageToken() { + return pageToken; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** + * Project ID for this request. It must have the format + * `{project}/aggregated/networkEndpointGroups`. \`{project}\` must start with a letter, and + * contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores + * (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must + * be between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public String getProject() { + return project; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(AggregatedListNetworkEndpointGroupsHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static AggregatedListNetworkEndpointGroupsHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final AggregatedListNetworkEndpointGroupsHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new AggregatedListNetworkEndpointGroupsHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String filter; + private String key; + private Integer maxResults; + private String orderBy; + private String pageToken; + private String prettyPrint; + private String project; + private String quotaUser; + private String userIp; + + Builder() {} + + public Builder mergeFrom(AggregatedListNetworkEndpointGroupsHttpRequest other) { + if (other == AggregatedListNetworkEndpointGroupsHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getFilter() != null) { + this.filter = other.filter; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getMaxResults() != null) { + this.maxResults = other.maxResults; + } + if (other.getOrderBy() != null) { + this.orderBy = other.orderBy; + } + if (other.getPageToken() != null) { + this.pageToken = other.pageToken; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getProject() != null) { + this.project = other.project; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(AggregatedListNetworkEndpointGroupsHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.filter = source.filter; + this.key = source.key; + this.maxResults = source.maxResults; + this.orderBy = source.orderBy; + this.pageToken = source.pageToken; + this.prettyPrint = source.prettyPrint; + this.project = source.project; + this.quotaUser = source.quotaUser; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** + * A filter expression that filters resources listed in the response. The expression must + * specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must + * be either =, !=, >, or <. + * + *

For example, if you are filtering Compute Engine instances, you can exclude instances + * named example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource + * labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. + * For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By + * default, each expression is an AND expression. However, you can include AND and OR + * expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + public String getFilter() { + return filter; + } + + /** + * A filter expression that filters resources listed in the response. The expression must + * specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must + * be either =, !=, >, or <. + * + *

For example, if you are filtering Compute Engine instances, you can exclude instances + * named example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource + * labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. + * For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By + * default, each expression is an AND expression. However, you can include AND and OR + * expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + public Builder setFilter(String filter) { + this.filter = filter; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Builder setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical + * order based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public String getOrderBy() { + return orderBy; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical + * order based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public Builder setOrderBy(String orderBy) { + this.orderBy = orderBy; + return this; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public String getPageToken() { + return pageToken; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public Builder setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** + * Project ID for this request. It must have the format + * `{project}/aggregated/networkEndpointGroups`. \`{project}\` must start with a letter, and + * contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores + * (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It + * must be between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public String getProject() { + return project; + } + + /** + * Project ID for this request. It must have the format + * `{project}/aggregated/networkEndpointGroups`. \`{project}\` must start with a letter, and + * contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores + * (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It + * must be between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public Builder setProject(String project) { + this.project = project; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public AggregatedListNetworkEndpointGroupsHttpRequest build() { + String missing = ""; + + if (project == null) { + missing += " project"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new AggregatedListNetworkEndpointGroupsHttpRequest( + access_token, + callback, + fields, + filter, + key, + maxResults, + orderBy, + pageToken, + prettyPrint, + project, + quotaUser, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setFilter(this.filter); + newBuilder.setKey(this.key); + newBuilder.setMaxResults(this.maxResults); + newBuilder.setOrderBy(this.orderBy); + newBuilder.setPageToken(this.pageToken); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setProject(this.project); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "AggregatedListNetworkEndpointGroupsHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "filter=" + + filter + + ", " + + "key=" + + key + + ", " + + "maxResults=" + + maxResults + + ", " + + "orderBy=" + + orderBy + + ", " + + "pageToken=" + + pageToken + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "project=" + + project + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AggregatedListNetworkEndpointGroupsHttpRequest) { + AggregatedListNetworkEndpointGroupsHttpRequest that = + (AggregatedListNetworkEndpointGroupsHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.filter, that.getFilter()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.maxResults, that.getMaxResults()) + && Objects.equals(this.orderBy, that.getOrderBy()) + && Objects.equals(this.pageToken, that.getPageToken()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.project, that.getProject()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + filter, + key, + maxResults, + orderBy, + pageToken, + prettyPrint, + project, + quotaUser, + userIp); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.java new file mode 100644 index 000000000000..fbc90928f5a1 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.java @@ -0,0 +1,559 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.networkEndpointGroups.attachNetworkEndpoints. Attach a list of + * network endpoints to the specified network endpoint group. + */ +public final class AttachNetworkEndpointsNetworkEndpointGroupHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String key; + private final String networkEndpointGroup; + private final NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource; + private final String prettyPrint; + private final String quotaUser; + private final String requestId; + private final String userIp; + + private AttachNetworkEndpointsNetworkEndpointGroupHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.key = null; + this.networkEndpointGroup = null; + this.networkEndpointGroupsAttachEndpointsRequestResource = null; + this.prettyPrint = null; + this.quotaUser = null; + this.requestId = null; + this.userIp = null; + } + + private AttachNetworkEndpointsNetworkEndpointGroupHttpRequest( + String access_token, + String callback, + String fields, + String key, + String networkEndpointGroup, + NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource, + String prettyPrint, + String quotaUser, + String requestId, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.key = key; + this.networkEndpointGroup = networkEndpointGroup; + this.networkEndpointGroupsAttachEndpointsRequestResource = + networkEndpointGroupsAttachEndpointsRequestResource; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.requestId = requestId; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("key".equals(fieldName)) { + return key; + } + if ("networkEndpointGroup".equals(fieldName)) { + return networkEndpointGroup; + } + if ("networkEndpointGroupsAttachEndpointsRequestResource".equals(fieldName)) { + return networkEndpointGroupsAttachEndpointsRequestResource; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("requestId".equals(fieldName)) { + return requestId; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public NetworkEndpointGroupsAttachEndpointsRequest getApiMessageRequestBody() { + return networkEndpointGroupsAttachEndpointsRequestResource; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The name of the network endpoint group where you are attaching network endpoints to. It should + * comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + public NetworkEndpointGroupsAttachEndpointsRequest + getNetworkEndpointGroupsAttachEndpointsRequestResource() { + return networkEndpointGroupsAttachEndpointsRequestResource; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** + * 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). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static AttachNetworkEndpointsNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final AttachNetworkEndpointsNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new AttachNetworkEndpointsNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String key; + private String networkEndpointGroup; + private NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(AttachNetworkEndpointsNetworkEndpointGroupHttpRequest other) { + if (other == AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.getDefaultInstance()) + return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroup() != null) { + this.networkEndpointGroup = other.networkEndpointGroup; + } + if (other.getNetworkEndpointGroupsAttachEndpointsRequestResource() != null) { + this.networkEndpointGroupsAttachEndpointsRequestResource = + other.networkEndpointGroupsAttachEndpointsRequestResource; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(AttachNetworkEndpointsNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.key = source.key; + this.networkEndpointGroup = source.networkEndpointGroup; + this.networkEndpointGroupsAttachEndpointsRequestResource = + source.networkEndpointGroupsAttachEndpointsRequestResource; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The name of the network endpoint group where you are attaching network endpoints to. It + * should comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** + * The name of the network endpoint group where you are attaching network endpoints to. It + * should comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + public NetworkEndpointGroupsAttachEndpointsRequest + getNetworkEndpointGroupsAttachEndpointsRequestResource() { + return networkEndpointGroupsAttachEndpointsRequestResource; + } + + public Builder setNetworkEndpointGroupsAttachEndpointsRequestResource( + NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource) { + this.networkEndpointGroupsAttachEndpointsRequestResource = + networkEndpointGroupsAttachEndpointsRequestResource; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + 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). + */ + public String getRequestId() { + return 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). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public AttachNetworkEndpointsNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (networkEndpointGroup == null) { + missing += " networkEndpointGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new AttachNetworkEndpointsNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + key, + networkEndpointGroup, + networkEndpointGroupsAttachEndpointsRequestResource, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup); + newBuilder.setNetworkEndpointGroupsAttachEndpointsRequestResource( + this.networkEndpointGroupsAttachEndpointsRequestResource); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "AttachNetworkEndpointsNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroup=" + + networkEndpointGroup + + ", " + + "networkEndpointGroupsAttachEndpointsRequestResource=" + + networkEndpointGroupsAttachEndpointsRequestResource + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AttachNetworkEndpointsNetworkEndpointGroupHttpRequest) { + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest that = + (AttachNetworkEndpointsNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals( + this.networkEndpointGroupsAttachEndpointsRequestResource, + that.getNetworkEndpointGroupsAttachEndpointsRequestResource()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + key, + networkEndpointGroup, + networkEndpointGroupsAttachEndpointsRequestResource, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java index 1118fc2870d6..ed2d476777a7 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java @@ -212,9 +212,9 @@ public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers(St * *


    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAutoscalersHttpRequest request = AggregatedListAutoscalersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (AutoscalersScopedList element : autoscalerClient.aggregatedListAutoscalers(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -239,9 +239,9 @@ public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers(
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAutoscalersHttpRequest request = AggregatedListAutoscalersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListAutoscalersPagedResponse> future = autoscalerClient.aggregatedListAutoscalersPagedCallable().futureCall(request);
    *   // Do something
@@ -266,9 +266,9 @@ public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers(
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAutoscalersHttpRequest request = AggregatedListAutoscalersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     AutoscalerAggregatedList response = autoscalerClient.aggregatedListAutoscalersCallable().call(request);
@@ -349,9 +349,9 @@ public final Operation deleteAutoscaler(String autoscaler) {
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneAutoscalerName autoscaler = ProjectZoneAutoscalerName.of("[PROJECT]", "[ZONE]", "[AUTOSCALER]");
+   *   String formattedAutoscaler = ProjectZoneAutoscalerName.format("[PROJECT]", "[ZONE]", "[AUTOSCALER]");
    *   DeleteAutoscalerHttpRequest request = DeleteAutoscalerHttpRequest.newBuilder()
-   *     .setAutoscaler(autoscaler.toString())
+   *     .setAutoscaler(formattedAutoscaler)
    *     .build();
    *   Operation response = autoscalerClient.deleteAutoscaler(request);
    * }
@@ -373,9 +373,9 @@ public final Operation deleteAutoscaler(DeleteAutoscalerHttpRequest request) {
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneAutoscalerName autoscaler = ProjectZoneAutoscalerName.of("[PROJECT]", "[ZONE]", "[AUTOSCALER]");
+   *   String formattedAutoscaler = ProjectZoneAutoscalerName.format("[PROJECT]", "[ZONE]", "[AUTOSCALER]");
    *   DeleteAutoscalerHttpRequest request = DeleteAutoscalerHttpRequest.newBuilder()
-   *     .setAutoscaler(autoscaler.toString())
+   *     .setAutoscaler(formattedAutoscaler)
    *     .build();
    *   ApiFuture<Operation> future = autoscalerClient.deleteAutoscalerCallable().futureCall(request);
    *   // Do something
@@ -449,9 +449,9 @@ public final Autoscaler getAutoscaler(String autoscaler) {
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneAutoscalerName autoscaler = ProjectZoneAutoscalerName.of("[PROJECT]", "[ZONE]", "[AUTOSCALER]");
+   *   String formattedAutoscaler = ProjectZoneAutoscalerName.format("[PROJECT]", "[ZONE]", "[AUTOSCALER]");
    *   GetAutoscalerHttpRequest request = GetAutoscalerHttpRequest.newBuilder()
-   *     .setAutoscaler(autoscaler.toString())
+   *     .setAutoscaler(formattedAutoscaler)
    *     .build();
    *   Autoscaler response = autoscalerClient.getAutoscaler(request);
    * }
@@ -474,9 +474,9 @@ public final Autoscaler getAutoscaler(GetAutoscalerHttpRequest request) {
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneAutoscalerName autoscaler = ProjectZoneAutoscalerName.of("[PROJECT]", "[ZONE]", "[AUTOSCALER]");
+   *   String formattedAutoscaler = ProjectZoneAutoscalerName.format("[PROJECT]", "[ZONE]", "[AUTOSCALER]");
    *   GetAutoscalerHttpRequest request = GetAutoscalerHttpRequest.newBuilder()
-   *     .setAutoscaler(autoscaler.toString())
+   *     .setAutoscaler(formattedAutoscaler)
    *     .build();
    *   ApiFuture<Autoscaler> future = autoscalerClient.getAutoscalerCallable().futureCall(request);
    *   // Do something
@@ -563,10 +563,10 @@ public final Operation insertAutoscaler(String zone, Autoscaler autoscalerResour
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   InsertAutoscalerHttpRequest request = InsertAutoscalerHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setAutoscalerResource(autoscalerResource)
    *     .build();
    *   Operation response = autoscalerClient.insertAutoscaler(request);
@@ -589,10 +589,10 @@ public final Operation insertAutoscaler(InsertAutoscalerHttpRequest request) {
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   InsertAutoscalerHttpRequest request = InsertAutoscalerHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setAutoscalerResource(autoscalerResource)
    *     .build();
    *   ApiFuture<Operation> future = autoscalerClient.insertAutoscalerCallable().futureCall(request);
@@ -666,9 +666,9 @@ public final ListAutoscalersPagedResponse listAutoscalers(String zone) {
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListAutoscalersHttpRequest request = ListAutoscalersHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (Autoscaler element : autoscalerClient.listAutoscalers(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -692,9 +692,9 @@ public final ListAutoscalersPagedResponse listAutoscalers(ListAutoscalersHttpReq
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListAutoscalersHttpRequest request = ListAutoscalersHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListAutoscalersPagedResponse> future = autoscalerClient.listAutoscalersPagedCallable().futureCall(request);
    *   // Do something
@@ -718,9 +718,9 @@ public final ListAutoscalersPagedResponse listAutoscalers(ListAutoscalersHttpReq
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListAutoscalersHttpRequest request = ListAutoscalersHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     AutoscalerList response = autoscalerClient.listAutoscalersCallable().call(request);
@@ -843,12 +843,12 @@ public final Operation patchAutoscaler(
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
    *   String autoscaler = "";
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchAutoscalerHttpRequest request = PatchAutoscalerHttpRequest.newBuilder()
    *     .setAutoscaler(autoscaler)
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setAutoscalerResource(autoscalerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -874,12 +874,12 @@ public final Operation patchAutoscaler(PatchAutoscalerHttpRequest request) {
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
    *   String autoscaler = "";
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchAutoscalerHttpRequest request = PatchAutoscalerHttpRequest.newBuilder()
    *     .setAutoscaler(autoscaler)
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setAutoscalerResource(autoscalerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -992,12 +992,12 @@ public final Operation updateAutoscaler(
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
    *   String autoscaler = "";
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateAutoscalerHttpRequest request = UpdateAutoscalerHttpRequest.newBuilder()
    *     .setAutoscaler(autoscaler)
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setAutoscalerResource(autoscalerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1022,12 +1022,12 @@ public final Operation updateAutoscaler(UpdateAutoscalerHttpRequest request) {
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
    *   String autoscaler = "";
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateAutoscalerHttpRequest request = UpdateAutoscalerHttpRequest.newBuilder()
    *     .setAutoscaler(autoscaler)
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setAutoscalerResource(autoscalerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Backend.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Backend.java
index 89ee3ad78fba..bfd656afaaea 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Backend.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Backend.java
@@ -31,8 +31,10 @@ public final class Backend implements ApiMessage {
   private final String description;
   private final String group;
   private final Integer maxConnections;
+  private final Integer maxConnectionsPerEndpoint;
   private final Integer maxConnectionsPerInstance;
   private final Integer maxRate;
+  private final Float maxRatePerEndpoint;
   private final Float maxRatePerInstance;
   private final Float maxUtilization;
 
@@ -42,8 +44,10 @@ private Backend() {
     this.description = null;
     this.group = null;
     this.maxConnections = null;
+    this.maxConnectionsPerEndpoint = null;
     this.maxConnectionsPerInstance = null;
     this.maxRate = null;
+    this.maxRatePerEndpoint = null;
     this.maxRatePerInstance = null;
     this.maxUtilization = null;
   }
@@ -54,8 +58,10 @@ private Backend(
       String description,
       String group,
       Integer maxConnections,
+      Integer maxConnectionsPerEndpoint,
       Integer maxConnectionsPerInstance,
       Integer maxRate,
+      Float maxRatePerEndpoint,
       Float maxRatePerInstance,
       Float maxUtilization) {
     this.balancingMode = balancingMode;
@@ -63,8 +69,10 @@ private Backend(
     this.description = description;
     this.group = group;
     this.maxConnections = maxConnections;
+    this.maxConnectionsPerEndpoint = maxConnectionsPerEndpoint;
     this.maxConnectionsPerInstance = maxConnectionsPerInstance;
     this.maxRate = maxRate;
+    this.maxRatePerEndpoint = maxRatePerEndpoint;
     this.maxRatePerInstance = maxRatePerInstance;
     this.maxUtilization = maxUtilization;
   }
@@ -86,12 +94,18 @@ public Object getFieldValue(String fieldName) {
     if ("maxConnections".equals(fieldName)) {
       return maxConnections;
     }
+    if ("maxConnectionsPerEndpoint".equals(fieldName)) {
+      return maxConnectionsPerEndpoint;
+    }
     if ("maxConnectionsPerInstance".equals(fieldName)) {
       return maxConnectionsPerInstance;
     }
     if ("maxRate".equals(fieldName)) {
       return maxRate;
     }
+    if ("maxRatePerEndpoint".equals(fieldName)) {
+      return maxRatePerEndpoint;
+    }
     if ("maxRatePerInstance".equals(fieldName)) {
       return maxRatePerInstance;
     }
@@ -183,6 +197,18 @@ public Integer getMaxConnections() {
     return maxConnections;
   }
 
+  /**
+   * The max number of simultaneous connections that a single backend network endpoint can handle.
+   * This is used to calculate the capacity of the group. Can be used in either CONNECTION or
+   * UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or
+   * maxConnectionsPerEndpoint must be set.
+   *
+   * 

This cannot be used for internal load balancing. + */ + public Integer getMaxConnectionsPerEndpoint() { + return maxConnectionsPerEndpoint; + } + /** * The max number of simultaneous connections that a single backend instance can handle. This is * used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION @@ -206,6 +232,17 @@ public Integer getMaxRate() { return maxRate; } + /** + * The max requests per second (RPS) that a single backend network endpoint can handle. This is + * used to calculate the capacity of the group. Can be used in either balancing mode. For RATE + * mode, either maxRate or maxRatePerEndpoint must be set. + * + *

This cannot be used for internal load balancing. + */ + public Float getMaxRatePerEndpoint() { + return maxRatePerEndpoint; + } + /** * The max requests per second (RPS) that a single backend instance can handle. This is used to * calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, @@ -255,8 +292,10 @@ public static class Builder { private String description; private String group; private Integer maxConnections; + private Integer maxConnectionsPerEndpoint; private Integer maxConnectionsPerInstance; private Integer maxRate; + private Float maxRatePerEndpoint; private Float maxRatePerInstance; private Float maxUtilization; @@ -279,12 +318,18 @@ public Builder mergeFrom(Backend other) { if (other.getMaxConnections() != null) { this.maxConnections = other.maxConnections; } + if (other.getMaxConnectionsPerEndpoint() != null) { + this.maxConnectionsPerEndpoint = other.maxConnectionsPerEndpoint; + } if (other.getMaxConnectionsPerInstance() != null) { this.maxConnectionsPerInstance = other.maxConnectionsPerInstance; } if (other.getMaxRate() != null) { this.maxRate = other.maxRate; } + if (other.getMaxRatePerEndpoint() != null) { + this.maxRatePerEndpoint = other.maxRatePerEndpoint; + } if (other.getMaxRatePerInstance() != null) { this.maxRatePerInstance = other.maxRatePerInstance; } @@ -300,8 +345,10 @@ public Builder mergeFrom(Backend other) { this.description = source.description; this.group = source.group; this.maxConnections = source.maxConnections; + this.maxConnectionsPerEndpoint = source.maxConnectionsPerEndpoint; this.maxConnectionsPerInstance = source.maxConnectionsPerInstance; this.maxRate = source.maxRate; + this.maxRatePerEndpoint = source.maxRatePerEndpoint; this.maxRatePerInstance = source.maxRatePerInstance; this.maxUtilization = source.maxUtilization; } @@ -439,6 +486,31 @@ public Builder setMaxConnections(Integer maxConnections) { return this; } + /** + * The max number of simultaneous connections that a single backend network endpoint can handle. + * This is used to calculate the capacity of the group. Can be used in either CONNECTION or + * UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or + * maxConnectionsPerEndpoint must be set. + * + *

This cannot be used for internal load balancing. + */ + public Integer getMaxConnectionsPerEndpoint() { + return maxConnectionsPerEndpoint; + } + + /** + * The max number of simultaneous connections that a single backend network endpoint can handle. + * This is used to calculate the capacity of the group. Can be used in either CONNECTION or + * UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or + * maxConnectionsPerEndpoint must be set. + * + *

This cannot be used for internal load balancing. + */ + public Builder setMaxConnectionsPerEndpoint(Integer maxConnectionsPerEndpoint) { + this.maxConnectionsPerEndpoint = maxConnectionsPerEndpoint; + return this; + } + /** * The max number of simultaneous connections that a single backend instance can handle. This is * used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION @@ -487,6 +559,29 @@ public Builder setMaxRate(Integer maxRate) { return this; } + /** + * The max requests per second (RPS) that a single backend network endpoint can handle. This is + * used to calculate the capacity of the group. Can be used in either balancing mode. For RATE + * mode, either maxRate or maxRatePerEndpoint must be set. + * + *

This cannot be used for internal load balancing. + */ + public Float getMaxRatePerEndpoint() { + return maxRatePerEndpoint; + } + + /** + * The max requests per second (RPS) that a single backend network endpoint can handle. This is + * used to calculate the capacity of the group. Can be used in either balancing mode. For RATE + * mode, either maxRate or maxRatePerEndpoint must be set. + * + *

This cannot be used for internal load balancing. + */ + public Builder setMaxRatePerEndpoint(Float maxRatePerEndpoint) { + this.maxRatePerEndpoint = maxRatePerEndpoint; + return this; + } + /** * The max requests per second (RPS) that a single backend instance can handle. This is used to * calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, @@ -539,8 +634,10 @@ public Backend build() { description, group, maxConnections, + maxConnectionsPerEndpoint, maxConnectionsPerInstance, maxRate, + maxRatePerEndpoint, maxRatePerInstance, maxUtilization); } @@ -552,8 +649,10 @@ public Builder clone() { newBuilder.setDescription(this.description); newBuilder.setGroup(this.group); newBuilder.setMaxConnections(this.maxConnections); + newBuilder.setMaxConnectionsPerEndpoint(this.maxConnectionsPerEndpoint); newBuilder.setMaxConnectionsPerInstance(this.maxConnectionsPerInstance); newBuilder.setMaxRate(this.maxRate); + newBuilder.setMaxRatePerEndpoint(this.maxRatePerEndpoint); newBuilder.setMaxRatePerInstance(this.maxRatePerInstance); newBuilder.setMaxUtilization(this.maxUtilization); return newBuilder; @@ -578,12 +677,18 @@ public String toString() { + "maxConnections=" + maxConnections + ", " + + "maxConnectionsPerEndpoint=" + + maxConnectionsPerEndpoint + + ", " + "maxConnectionsPerInstance=" + maxConnectionsPerInstance + ", " + "maxRate=" + maxRate + ", " + + "maxRatePerEndpoint=" + + maxRatePerEndpoint + + ", " + "maxRatePerInstance=" + maxRatePerInstance + ", " @@ -604,8 +709,10 @@ public boolean equals(Object o) { && Objects.equals(this.description, that.getDescription()) && Objects.equals(this.group, that.getGroup()) && Objects.equals(this.maxConnections, that.getMaxConnections()) + && Objects.equals(this.maxConnectionsPerEndpoint, that.getMaxConnectionsPerEndpoint()) && Objects.equals(this.maxConnectionsPerInstance, that.getMaxConnectionsPerInstance()) && Objects.equals(this.maxRate, that.getMaxRate()) + && Objects.equals(this.maxRatePerEndpoint, that.getMaxRatePerEndpoint()) && Objects.equals(this.maxRatePerInstance, that.getMaxRatePerInstance()) && Objects.equals(this.maxUtilization, that.getMaxUtilization()); } @@ -620,8 +727,10 @@ public int hashCode() { description, group, maxConnections, + maxConnectionsPerEndpoint, maxConnectionsPerInstance, maxRate, + maxRatePerEndpoint, maxRatePerInstance, maxUtilization); } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketClient.java index 6b4bf3afcda0..9e64cd621a8b 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketClient.java @@ -226,10 +226,10 @@ public final Operation addSignedUrlKeyBackendBucket( * *


    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   SignedUrlKey signedUrlKeyResource = SignedUrlKey.newBuilder().build();
    *   AddSignedUrlKeyBackendBucketHttpRequest request = AddSignedUrlKeyBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .setSignedUrlKeyResource(signedUrlKeyResource)
    *     .build();
    *   Operation response = backendBucketClient.addSignedUrlKeyBackendBucket(request);
@@ -253,10 +253,10 @@ public final Operation addSignedUrlKeyBackendBucket(
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   SignedUrlKey signedUrlKeyResource = SignedUrlKey.newBuilder().build();
    *   AddSignedUrlKeyBackendBucketHttpRequest request = AddSignedUrlKeyBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .setSignedUrlKeyResource(signedUrlKeyResource)
    *     .build();
    *   ApiFuture<Operation> future = backendBucketClient.addSignedUrlKeyBackendBucketCallable().futureCall(request);
@@ -329,9 +329,9 @@ public final Operation deleteBackendBucket(String backendBucket) {
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   DeleteBackendBucketHttpRequest request = DeleteBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .build();
    *   Operation response = backendBucketClient.deleteBackendBucket(request);
    * }
@@ -353,9 +353,9 @@ public final Operation deleteBackendBucket(DeleteBackendBucketHttpRequest reques
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   DeleteBackendBucketHttpRequest request = DeleteBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .build();
    *   ApiFuture<Operation> future = backendBucketClient.deleteBackendBucketCallable().futureCall(request);
    *   // Do something
@@ -438,10 +438,10 @@ public final Operation deleteSignedUrlKeyBackendBucket(String backendBucket, Str
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   String keyName = "";
    *   DeleteSignedUrlKeyBackendBucketHttpRequest request = DeleteSignedUrlKeyBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .setKeyName(keyName)
    *     .build();
    *   Operation response = backendBucketClient.deleteSignedUrlKeyBackendBucket(request);
@@ -465,10 +465,10 @@ public final Operation deleteSignedUrlKeyBackendBucket(
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   String keyName = "";
    *   DeleteSignedUrlKeyBackendBucketHttpRequest request = DeleteSignedUrlKeyBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .setKeyName(keyName)
    *     .build();
    *   ApiFuture<Operation> future = backendBucketClient.deleteSignedUrlKeyBackendBucketCallable().futureCall(request);
@@ -544,9 +544,9 @@ public final BackendBucket getBackendBucket(String backendBucket) {
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   GetBackendBucketHttpRequest request = GetBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .build();
    *   BackendBucket response = backendBucketClient.getBackendBucket(request);
    * }
@@ -569,9 +569,9 @@ public final BackendBucket getBackendBucket(GetBackendBucketHttpRequest request)
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   GetBackendBucketHttpRequest request = GetBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .build();
    *   ApiFuture<BackendBucket> future = backendBucketClient.getBackendBucketCallable().futureCall(request);
    *   // Do something
@@ -657,10 +657,10 @@ public final Operation insertBackendBucket(String project, BackendBucket backend
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
    *   InsertBackendBucketHttpRequest request = InsertBackendBucketHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setBackendBucketResource(backendBucketResource)
    *     .build();
    *   Operation response = backendBucketClient.insertBackendBucket(request);
@@ -684,10 +684,10 @@ public final Operation insertBackendBucket(InsertBackendBucketHttpRequest reques
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
    *   InsertBackendBucketHttpRequest request = InsertBackendBucketHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setBackendBucketResource(backendBucketResource)
    *     .build();
    *   ApiFuture<Operation> future = backendBucketClient.insertBackendBucketCallable().futureCall(request);
@@ -762,9 +762,9 @@ public final ListBackendBucketsPagedResponse listBackendBuckets(String project)
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListBackendBucketsHttpRequest request = ListBackendBucketsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (BackendBucket element : backendBucketClient.listBackendBuckets(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -789,9 +789,9 @@ public final ListBackendBucketsPagedResponse listBackendBuckets(
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListBackendBucketsHttpRequest request = ListBackendBucketsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListBackendBucketsPagedResponse> future = backendBucketClient.listBackendBucketsPagedCallable().futureCall(request);
    *   // Do something
@@ -815,9 +815,9 @@ public final ListBackendBucketsPagedResponse listBackendBuckets(
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListBackendBucketsHttpRequest request = ListBackendBucketsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     BackendBucketList response = backendBucketClient.listBackendBucketsCallable().call(request);
@@ -927,11 +927,11 @@ public final Operation patchBackendBucket(
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchBackendBucketHttpRequest request = PatchBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .setBackendBucketResource(backendBucketResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -956,11 +956,11 @@ public final Operation patchBackendBucket(PatchBackendBucketHttpRequest request)
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchBackendBucketHttpRequest request = PatchBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .setBackendBucketResource(backendBucketResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1060,11 +1060,11 @@ public final Operation updateBackendBucket(
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateBackendBucketHttpRequest request = UpdateBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .setBackendBucketResource(backendBucketResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1088,11 +1088,11 @@ public final Operation updateBackendBucket(UpdateBackendBucketHttpRequest reques
    *
    * 

    * try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) {
-   *   ProjectGlobalBackendBucketName backendBucket = ProjectGlobalBackendBucketName.of("[PROJECT]", "[BACKEND_BUCKET]");
+   *   String formattedBackendBucket = ProjectGlobalBackendBucketName.format("[PROJECT]", "[BACKEND_BUCKET]");
    *   BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateBackendBucketHttpRequest request = UpdateBackendBucketHttpRequest.newBuilder()
-   *     .setBackendBucket(backendBucket.toString())
+   *     .setBackendBucket(formattedBackendBucket)
    *     .setBackendBucketResource(backendBucketResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java
index 0142ca5636a0..3e0cfe69e732 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java
@@ -226,10 +226,10 @@ public final Operation addSignedUrlKeyBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   SignedUrlKey signedUrlKeyResource = SignedUrlKey.newBuilder().build();
    *   AddSignedUrlKeyBackendServiceHttpRequest request = AddSignedUrlKeyBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setSignedUrlKeyResource(signedUrlKeyResource)
    *     .build();
    *   Operation response = backendServiceClient.addSignedUrlKeyBackendService(request);
@@ -253,10 +253,10 @@ public final Operation addSignedUrlKeyBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   SignedUrlKey signedUrlKeyResource = SignedUrlKey.newBuilder().build();
    *   AddSignedUrlKeyBackendServiceHttpRequest request = AddSignedUrlKeyBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setSignedUrlKeyResource(signedUrlKeyResource)
    *     .build();
    *   ApiFuture<Operation> future = backendServiceClient.addSignedUrlKeyBackendServiceCallable().futureCall(request);
@@ -336,9 +336,9 @@ public final AggregatedListBackendServicesPagedResponse aggregatedListBackendSer
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListBackendServicesHttpRequest request = AggregatedListBackendServicesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (BackendServicesScopedList element : backendServiceClient.aggregatedListBackendServices(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -364,9 +364,9 @@ public final AggregatedListBackendServicesPagedResponse aggregatedListBackendSer
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListBackendServicesHttpRequest request = AggregatedListBackendServicesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListBackendServicesPagedResponse> future = backendServiceClient.aggregatedListBackendServicesPagedCallable().futureCall(request);
    *   // Do something
@@ -392,9 +392,9 @@ public final AggregatedListBackendServicesPagedResponse aggregatedListBackendSer
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListBackendServicesHttpRequest request = AggregatedListBackendServicesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     BackendServiceAggregatedList response = backendServiceClient.aggregatedListBackendServicesCallable().call(request);
@@ -475,9 +475,9 @@ public final Operation deleteBackendService(String backendService) {
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   DeleteBackendServiceHttpRequest request = DeleteBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .build();
    *   Operation response = backendServiceClient.deleteBackendService(request);
    * }
@@ -499,9 +499,9 @@ public final Operation deleteBackendService(DeleteBackendServiceHttpRequest requ
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   DeleteBackendServiceHttpRequest request = DeleteBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .build();
    *   ApiFuture<Operation> future = backendServiceClient.deleteBackendServiceCallable().futureCall(request);
    *   // Do something
@@ -584,10 +584,10 @@ public final Operation deleteSignedUrlKeyBackendService(String backendService, S
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   String keyName = "";
    *   DeleteSignedUrlKeyBackendServiceHttpRequest request = DeleteSignedUrlKeyBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setKeyName(keyName)
    *     .build();
    *   Operation response = backendServiceClient.deleteSignedUrlKeyBackendService(request);
@@ -611,10 +611,10 @@ public final Operation deleteSignedUrlKeyBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   String keyName = "";
    *   DeleteSignedUrlKeyBackendServiceHttpRequest request = DeleteSignedUrlKeyBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setKeyName(keyName)
    *     .build();
    *   ApiFuture<Operation> future = backendServiceClient.deleteSignedUrlKeyBackendServiceCallable().futureCall(request);
@@ -687,9 +687,9 @@ public final BackendService getBackendService(String backendService) {
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   GetBackendServiceHttpRequest request = GetBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .build();
    *   BackendService response = backendServiceClient.getBackendService(request);
    * }
@@ -711,9 +711,9 @@ public final BackendService getBackendService(GetBackendServiceHttpRequest reque
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   GetBackendServiceHttpRequest request = GetBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .build();
    *   ApiFuture<BackendService> future = backendServiceClient.getBackendServiceCallable().futureCall(request);
    *   // Do something
@@ -798,10 +798,10 @@ public final BackendServiceGroupHealth getHealthBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   ResourceGroupReference resourceGroupReferenceResource = ResourceGroupReference.newBuilder().build();
    *   GetHealthBackendServiceHttpRequest request = GetHealthBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setResourceGroupReferenceResource(resourceGroupReferenceResource)
    *     .build();
    *   BackendServiceGroupHealth response = backendServiceClient.getHealthBackendService(request);
@@ -825,10 +825,10 @@ public final BackendServiceGroupHealth getHealthBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   ResourceGroupReference resourceGroupReferenceResource = ResourceGroupReference.newBuilder().build();
    *   GetHealthBackendServiceHttpRequest request = GetHealthBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setResourceGroupReferenceResource(resourceGroupReferenceResource)
    *     .build();
    *   ApiFuture<BackendServiceGroupHealth> future = backendServiceClient.getHealthBackendServiceCallable().futureCall(request);
@@ -921,10 +921,10 @@ public final Operation insertBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   InsertBackendServiceHttpRequest request = InsertBackendServiceHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setBackendServiceResource(backendServiceResource)
    *     .build();
    *   Operation response = backendServiceClient.insertBackendService(request);
@@ -949,10 +949,10 @@ public final Operation insertBackendService(InsertBackendServiceHttpRequest requ
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   InsertBackendServiceHttpRequest request = InsertBackendServiceHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setBackendServiceResource(backendServiceResource)
    *     .build();
    *   ApiFuture<Operation> future = backendServiceClient.insertBackendServiceCallable().futureCall(request);
@@ -1027,9 +1027,9 @@ public final ListBackendServicesPagedResponse listBackendServices(String project
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListBackendServicesHttpRequest request = ListBackendServicesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (BackendService element : backendServiceClient.listBackendServices(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -1054,9 +1054,9 @@ public final ListBackendServicesPagedResponse listBackendServices(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListBackendServicesHttpRequest request = ListBackendServicesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListBackendServicesPagedResponse> future = backendServiceClient.listBackendServicesPagedCallable().futureCall(request);
    *   // Do something
@@ -1080,9 +1080,9 @@ public final ListBackendServicesPagedResponse listBackendServices(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListBackendServicesHttpRequest request = ListBackendServicesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     BackendServiceList response = backendServiceClient.listBackendServicesCallable().call(request);
@@ -1200,11 +1200,11 @@ public final Operation patchBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchBackendServiceHttpRequest request = PatchBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setBackendServiceResource(backendServiceResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1231,11 +1231,11 @@ public final Operation patchBackendService(PatchBackendServiceHttpRequest reques
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchBackendServiceHttpRequest request = PatchBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setBackendServiceResource(backendServiceResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1322,10 +1322,10 @@ public final Operation setSecurityPolicyBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   SecurityPolicyReference securityPolicyReferenceResource = SecurityPolicyReference.newBuilder().build();
    *   SetSecurityPolicyBackendServiceHttpRequest request = SetSecurityPolicyBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setSecurityPolicyReferenceResource(securityPolicyReferenceResource)
    *     .build();
    *   Operation response = backendServiceClient.setSecurityPolicyBackendService(request);
@@ -1349,10 +1349,10 @@ public final Operation setSecurityPolicyBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   SecurityPolicyReference securityPolicyReferenceResource = SecurityPolicyReference.newBuilder().build();
    *   SetSecurityPolicyBackendServiceHttpRequest request = SetSecurityPolicyBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setSecurityPolicyReferenceResource(securityPolicyReferenceResource)
    *     .build();
    *   ApiFuture<Operation> future = backendServiceClient.setSecurityPolicyBackendServiceCallable().futureCall(request);
@@ -1459,11 +1459,11 @@ public final Operation updateBackendService(
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateBackendServiceHttpRequest request = UpdateBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setBackendServiceResource(backendServiceResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1489,11 +1489,11 @@ public final Operation updateBackendService(UpdateBackendServiceHttpRequest requ
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
-   *   ProjectGlobalBackendServiceName backendService = ProjectGlobalBackendServiceName.of("[PROJECT]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectGlobalBackendServiceName.format("[PROJECT]", "[BACKEND_SERVICE]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateBackendServiceHttpRequest request = UpdateBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setBackendServiceResource(backendServiceResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceReference.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceReference.java
new file mode 100644
index 000000000000..ef765ef572e9
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServiceReference.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+public final class BackendServiceReference implements ApiMessage {
+  private final String backendService;
+
+  private BackendServiceReference() {
+    this.backendService = null;
+  }
+
+  private BackendServiceReference(String backendService) {
+    this.backendService = backendService;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("backendService".equals(fieldName)) {
+      return backendService;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  public String getBackendService() {
+    return backendService;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(BackendServiceReference prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static BackendServiceReference getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final BackendServiceReference DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new BackendServiceReference();
+  }
+
+  public static class Builder {
+    private String backendService;
+
+    Builder() {}
+
+    public Builder mergeFrom(BackendServiceReference other) {
+      if (other == BackendServiceReference.getDefaultInstance()) return this;
+      if (other.getBackendService() != null) {
+        this.backendService = other.backendService;
+      }
+      return this;
+    }
+
+    Builder(BackendServiceReference source) {
+      this.backendService = source.backendService;
+    }
+
+    public String getBackendService() {
+      return backendService;
+    }
+
+    public Builder setBackendService(String backendService) {
+      this.backendService = backendService;
+      return this;
+    }
+
+    public BackendServiceReference build() {
+      return new BackendServiceReference(backendService);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setBackendService(this.backendService);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "BackendServiceReference{" + "backendService=" + backendService + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof BackendServiceReference) {
+      BackendServiceReference that = (BackendServiceReference) o;
+      return Objects.equals(this.backendService, that.getBackendService());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(backendService);
+  }
+}
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Binding.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Binding.java
index 312c0f43108d..5550f2fce281 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Binding.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Binding.java
@@ -76,9 +76,9 @@ public List getFieldMask() {
   }
 
   /**
-   * Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied
-   * condition will not allow user access via current binding. Different bindings, including their
-   * conditions, are examined independently.
+   * The condition that is associated with this binding. NOTE: an unsatisfied condition will not
+   * allow user access via current binding. Different bindings, including their conditions, are
+   * examined independently.
    */
   public Expr getCondition() {
     return condition;
@@ -168,18 +168,18 @@ public Builder mergeFrom(Binding other) {
     }
 
     /**
-     * Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied
-     * condition will not allow user access via current binding. Different bindings, including their
-     * conditions, are examined independently.
+     * The condition that is associated with this binding. NOTE: an unsatisfied condition will not
+     * allow user access via current binding. Different bindings, including their conditions, are
+     * examined independently.
      */
     public Expr getCondition() {
       return condition;
     }
 
     /**
-     * Unimplemented. The condition that is associated with this binding. NOTE: an unsatisfied
-     * condition will not allow user access via current binding. Different bindings, including their
-     * conditions, are examined independently.
+     * The condition that is associated with this binding. NOTE: an unsatisfied condition will not
+     * allow user access via current binding. Different bindings, including their conditions, are
+     * examined independently.
      */
     public Builder setCondition(Expr condition) {
       this.condition = condition;
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEndpointGroupHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEndpointGroupHttpRequest.java
new file mode 100644
index 000000000000..864d5d69e7ad
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEndpointGroupHttpRequest.java
@@ -0,0 +1,509 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.networkEndpointGroups.delete. Deletes the specified network
+ * endpoint group. The network endpoints in the NEG and the VM instances they belong to are not
+ * terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend
+ * services referencing it.
+ */
+public final class DeleteNetworkEndpointGroupHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String key;
+  private final String networkEndpointGroup;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String requestId;
+  private final String userIp;
+
+  private DeleteNetworkEndpointGroupHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.key = null;
+    this.networkEndpointGroup = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.requestId = null;
+    this.userIp = null;
+  }
+
+  private DeleteNetworkEndpointGroupHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String key,
+      String networkEndpointGroup,
+      String prettyPrint,
+      String quotaUser,
+      String requestId,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.key = key;
+    this.networkEndpointGroup = networkEndpointGroup;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.requestId = requestId;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("networkEndpointGroup".equals(fieldName)) {
+      return networkEndpointGroup;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("requestId".equals(fieldName)) {
+      return requestId;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * The name of the network endpoint group to delete. It should comply with RFC1035. It must have
+   * the format `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}`.
+   * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+   * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+   * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+   * in length, and it * must not start with \`"goog"\`.
+   */
+  public String getNetworkEndpointGroup() {
+    return networkEndpointGroup;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /**
+   * 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). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(DeleteNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static DeleteNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final DeleteNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new DeleteNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String key; + private String networkEndpointGroup; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(DeleteNetworkEndpointGroupHttpRequest other) { + if (other == DeleteNetworkEndpointGroupHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroup() != null) { + this.networkEndpointGroup = other.networkEndpointGroup; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(DeleteNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.key = source.key; + this.networkEndpointGroup = source.networkEndpointGroup; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The name of the network endpoint group to delete. It should comply with RFC1035. It must have + * the format `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** + * The name of the network endpoint group to delete. It should comply with RFC1035. It must have + * the format `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + 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). + */ + public String getRequestId() { + return 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). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public DeleteNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (networkEndpointGroup == null) { + missing += " networkEndpointGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new DeleteNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "DeleteNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroup=" + + networkEndpointGroup + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof DeleteNetworkEndpointGroupHttpRequest) { + DeleteNetworkEndpointGroupHttpRequest that = (DeleteNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DeprecationStatus.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DeprecationStatus.java index d9320e00d7c6..87865ddc170e 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DeprecationStatus.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DeprecationStatus.java @@ -123,7 +123,7 @@ public String getReplacement() { } /** - * The deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. + * The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. * Operations which communicate the end of life date for an image, can use ACTIVE. Operations * which create a new resource using a DEPRECATED resource will return successfully, but with a * warning indicating the deprecated resource and recommending its replacement. Operations which @@ -267,7 +267,7 @@ public Builder setReplacement(String replacement) { } /** - * The deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. + * The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. * Operations which communicate the end of life date for an image, can use ACTIVE. Operations * which create a new resource using a DEPRECATED resource will return successfully, but with a * warning indicating the deprecated resource and recommending its replacement. Operations which @@ -278,7 +278,7 @@ public String getState() { } /** - * The deprecation state of this resource. This can be ACTIVE DEPRECATED, OBSOLETE, or DELETED. + * The deprecation state of this resource. This can be ACTIVE, DEPRECATED, OBSOLETE, or DELETED. * Operations which communicate the end of life date for an image, can use ACTIVE. Operations * which create a new resource using a DEPRECATED resource will return successfully, but with a * warning indicating the deprecated resource and recommending its replacement. Operations which diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.java new file mode 100644 index 000000000000..93184e401ed8 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.java @@ -0,0 +1,559 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.networkEndpointGroups.detachNetworkEndpoints. Detach a list of + * network endpoints from the specified network endpoint group. + */ +public final class DetachNetworkEndpointsNetworkEndpointGroupHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String key; + private final String networkEndpointGroup; + private final NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource; + private final String prettyPrint; + private final String quotaUser; + private final String requestId; + private final String userIp; + + private DetachNetworkEndpointsNetworkEndpointGroupHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.key = null; + this.networkEndpointGroup = null; + this.networkEndpointGroupsDetachEndpointsRequestResource = null; + this.prettyPrint = null; + this.quotaUser = null; + this.requestId = null; + this.userIp = null; + } + + private DetachNetworkEndpointsNetworkEndpointGroupHttpRequest( + String access_token, + String callback, + String fields, + String key, + String networkEndpointGroup, + NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource, + String prettyPrint, + String quotaUser, + String requestId, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.key = key; + this.networkEndpointGroup = networkEndpointGroup; + this.networkEndpointGroupsDetachEndpointsRequestResource = + networkEndpointGroupsDetachEndpointsRequestResource; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.requestId = requestId; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("key".equals(fieldName)) { + return key; + } + if ("networkEndpointGroup".equals(fieldName)) { + return networkEndpointGroup; + } + if ("networkEndpointGroupsDetachEndpointsRequestResource".equals(fieldName)) { + return networkEndpointGroupsDetachEndpointsRequestResource; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("requestId".equals(fieldName)) { + return requestId; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public NetworkEndpointGroupsDetachEndpointsRequest getApiMessageRequestBody() { + return networkEndpointGroupsDetachEndpointsRequestResource; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The name of the network endpoint group where you are removing network endpoints. It should + * comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + public NetworkEndpointGroupsDetachEndpointsRequest + getNetworkEndpointGroupsDetachEndpointsRequestResource() { + return networkEndpointGroupsDetachEndpointsRequestResource; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** + * 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). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static DetachNetworkEndpointsNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final DetachNetworkEndpointsNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new DetachNetworkEndpointsNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String key; + private String networkEndpointGroup; + private NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(DetachNetworkEndpointsNetworkEndpointGroupHttpRequest other) { + if (other == DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.getDefaultInstance()) + return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroup() != null) { + this.networkEndpointGroup = other.networkEndpointGroup; + } + if (other.getNetworkEndpointGroupsDetachEndpointsRequestResource() != null) { + this.networkEndpointGroupsDetachEndpointsRequestResource = + other.networkEndpointGroupsDetachEndpointsRequestResource; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(DetachNetworkEndpointsNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.key = source.key; + this.networkEndpointGroup = source.networkEndpointGroup; + this.networkEndpointGroupsDetachEndpointsRequestResource = + source.networkEndpointGroupsDetachEndpointsRequestResource; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The name of the network endpoint group where you are removing network endpoints. It should + * comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** + * The name of the network endpoint group where you are removing network endpoints. It should + * comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + public NetworkEndpointGroupsDetachEndpointsRequest + getNetworkEndpointGroupsDetachEndpointsRequestResource() { + return networkEndpointGroupsDetachEndpointsRequestResource; + } + + public Builder setNetworkEndpointGroupsDetachEndpointsRequestResource( + NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource) { + this.networkEndpointGroupsDetachEndpointsRequestResource = + networkEndpointGroupsDetachEndpointsRequestResource; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + 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). + */ + public String getRequestId() { + return 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). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public DetachNetworkEndpointsNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (networkEndpointGroup == null) { + missing += " networkEndpointGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new DetachNetworkEndpointsNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + key, + networkEndpointGroup, + networkEndpointGroupsDetachEndpointsRequestResource, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup); + newBuilder.setNetworkEndpointGroupsDetachEndpointsRequestResource( + this.networkEndpointGroupsDetachEndpointsRequestResource); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "DetachNetworkEndpointsNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroup=" + + networkEndpointGroup + + ", " + + "networkEndpointGroupsDetachEndpointsRequestResource=" + + networkEndpointGroupsDetachEndpointsRequestResource + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof DetachNetworkEndpointsNetworkEndpointGroupHttpRequest) { + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest that = + (DetachNetworkEndpointsNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals( + this.networkEndpointGroupsDetachEndpointsRequestResource, + that.getNetworkEndpointGroupsDetachEndpointsRequestResource()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + key, + networkEndpointGroup, + networkEndpointGroupsDetachEndpointsRequestResource, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java index ab2fb75dc6fc..d8c97baf64d3 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java @@ -213,9 +213,9 @@ public final AggregatedListDisksPagedResponse aggregatedListDisks(String project * *


    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDisksHttpRequest request = AggregatedListDisksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (DisksScopedList element : diskClient.aggregatedListDisks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -240,9 +240,9 @@ public final AggregatedListDisksPagedResponse aggregatedListDisks(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDisksHttpRequest request = AggregatedListDisksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListDisksPagedResponse> future = diskClient.aggregatedListDisksPagedCallable().futureCall(request);
    *   // Do something
@@ -266,9 +266,9 @@ public final AggregatedListDisksPagedResponse aggregatedListDisks(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDisksHttpRequest request = AggregatedListDisksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     DiskAggregatedList response = diskClient.aggregatedListDisksCallable().call(request);
@@ -367,11 +367,11 @@ public final Operation createSnapshotDisk(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskName disk = ProjectZoneDiskName.of("[PROJECT]", "[ZONE]", "[DISK]");
+   *   String formattedDisk = ProjectZoneDiskName.format("[PROJECT]", "[ZONE]", "[DISK]");
    *   Boolean guestFlush = false;
    *   Snapshot snapshotResource = Snapshot.newBuilder().build();
    *   CreateSnapshotDiskHttpRequest request = CreateSnapshotDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .setGuestFlush(guestFlush)
    *     .setSnapshotResource(snapshotResource)
    *     .build();
@@ -395,11 +395,11 @@ public final Operation createSnapshotDisk(CreateSnapshotDiskHttpRequest request)
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskName disk = ProjectZoneDiskName.of("[PROJECT]", "[ZONE]", "[DISK]");
+   *   String formattedDisk = ProjectZoneDiskName.format("[PROJECT]", "[ZONE]", "[DISK]");
    *   Boolean guestFlush = false;
    *   Snapshot snapshotResource = Snapshot.newBuilder().build();
    *   CreateSnapshotDiskHttpRequest request = CreateSnapshotDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .setGuestFlush(guestFlush)
    *     .setSnapshotResource(snapshotResource)
    *     .build();
@@ -476,9 +476,9 @@ public final Operation deleteDisk(String disk) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskName disk = ProjectZoneDiskName.of("[PROJECT]", "[ZONE]", "[DISK]");
+   *   String formattedDisk = ProjectZoneDiskName.format("[PROJECT]", "[ZONE]", "[DISK]");
    *   DeleteDiskHttpRequest request = DeleteDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .build();
    *   Operation response = diskClient.deleteDisk(request);
    * }
@@ -502,9 +502,9 @@ public final Operation deleteDisk(DeleteDiskHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskName disk = ProjectZoneDiskName.of("[PROJECT]", "[ZONE]", "[DISK]");
+   *   String formattedDisk = ProjectZoneDiskName.format("[PROJECT]", "[ZONE]", "[DISK]");
    *   DeleteDiskHttpRequest request = DeleteDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .build();
    *   ApiFuture<Operation> future = diskClient.deleteDiskCallable().futureCall(request);
    *   // Do something
@@ -575,9 +575,9 @@ public final Disk getDisk(String disk) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskName disk = ProjectZoneDiskName.of("[PROJECT]", "[ZONE]", "[DISK]");
+   *   String formattedDisk = ProjectZoneDiskName.format("[PROJECT]", "[ZONE]", "[DISK]");
    *   GetDiskHttpRequest request = GetDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .build();
    *   Disk response = diskClient.getDisk(request);
    * }
@@ -600,9 +600,9 @@ public final Disk getDisk(GetDiskHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskName disk = ProjectZoneDiskName.of("[PROJECT]", "[ZONE]", "[DISK]");
+   *   String formattedDisk = ProjectZoneDiskName.format("[PROJECT]", "[ZONE]", "[DISK]");
    *   GetDiskHttpRequest request = GetDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .build();
    *   ApiFuture<Disk> future = diskClient.getDiskCallable().futureCall(request);
    *   // Do something
@@ -676,9 +676,9 @@ public final Policy getIamPolicyDisk(String resource) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneDiskResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   GetIamPolicyDiskHttpRequest request = GetIamPolicyDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = diskClient.getIamPolicyDisk(request);
    * }
@@ -701,9 +701,9 @@ public final Policy getIamPolicyDisk(GetIamPolicyDiskHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneDiskResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   GetIamPolicyDiskHttpRequest request = GetIamPolicyDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = diskClient.getIamPolicyDiskCallable().futureCall(request);
    *   // Do something
@@ -790,10 +790,10 @@ public final Operation insertDisk(String zone, Disk diskResource) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Disk diskResource = Disk.newBuilder().build();
    *   InsertDiskHttpRequest request = InsertDiskHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setDiskResource(diskResource)
    *     .build();
    *   Operation response = diskClient.insertDisk(request);
@@ -819,10 +819,10 @@ public final Operation insertDisk(InsertDiskHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Disk diskResource = Disk.newBuilder().build();
    *   InsertDiskHttpRequest request = InsertDiskHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setDiskResource(diskResource)
    *     .build();
    *   ApiFuture<Operation> future = diskClient.insertDiskCallable().futureCall(request);
@@ -893,9 +893,9 @@ public final ListDisksPagedResponse listDisks(String zone) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListDisksHttpRequest request = ListDisksHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (Disk element : diskClient.listDisks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -919,9 +919,9 @@ public final ListDisksPagedResponse listDisks(ListDisksHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListDisksHttpRequest request = ListDisksHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListDisksPagedResponse> future = diskClient.listDisksPagedCallable().futureCall(request);
    *   // Do something
@@ -945,9 +945,9 @@ public final ListDisksPagedResponse listDisks(ListDisksHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListDisksHttpRequest request = ListDisksHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     DiskList response = diskClient.listDisksCallable().call(request);
@@ -1036,10 +1036,10 @@ public final Operation resizeDisk(String disk, DisksResizeRequest disksResizeReq
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskName disk = ProjectZoneDiskName.of("[PROJECT]", "[ZONE]", "[DISK]");
+   *   String formattedDisk = ProjectZoneDiskName.format("[PROJECT]", "[ZONE]", "[DISK]");
    *   DisksResizeRequest disksResizeRequestResource = DisksResizeRequest.newBuilder().build();
    *   ResizeDiskHttpRequest request = ResizeDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .setDisksResizeRequestResource(disksResizeRequestResource)
    *     .build();
    *   Operation response = diskClient.resizeDisk(request);
@@ -1062,10 +1062,10 @@ public final Operation resizeDisk(ResizeDiskHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskName disk = ProjectZoneDiskName.of("[PROJECT]", "[ZONE]", "[DISK]");
+   *   String formattedDisk = ProjectZoneDiskName.format("[PROJECT]", "[ZONE]", "[DISK]");
    *   DisksResizeRequest disksResizeRequestResource = DisksResizeRequest.newBuilder().build();
    *   ResizeDiskHttpRequest request = ResizeDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .setDisksResizeRequestResource(disksResizeRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = diskClient.resizeDiskCallable().futureCall(request);
@@ -1147,10 +1147,10 @@ public final Policy setIamPolicyDisk(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneDiskResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyDiskHttpRequest request = SetIamPolicyDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setZoneSetPolicyRequestResource(zoneSetPolicyRequestResource)
    *     .build();
    *   Policy response = diskClient.setIamPolicyDisk(request);
@@ -1173,10 +1173,10 @@ public final Policy setIamPolicyDisk(SetIamPolicyDiskHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneDiskResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyDiskHttpRequest request = SetIamPolicyDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setZoneSetPolicyRequestResource(zoneSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = diskClient.setIamPolicyDiskCallable().futureCall(request);
@@ -1261,10 +1261,10 @@ public final Operation setLabelsDisk(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneDiskResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   ZoneSetLabelsRequest zoneSetLabelsRequestResource = ZoneSetLabelsRequest.newBuilder().build();
    *   SetLabelsDiskHttpRequest request = SetLabelsDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setZoneSetLabelsRequestResource(zoneSetLabelsRequestResource)
    *     .build();
    *   Operation response = diskClient.setLabelsDisk(request);
@@ -1288,10 +1288,10 @@ public final Operation setLabelsDisk(SetLabelsDiskHttpRequest request) {
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneDiskResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   ZoneSetLabelsRequest zoneSetLabelsRequestResource = ZoneSetLabelsRequest.newBuilder().build();
    *   SetLabelsDiskHttpRequest request = SetLabelsDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setZoneSetLabelsRequestResource(zoneSetLabelsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = diskClient.setLabelsDiskCallable().futureCall(request);
@@ -1373,10 +1373,10 @@ public final TestPermissionsResponse testIamPermissionsDisk(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneDiskResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsDiskHttpRequest request = TestIamPermissionsDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = diskClient.testIamPermissionsDisk(request);
@@ -1400,10 +1400,10 @@ public final TestPermissionsResponse testIamPermissionsDisk(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
-   *   ProjectZoneDiskResourceName resource = ProjectZoneDiskResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneDiskResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsDiskHttpRequest request = TestIamPermissionsDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = diskClient.testIamPermissionsDiskCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskTypeClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskTypeClient.java
index 18e200e04447..f6c83ff5c4f0 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskTypeClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskTypeClient.java
@@ -211,9 +211,9 @@ public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(String
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDiskTypesHttpRequest request = AggregatedListDiskTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (DiskTypesScopedList element : diskTypeClient.aggregatedListDiskTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -238,9 +238,9 @@ public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDiskTypesHttpRequest request = AggregatedListDiskTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListDiskTypesPagedResponse> future = diskTypeClient.aggregatedListDiskTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -265,9 +265,9 @@ public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDiskTypesHttpRequest request = AggregatedListDiskTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     DiskTypeAggregatedList response = diskTypeClient.aggregatedListDiskTypesCallable().call(request);
@@ -351,9 +351,9 @@ public final DiskType getDiskType(String diskType) {
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
-   *   ProjectZoneDiskTypeName diskType = ProjectZoneDiskTypeName.of("[PROJECT]", "[ZONE]", "[DISK_TYPE]");
+   *   String formattedDiskType = ProjectZoneDiskTypeName.format("[PROJECT]", "[ZONE]", "[DISK_TYPE]");
    *   GetDiskTypeHttpRequest request = GetDiskTypeHttpRequest.newBuilder()
-   *     .setDiskType(diskType.toString())
+   *     .setDiskType(formattedDiskType)
    *     .build();
    *   DiskType response = diskTypeClient.getDiskType(request);
    * }
@@ -376,9 +376,9 @@ public final DiskType getDiskType(GetDiskTypeHttpRequest request) {
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
-   *   ProjectZoneDiskTypeName diskType = ProjectZoneDiskTypeName.of("[PROJECT]", "[ZONE]", "[DISK_TYPE]");
+   *   String formattedDiskType = ProjectZoneDiskTypeName.format("[PROJECT]", "[ZONE]", "[DISK_TYPE]");
    *   GetDiskTypeHttpRequest request = GetDiskTypeHttpRequest.newBuilder()
-   *     .setDiskType(diskType.toString())
+   *     .setDiskType(formattedDiskType)
    *     .build();
    *   ApiFuture<DiskType> future = diskTypeClient.getDiskTypeCallable().futureCall(request);
    *   // Do something
@@ -450,9 +450,9 @@ public final ListDiskTypesPagedResponse listDiskTypes(String zone) {
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListDiskTypesHttpRequest request = ListDiskTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (DiskType element : diskTypeClient.listDiskTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -476,9 +476,9 @@ public final ListDiskTypesPagedResponse listDiskTypes(ListDiskTypesHttpRequest r
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListDiskTypesHttpRequest request = ListDiskTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListDiskTypesPagedResponse> future = diskTypeClient.listDiskTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -502,9 +502,9 @@ public final ListDiskTypesPagedResponse listDiskTypes(ListDiskTypesHttpRequest r
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListDiskTypesHttpRequest request = ListDiskTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     DiskTypeList response = diskTypeClient.listDiskTypesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallClient.java
index c820b36db818..4b6afe0e8ca4 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallClient.java
@@ -209,9 +209,9 @@ public final Operation deleteFirewall(String firewall) {
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]");
+   *   String formattedFirewall = ProjectGlobalFirewallName.format("[PROJECT]", "[FIREWALL]");
    *   DeleteFirewallHttpRequest request = DeleteFirewallHttpRequest.newBuilder()
-   *     .setFirewall(firewall.toString())
+   *     .setFirewall(formattedFirewall)
    *     .build();
    *   Operation response = firewallClient.deleteFirewall(request);
    * }
@@ -233,9 +233,9 @@ public final Operation deleteFirewall(DeleteFirewallHttpRequest request) {
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]");
+   *   String formattedFirewall = ProjectGlobalFirewallName.format("[PROJECT]", "[FIREWALL]");
    *   DeleteFirewallHttpRequest request = DeleteFirewallHttpRequest.newBuilder()
-   *     .setFirewall(firewall.toString())
+   *     .setFirewall(formattedFirewall)
    *     .build();
    *   ApiFuture<Operation> future = firewallClient.deleteFirewallCallable().futureCall(request);
    *   // Do something
@@ -306,9 +306,9 @@ public final Firewall getFirewall(String firewall) {
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]");
+   *   String formattedFirewall = ProjectGlobalFirewallName.format("[PROJECT]", "[FIREWALL]");
    *   GetFirewallHttpRequest request = GetFirewallHttpRequest.newBuilder()
-   *     .setFirewall(firewall.toString())
+   *     .setFirewall(formattedFirewall)
    *     .build();
    *   Firewall response = firewallClient.getFirewall(request);
    * }
@@ -330,9 +330,9 @@ public final Firewall getFirewall(GetFirewallHttpRequest request) {
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]");
+   *   String formattedFirewall = ProjectGlobalFirewallName.format("[PROJECT]", "[FIREWALL]");
    *   GetFirewallHttpRequest request = GetFirewallHttpRequest.newBuilder()
-   *     .setFirewall(firewall.toString())
+   *     .setFirewall(formattedFirewall)
    *     .build();
    *   ApiFuture<Firewall> future = firewallClient.getFirewallCallable().futureCall(request);
    *   // Do something
@@ -411,10 +411,10 @@ public final Operation insertFirewall(String project, Firewall firewallResource)
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Firewall firewallResource = Firewall.newBuilder().build();
    *   InsertFirewallHttpRequest request = InsertFirewallHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setFirewallResource(firewallResource)
    *     .build();
    *   Operation response = firewallClient.insertFirewall(request);
@@ -437,10 +437,10 @@ public final Operation insertFirewall(InsertFirewallHttpRequest request) {
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Firewall firewallResource = Firewall.newBuilder().build();
    *   InsertFirewallHttpRequest request = InsertFirewallHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setFirewallResource(firewallResource)
    *     .build();
    *   ApiFuture<Operation> future = firewallClient.insertFirewallCallable().futureCall(request);
@@ -514,9 +514,9 @@ public final ListFirewallsPagedResponse listFirewalls(String project) {
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListFirewallsHttpRequest request = ListFirewallsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Firewall element : firewallClient.listFirewalls(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -540,9 +540,9 @@ public final ListFirewallsPagedResponse listFirewalls(ListFirewallsHttpRequest r
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListFirewallsHttpRequest request = ListFirewallsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListFirewallsPagedResponse> future = firewallClient.listFirewallsPagedCallable().futureCall(request);
    *   // Do something
@@ -566,9 +566,9 @@ public final ListFirewallsPagedResponse listFirewalls(ListFirewallsHttpRequest r
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListFirewallsHttpRequest request = ListFirewallsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     FirewallList response = firewallClient.listFirewallsCallable().call(request);
@@ -673,11 +673,11 @@ public final Operation patchFirewall(
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]");
+   *   String formattedFirewall = ProjectGlobalFirewallName.format("[PROJECT]", "[FIREWALL]");
    *   Firewall firewallResource = Firewall.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchFirewallHttpRequest request = PatchFirewallHttpRequest.newBuilder()
-   *     .setFirewall(firewall.toString())
+   *     .setFirewall(formattedFirewall)
    *     .setFirewallResource(firewallResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -702,11 +702,11 @@ public final Operation patchFirewall(PatchFirewallHttpRequest request) {
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]");
+   *   String formattedFirewall = ProjectGlobalFirewallName.format("[PROJECT]", "[FIREWALL]");
    *   Firewall firewallResource = Firewall.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchFirewallHttpRequest request = PatchFirewallHttpRequest.newBuilder()
-   *     .setFirewall(firewall.toString())
+   *     .setFirewall(formattedFirewall)
    *     .setFirewallResource(firewallResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -807,11 +807,11 @@ public final Operation updateFirewall(
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]");
+   *   String formattedFirewall = ProjectGlobalFirewallName.format("[PROJECT]", "[FIREWALL]");
    *   Firewall firewallResource = Firewall.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateFirewallHttpRequest request = UpdateFirewallHttpRequest.newBuilder()
-   *     .setFirewall(firewall.toString())
+   *     .setFirewall(formattedFirewall)
    *     .setFirewallResource(firewallResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -837,11 +837,11 @@ public final Operation updateFirewall(UpdateFirewallHttpRequest request) {
    *
    * 

    * try (FirewallClient firewallClient = FirewallClient.create()) {
-   *   ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]");
+   *   String formattedFirewall = ProjectGlobalFirewallName.format("[PROJECT]", "[FIREWALL]");
    *   Firewall firewallResource = Firewall.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateFirewallHttpRequest request = UpdateFirewallHttpRequest.newBuilder()
-   *     .setFirewall(firewall.toString())
+   *     .setFirewall(formattedFirewall)
    *     .setFirewallResource(firewallResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRuleClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRuleClient.java
index 05cf9a616d1c..c7ab57d39fe9 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRuleClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRuleClient.java
@@ -215,9 +215,9 @@ public final AggregatedListForwardingRulesPagedResponse aggregatedListForwarding
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListForwardingRulesHttpRequest request = AggregatedListForwardingRulesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (ForwardingRulesScopedList element : forwardingRuleClient.aggregatedListForwardingRules(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -242,9 +242,9 @@ public final AggregatedListForwardingRulesPagedResponse aggregatedListForwarding
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListForwardingRulesHttpRequest request = AggregatedListForwardingRulesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListForwardingRulesPagedResponse> future = forwardingRuleClient.aggregatedListForwardingRulesPagedCallable().futureCall(request);
    *   // Do something
@@ -269,9 +269,9 @@ public final AggregatedListForwardingRulesPagedResponse aggregatedListForwarding
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListForwardingRulesHttpRequest request = AggregatedListForwardingRulesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     ForwardingRuleAggregatedList response = forwardingRuleClient.aggregatedListForwardingRulesCallable().call(request);
@@ -352,9 +352,9 @@ public final Operation deleteForwardingRule(String forwardingRule) {
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionForwardingRuleName forwardingRule = ProjectRegionForwardingRuleName.of("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectRegionForwardingRuleName.format("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
    *   DeleteForwardingRuleHttpRequest request = DeleteForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .build();
    *   Operation response = forwardingRuleClient.deleteForwardingRule(request);
    * }
@@ -376,9 +376,9 @@ public final Operation deleteForwardingRule(DeleteForwardingRuleHttpRequest requ
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionForwardingRuleName forwardingRule = ProjectRegionForwardingRuleName.of("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectRegionForwardingRuleName.format("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
    *   DeleteForwardingRuleHttpRequest request = DeleteForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .build();
    *   ApiFuture<Operation> future = forwardingRuleClient.deleteForwardingRuleCallable().futureCall(request);
    *   // Do something
@@ -450,9 +450,9 @@ public final ForwardingRule getForwardingRule(String forwardingRule) {
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionForwardingRuleName forwardingRule = ProjectRegionForwardingRuleName.of("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectRegionForwardingRuleName.format("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
    *   GetForwardingRuleHttpRequest request = GetForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .build();
    *   ForwardingRule response = forwardingRuleClient.getForwardingRule(request);
    * }
@@ -474,9 +474,9 @@ public final ForwardingRule getForwardingRule(GetForwardingRuleHttpRequest reque
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionForwardingRuleName forwardingRule = ProjectRegionForwardingRuleName.of("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectRegionForwardingRuleName.format("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
    *   GetForwardingRuleHttpRequest request = GetForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .build();
    *   ApiFuture<ForwardingRule> future = forwardingRuleClient.getForwardingRuleCallable().futureCall(request);
    *   // Do something
@@ -571,10 +571,10 @@ public final Operation insertForwardingRule(
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ForwardingRule forwardingRuleResource = ForwardingRule.newBuilder().build();
    *   InsertForwardingRuleHttpRequest request = InsertForwardingRuleHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setForwardingRuleResource(forwardingRuleResource)
    *     .build();
    *   Operation response = forwardingRuleClient.insertForwardingRule(request);
@@ -598,10 +598,10 @@ public final Operation insertForwardingRule(InsertForwardingRuleHttpRequest requ
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ForwardingRule forwardingRuleResource = ForwardingRule.newBuilder().build();
    *   InsertForwardingRuleHttpRequest request = InsertForwardingRuleHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setForwardingRuleResource(forwardingRuleResource)
    *     .build();
    *   ApiFuture<Operation> future = forwardingRuleClient.insertForwardingRuleCallable().futureCall(request);
@@ -676,9 +676,9 @@ public final ListForwardingRulesPagedResponse listForwardingRules(String region)
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListForwardingRulesHttpRequest request = ListForwardingRulesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (ForwardingRule element : forwardingRuleClient.listForwardingRules(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -703,9 +703,9 @@ public final ListForwardingRulesPagedResponse listForwardingRules(
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListForwardingRulesHttpRequest request = ListForwardingRulesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListForwardingRulesPagedResponse> future = forwardingRuleClient.listForwardingRulesPagedCallable().futureCall(request);
    *   // Do something
@@ -729,9 +729,9 @@ public final ListForwardingRulesPagedResponse listForwardingRules(
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListForwardingRulesHttpRequest request = ListForwardingRulesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     ForwardingRuleList response = forwardingRuleClient.listForwardingRulesCallable().call(request);
@@ -825,10 +825,10 @@ public final Operation setTargetForwardingRule(
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionForwardingRuleName forwardingRule = ProjectRegionForwardingRuleName.of("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectRegionForwardingRuleName.format("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
    *   TargetReference targetReferenceResource = TargetReference.newBuilder().build();
    *   SetTargetForwardingRuleHttpRequest request = SetTargetForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .setTargetReferenceResource(targetReferenceResource)
    *     .build();
    *   Operation response = forwardingRuleClient.setTargetForwardingRule(request);
@@ -852,10 +852,10 @@ public final Operation setTargetForwardingRule(SetTargetForwardingRuleHttpReques
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
-   *   ProjectRegionForwardingRuleName forwardingRule = ProjectRegionForwardingRuleName.of("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectRegionForwardingRuleName.format("[PROJECT]", "[REGION]", "[FORWARDING_RULE]");
    *   TargetReference targetReferenceResource = TargetReference.newBuilder().build();
    *   SetTargetForwardingRuleHttpRequest request = SetTargetForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .setTargetReferenceResource(targetReferenceResource)
    *     .build();
    *   ApiFuture<Operation> future = forwardingRuleClient.setTargetForwardingRuleCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRuleReference.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRuleReference.java
new file mode 100644
index 000000000000..555b46d60989
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ForwardingRuleReference.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+public final class ForwardingRuleReference implements ApiMessage {
+  private final String forwardingRule;
+
+  private ForwardingRuleReference() {
+    this.forwardingRule = null;
+  }
+
+  private ForwardingRuleReference(String forwardingRule) {
+    this.forwardingRule = forwardingRule;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("forwardingRule".equals(fieldName)) {
+      return forwardingRule;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  public String getForwardingRule() {
+    return forwardingRule;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(ForwardingRuleReference prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static ForwardingRuleReference getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final ForwardingRuleReference DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new ForwardingRuleReference();
+  }
+
+  public static class Builder {
+    private String forwardingRule;
+
+    Builder() {}
+
+    public Builder mergeFrom(ForwardingRuleReference other) {
+      if (other == ForwardingRuleReference.getDefaultInstance()) return this;
+      if (other.getForwardingRule() != null) {
+        this.forwardingRule = other.forwardingRule;
+      }
+      return this;
+    }
+
+    Builder(ForwardingRuleReference source) {
+      this.forwardingRule = source.forwardingRule;
+    }
+
+    public String getForwardingRule() {
+      return forwardingRule;
+    }
+
+    public Builder setForwardingRule(String forwardingRule) {
+      this.forwardingRule = forwardingRule;
+      return this;
+    }
+
+    public ForwardingRuleReference build() {
+      return new ForwardingRuleReference(forwardingRule);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setForwardingRule(this.forwardingRule);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "ForwardingRuleReference{" + "forwardingRule=" + forwardingRule + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof ForwardingRuleReference) {
+      ForwardingRuleReference that = (ForwardingRuleReference) o;
+      return Objects.equals(this.forwardingRule, that.getForwardingRule());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(forwardingRule);
+  }
+}
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GetNetworkEndpointGroupHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GetNetworkEndpointGroupHttpRequest.java
new file mode 100644
index 000000000000..16062d9c4121
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GetNetworkEndpointGroupHttpRequest.java
@@ -0,0 +1,429 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.networkEndpointGroups.get. Returns the specified network
+ * endpoint group. Gets a list of available network endpoint groups by making a list() request.
+ */
+public final class GetNetworkEndpointGroupHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String key;
+  private final String networkEndpointGroup;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String userIp;
+
+  private GetNetworkEndpointGroupHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.key = null;
+    this.networkEndpointGroup = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.userIp = null;
+  }
+
+  private GetNetworkEndpointGroupHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String key,
+      String networkEndpointGroup,
+      String prettyPrint,
+      String quotaUser,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.key = key;
+    this.networkEndpointGroup = networkEndpointGroup;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("networkEndpointGroup".equals(fieldName)) {
+      return networkEndpointGroup;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * The name of the network endpoint group. It should comply with RFC1035. It must have the format
+   * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}`.
+   * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+   * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+   * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+   * in length, and it * must not start with \`"goog"\`.
+   */
+  public String getNetworkEndpointGroup() {
+    return networkEndpointGroup;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /** IP address of the end user for whom the API call is being made. */
+  public String getUserIp() {
+    return userIp;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(GetNetworkEndpointGroupHttpRequest prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static GetNetworkEndpointGroupHttpRequest getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final GetNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new GetNetworkEndpointGroupHttpRequest();
+  }
+
+  public static class Builder {
+    private String access_token;
+    private String callback;
+    private String fields;
+    private String key;
+    private String networkEndpointGroup;
+    private String prettyPrint;
+    private String quotaUser;
+    private String userIp;
+
+    Builder() {}
+
+    public Builder mergeFrom(GetNetworkEndpointGroupHttpRequest other) {
+      if (other == GetNetworkEndpointGroupHttpRequest.getDefaultInstance()) return this;
+      if (other.getAccessToken() != null) {
+        this.access_token = other.access_token;
+      }
+      if (other.getCallback() != null) {
+        this.callback = other.callback;
+      }
+      if (other.getFields() != null) {
+        this.fields = other.fields;
+      }
+      if (other.getKey() != null) {
+        this.key = other.key;
+      }
+      if (other.getNetworkEndpointGroup() != null) {
+        this.networkEndpointGroup = other.networkEndpointGroup;
+      }
+      if (other.getPrettyPrint() != null) {
+        this.prettyPrint = other.prettyPrint;
+      }
+      if (other.getQuotaUser() != null) {
+        this.quotaUser = other.quotaUser;
+      }
+      if (other.getUserIp() != null) {
+        this.userIp = other.userIp;
+      }
+      return this;
+    }
+
+    Builder(GetNetworkEndpointGroupHttpRequest source) {
+      this.access_token = source.access_token;
+      this.callback = source.callback;
+      this.fields = source.fields;
+      this.key = source.key;
+      this.networkEndpointGroup = source.networkEndpointGroup;
+      this.prettyPrint = source.prettyPrint;
+      this.quotaUser = source.quotaUser;
+      this.userIp = source.userIp;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public String getAccessToken() {
+      return access_token;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public Builder setAccessToken(String access_token) {
+      this.access_token = access_token;
+      return this;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public String getCallback() {
+      return callback;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public Builder setCallback(String callback) {
+      this.callback = callback;
+      return this;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public String getFields() {
+      return fields;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public Builder setFields(String fields) {
+      this.fields = fields;
+      return this;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public String getKey() {
+      return key;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public Builder setKey(String key) {
+      this.key = key;
+      return this;
+    }
+
+    /**
+     * The name of the network endpoint group. It should comply with RFC1035. It must have the
+     * format `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}`.
+     * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+     * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+     * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+     * in length, and it * must not start with \`"goog"\`.
+     */
+    public String getNetworkEndpointGroup() {
+      return networkEndpointGroup;
+    }
+
+    /**
+     * The name of the network endpoint group. It should comply with RFC1035. It must have the
+     * format `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}`.
+     * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+     * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+     * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+     * in length, and it * must not start with \`"goog"\`.
+     */
+    public Builder setNetworkEndpointGroup(String networkEndpointGroup) {
+      this.networkEndpointGroup = networkEndpointGroup;
+      return this;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public String getPrettyPrint() {
+      return prettyPrint;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public Builder setPrettyPrint(String prettyPrint) {
+      this.prettyPrint = prettyPrint;
+      return this;
+    }
+
+    /** Alternative to userIp. */
+    public String getQuotaUser() {
+      return quotaUser;
+    }
+
+    /** Alternative to userIp. */
+    public Builder setQuotaUser(String quotaUser) {
+      this.quotaUser = quotaUser;
+      return this;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public String getUserIp() {
+      return userIp;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public Builder setUserIp(String userIp) {
+      this.userIp = userIp;
+      return this;
+    }
+
+    public GetNetworkEndpointGroupHttpRequest build() {
+      String missing = "";
+
+      if (networkEndpointGroup == null) {
+        missing += " networkEndpointGroup";
+      }
+
+      if (!missing.isEmpty()) {
+        throw new IllegalStateException("Missing required properties:" + missing);
+      }
+      return new GetNetworkEndpointGroupHttpRequest(
+          access_token,
+          callback,
+          fields,
+          key,
+          networkEndpointGroup,
+          prettyPrint,
+          quotaUser,
+          userIp);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setAccessToken(this.access_token);
+      newBuilder.setCallback(this.callback);
+      newBuilder.setFields(this.fields);
+      newBuilder.setKey(this.key);
+      newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup);
+      newBuilder.setPrettyPrint(this.prettyPrint);
+      newBuilder.setQuotaUser(this.quotaUser);
+      newBuilder.setUserIp(this.userIp);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "GetNetworkEndpointGroupHttpRequest{"
+        + "access_token="
+        + access_token
+        + ", "
+        + "callback="
+        + callback
+        + ", "
+        + "fields="
+        + fields
+        + ", "
+        + "key="
+        + key
+        + ", "
+        + "networkEndpointGroup="
+        + networkEndpointGroup
+        + ", "
+        + "prettyPrint="
+        + prettyPrint
+        + ", "
+        + "quotaUser="
+        + quotaUser
+        + ", "
+        + "userIp="
+        + userIp
+        + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof GetNetworkEndpointGroupHttpRequest) {
+      GetNetworkEndpointGroupHttpRequest that = (GetNetworkEndpointGroupHttpRequest) o;
+      return Objects.equals(this.access_token, that.getAccessToken())
+          && Objects.equals(this.callback, that.getCallback())
+          && Objects.equals(this.fields, that.getFields())
+          && Objects.equals(this.key, that.getKey())
+          && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup())
+          && Objects.equals(this.prettyPrint, that.getPrettyPrint())
+          && Objects.equals(this.quotaUser, that.getQuotaUser())
+          && Objects.equals(this.userIp, that.getUserIp());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(
+        access_token, callback, fields, key, networkEndpointGroup, prettyPrint, quotaUser, userIp);
+  }
+}
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GetShieldedInstanceIdentityInstanceHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GetShieldedInstanceIdentityInstanceHttpRequest.java
new file mode 100644
index 000000000000..b8e02dece9ff
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GetShieldedInstanceIdentityInstanceHttpRequest.java
@@ -0,0 +1,423 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.instances.getShieldedInstanceIdentity. Returns the Shielded
+ * Instance Identity of an instance
+ */
+public final class GetShieldedInstanceIdentityInstanceHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String instance;
+  private final String key;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String userIp;
+
+  private GetShieldedInstanceIdentityInstanceHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.instance = null;
+    this.key = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.userIp = null;
+  }
+
+  private GetShieldedInstanceIdentityInstanceHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String instance,
+      String key,
+      String prettyPrint,
+      String quotaUser,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.instance = instance;
+    this.key = key;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("instance".equals(fieldName)) {
+      return instance;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /**
+   * Name or id of the instance scoping this request. It must have the format
+   * `{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity`. \`{instance}\` must
+   * start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes
+   * (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent
+   * * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not
+   * start with \`"goog"\`.
+   */
+  public String getInstance() {
+    return instance;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /** IP address of the end user for whom the API call is being made. */
+  public String getUserIp() {
+    return userIp;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(GetShieldedInstanceIdentityInstanceHttpRequest prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static GetShieldedInstanceIdentityInstanceHttpRequest getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final GetShieldedInstanceIdentityInstanceHttpRequest DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new GetShieldedInstanceIdentityInstanceHttpRequest();
+  }
+
+  public static class Builder {
+    private String access_token;
+    private String callback;
+    private String fields;
+    private String instance;
+    private String key;
+    private String prettyPrint;
+    private String quotaUser;
+    private String userIp;
+
+    Builder() {}
+
+    public Builder mergeFrom(GetShieldedInstanceIdentityInstanceHttpRequest other) {
+      if (other == GetShieldedInstanceIdentityInstanceHttpRequest.getDefaultInstance()) return this;
+      if (other.getAccessToken() != null) {
+        this.access_token = other.access_token;
+      }
+      if (other.getCallback() != null) {
+        this.callback = other.callback;
+      }
+      if (other.getFields() != null) {
+        this.fields = other.fields;
+      }
+      if (other.getInstance() != null) {
+        this.instance = other.instance;
+      }
+      if (other.getKey() != null) {
+        this.key = other.key;
+      }
+      if (other.getPrettyPrint() != null) {
+        this.prettyPrint = other.prettyPrint;
+      }
+      if (other.getQuotaUser() != null) {
+        this.quotaUser = other.quotaUser;
+      }
+      if (other.getUserIp() != null) {
+        this.userIp = other.userIp;
+      }
+      return this;
+    }
+
+    Builder(GetShieldedInstanceIdentityInstanceHttpRequest source) {
+      this.access_token = source.access_token;
+      this.callback = source.callback;
+      this.fields = source.fields;
+      this.instance = source.instance;
+      this.key = source.key;
+      this.prettyPrint = source.prettyPrint;
+      this.quotaUser = source.quotaUser;
+      this.userIp = source.userIp;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public String getAccessToken() {
+      return access_token;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public Builder setAccessToken(String access_token) {
+      this.access_token = access_token;
+      return this;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public String getCallback() {
+      return callback;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public Builder setCallback(String callback) {
+      this.callback = callback;
+      return this;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public String getFields() {
+      return fields;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public Builder setFields(String fields) {
+      this.fields = fields;
+      return this;
+    }
+
+    /**
+     * Name or id of the instance scoping this request. It must have the format
+     * `{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity`. \`{instance}\`
+     * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`),
+     * dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or
+     * percent * signs (\`%\`). It must be between 3 and 255 characters in length, and it *
+     * must not start with \`"goog"\`.
+     */
+    public String getInstance() {
+      return instance;
+    }
+
+    /**
+     * Name or id of the instance scoping this request. It must have the format
+     * `{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity`. \`{instance}\`
+     * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`),
+     * dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or
+     * percent * signs (\`%\`). It must be between 3 and 255 characters in length, and it *
+     * must not start with \`"goog"\`.
+     */
+    public Builder setInstance(String instance) {
+      this.instance = instance;
+      return this;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public String getKey() {
+      return key;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public Builder setKey(String key) {
+      this.key = key;
+      return this;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public String getPrettyPrint() {
+      return prettyPrint;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public Builder setPrettyPrint(String prettyPrint) {
+      this.prettyPrint = prettyPrint;
+      return this;
+    }
+
+    /** Alternative to userIp. */
+    public String getQuotaUser() {
+      return quotaUser;
+    }
+
+    /** Alternative to userIp. */
+    public Builder setQuotaUser(String quotaUser) {
+      this.quotaUser = quotaUser;
+      return this;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public String getUserIp() {
+      return userIp;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public Builder setUserIp(String userIp) {
+      this.userIp = userIp;
+      return this;
+    }
+
+    public GetShieldedInstanceIdentityInstanceHttpRequest build() {
+      String missing = "";
+
+      if (instance == null) {
+        missing += " instance";
+      }
+
+      if (!missing.isEmpty()) {
+        throw new IllegalStateException("Missing required properties:" + missing);
+      }
+      return new GetShieldedInstanceIdentityInstanceHttpRequest(
+          access_token, callback, fields, instance, key, prettyPrint, quotaUser, userIp);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setAccessToken(this.access_token);
+      newBuilder.setCallback(this.callback);
+      newBuilder.setFields(this.fields);
+      newBuilder.setInstance(this.instance);
+      newBuilder.setKey(this.key);
+      newBuilder.setPrettyPrint(this.prettyPrint);
+      newBuilder.setQuotaUser(this.quotaUser);
+      newBuilder.setUserIp(this.userIp);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "GetShieldedInstanceIdentityInstanceHttpRequest{"
+        + "access_token="
+        + access_token
+        + ", "
+        + "callback="
+        + callback
+        + ", "
+        + "fields="
+        + fields
+        + ", "
+        + "instance="
+        + instance
+        + ", "
+        + "key="
+        + key
+        + ", "
+        + "prettyPrint="
+        + prettyPrint
+        + ", "
+        + "quotaUser="
+        + quotaUser
+        + ", "
+        + "userIp="
+        + userIp
+        + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof GetShieldedInstanceIdentityInstanceHttpRequest) {
+      GetShieldedInstanceIdentityInstanceHttpRequest that =
+          (GetShieldedInstanceIdentityInstanceHttpRequest) o;
+      return Objects.equals(this.access_token, that.getAccessToken())
+          && Objects.equals(this.callback, that.getCallback())
+          && Objects.equals(this.fields, that.getFields())
+          && Objects.equals(this.instance, that.getInstance())
+          && Objects.equals(this.key, that.getKey())
+          && Objects.equals(this.prettyPrint, that.getPrettyPrint())
+          && Objects.equals(this.quotaUser, that.getQuotaUser())
+          && Objects.equals(this.userIp, that.getUserIp());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(
+        access_token, callback, fields, instance, key, prettyPrint, quotaUser, userIp);
+  }
+}
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalAddressClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalAddressClient.java
index 0716cbdf7ba2..a7c175328f50 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalAddressClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalAddressClient.java
@@ -211,9 +211,9 @@ public final Operation deleteGlobalAddress(String address) {
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectGlobalAddressName address = ProjectGlobalAddressName.of("[PROJECT]", "[ADDRESS]");
+   *   String formattedAddress = ProjectGlobalAddressName.format("[PROJECT]", "[ADDRESS]");
    *   DeleteGlobalAddressHttpRequest request = DeleteGlobalAddressHttpRequest.newBuilder()
-   *     .setAddress(address.toString())
+   *     .setAddress(formattedAddress)
    *     .build();
    *   Operation response = globalAddressClient.deleteGlobalAddress(request);
    * }
@@ -235,9 +235,9 @@ public final Operation deleteGlobalAddress(DeleteGlobalAddressHttpRequest reques
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectGlobalAddressName address = ProjectGlobalAddressName.of("[PROJECT]", "[ADDRESS]");
+   *   String formattedAddress = ProjectGlobalAddressName.format("[PROJECT]", "[ADDRESS]");
    *   DeleteGlobalAddressHttpRequest request = DeleteGlobalAddressHttpRequest.newBuilder()
-   *     .setAddress(address.toString())
+   *     .setAddress(formattedAddress)
    *     .build();
    *   ApiFuture<Operation> future = globalAddressClient.deleteGlobalAddressCallable().futureCall(request);
    *   // Do something
@@ -312,9 +312,9 @@ public final Address getGlobalAddress(String address) {
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectGlobalAddressName address = ProjectGlobalAddressName.of("[PROJECT]", "[ADDRESS]");
+   *   String formattedAddress = ProjectGlobalAddressName.format("[PROJECT]", "[ADDRESS]");
    *   GetGlobalAddressHttpRequest request = GetGlobalAddressHttpRequest.newBuilder()
-   *     .setAddress(address.toString())
+   *     .setAddress(formattedAddress)
    *     .build();
    *   Address response = globalAddressClient.getGlobalAddress(request);
    * }
@@ -337,9 +337,9 @@ public final Address getGlobalAddress(GetGlobalAddressHttpRequest request) {
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectGlobalAddressName address = ProjectGlobalAddressName.of("[PROJECT]", "[ADDRESS]");
+   *   String formattedAddress = ProjectGlobalAddressName.format("[PROJECT]", "[ADDRESS]");
    *   GetGlobalAddressHttpRequest request = GetGlobalAddressHttpRequest.newBuilder()
-   *     .setAddress(address.toString())
+   *     .setAddress(formattedAddress)
    *     .build();
    *   ApiFuture<Address> future = globalAddressClient.getGlobalAddressCallable().futureCall(request);
    *   // Do something
@@ -422,10 +422,10 @@ public final Operation insertGlobalAddress(String project, Address addressResour
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Address addressResource = Address.newBuilder().build();
    *   InsertGlobalAddressHttpRequest request = InsertGlobalAddressHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setAddressResource(addressResource)
    *     .build();
    *   Operation response = globalAddressClient.insertGlobalAddress(request);
@@ -448,10 +448,10 @@ public final Operation insertGlobalAddress(InsertGlobalAddressHttpRequest reques
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Address addressResource = Address.newBuilder().build();
    *   InsertGlobalAddressHttpRequest request = InsertGlobalAddressHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setAddressResource(addressResource)
    *     .build();
    *   ApiFuture<Operation> future = globalAddressClient.insertGlobalAddressCallable().futureCall(request);
@@ -526,9 +526,9 @@ public final ListGlobalAddressesPagedResponse listGlobalAddresses(String project
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalAddressesHttpRequest request = ListGlobalAddressesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Address element : globalAddressClient.listGlobalAddresses(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -553,9 +553,9 @@ public final ListGlobalAddressesPagedResponse listGlobalAddresses(
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalAddressesHttpRequest request = ListGlobalAddressesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListGlobalAddressesPagedResponse> future = globalAddressClient.listGlobalAddressesPagedCallable().futureCall(request);
    *   // Do something
@@ -579,9 +579,9 @@ public final ListGlobalAddressesPagedResponse listGlobalAddresses(
    *
    * 

    * try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalAddressesHttpRequest request = ListGlobalAddressesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     AddressList response = globalAddressClient.listGlobalAddressesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalForwardingRuleClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalForwardingRuleClient.java
index 7708ee9c662d..f51a9415553a 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalForwardingRuleClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalForwardingRuleClient.java
@@ -215,9 +215,9 @@ public final Operation deleteGlobalForwardingRule(String forwardingRule) {
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectGlobalForwardingRuleName forwardingRule = ProjectGlobalForwardingRuleName.of("[PROJECT]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectGlobalForwardingRuleName.format("[PROJECT]", "[FORWARDING_RULE]");
    *   DeleteGlobalForwardingRuleHttpRequest request = DeleteGlobalForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .build();
    *   Operation response = globalForwardingRuleClient.deleteGlobalForwardingRule(request);
    * }
@@ -239,9 +239,9 @@ public final Operation deleteGlobalForwardingRule(DeleteGlobalForwardingRuleHttp
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectGlobalForwardingRuleName forwardingRule = ProjectGlobalForwardingRuleName.of("[PROJECT]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectGlobalForwardingRuleName.format("[PROJECT]", "[FORWARDING_RULE]");
    *   DeleteGlobalForwardingRuleHttpRequest request = DeleteGlobalForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .build();
    *   ApiFuture<Operation> future = globalForwardingRuleClient.deleteGlobalForwardingRuleCallable().futureCall(request);
    *   // Do something
@@ -317,9 +317,9 @@ public final ForwardingRule getGlobalForwardingRule(String forwardingRule) {
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectGlobalForwardingRuleName forwardingRule = ProjectGlobalForwardingRuleName.of("[PROJECT]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectGlobalForwardingRuleName.format("[PROJECT]", "[FORWARDING_RULE]");
    *   GetGlobalForwardingRuleHttpRequest request = GetGlobalForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .build();
    *   ForwardingRule response = globalForwardingRuleClient.getGlobalForwardingRule(request);
    * }
@@ -342,9 +342,9 @@ public final ForwardingRule getGlobalForwardingRule(GetGlobalForwardingRuleHttpR
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectGlobalForwardingRuleName forwardingRule = ProjectGlobalForwardingRuleName.of("[PROJECT]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectGlobalForwardingRuleName.format("[PROJECT]", "[FORWARDING_RULE]");
    *   GetGlobalForwardingRuleHttpRequest request = GetGlobalForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .build();
    *   ApiFuture<ForwardingRule> future = globalForwardingRuleClient.getGlobalForwardingRuleCallable().futureCall(request);
    *   // Do something
@@ -439,10 +439,10 @@ public final Operation insertGlobalForwardingRule(
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ForwardingRule forwardingRuleResource = ForwardingRule.newBuilder().build();
    *   InsertGlobalForwardingRuleHttpRequest request = InsertGlobalForwardingRuleHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setForwardingRuleResource(forwardingRuleResource)
    *     .build();
    *   Operation response = globalForwardingRuleClient.insertGlobalForwardingRule(request);
@@ -466,10 +466,10 @@ public final Operation insertGlobalForwardingRule(InsertGlobalForwardingRuleHttp
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ForwardingRule forwardingRuleResource = ForwardingRule.newBuilder().build();
    *   InsertGlobalForwardingRuleHttpRequest request = InsertGlobalForwardingRuleHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setForwardingRuleResource(forwardingRuleResource)
    *     .build();
    *   ApiFuture<Operation> future = globalForwardingRuleClient.insertGlobalForwardingRuleCallable().futureCall(request);
@@ -545,9 +545,9 @@ public final ListGlobalForwardingRulesPagedResponse listGlobalForwardingRules(St
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalForwardingRulesHttpRequest request = ListGlobalForwardingRulesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (ForwardingRule element : globalForwardingRuleClient.listGlobalForwardingRules(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -572,9 +572,9 @@ public final ListGlobalForwardingRulesPagedResponse listGlobalForwardingRules(
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalForwardingRulesHttpRequest request = ListGlobalForwardingRulesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListGlobalForwardingRulesPagedResponse> future = globalForwardingRuleClient.listGlobalForwardingRulesPagedCallable().futureCall(request);
    *   // Do something
@@ -599,9 +599,9 @@ public final ListGlobalForwardingRulesPagedResponse listGlobalForwardingRules(
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalForwardingRulesHttpRequest request = ListGlobalForwardingRulesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     ForwardingRuleList response = globalForwardingRuleClient.listGlobalForwardingRulesCallable().call(request);
@@ -695,10 +695,10 @@ public final Operation setTargetGlobalForwardingRule(
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectGlobalForwardingRuleName forwardingRule = ProjectGlobalForwardingRuleName.of("[PROJECT]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectGlobalForwardingRuleName.format("[PROJECT]", "[FORWARDING_RULE]");
    *   TargetReference targetReferenceResource = TargetReference.newBuilder().build();
    *   SetTargetGlobalForwardingRuleHttpRequest request = SetTargetGlobalForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .setTargetReferenceResource(targetReferenceResource)
    *     .build();
    *   Operation response = globalForwardingRuleClient.setTargetGlobalForwardingRule(request);
@@ -723,10 +723,10 @@ public final Operation setTargetGlobalForwardingRule(
    *
    * 

    * try (GlobalForwardingRuleClient globalForwardingRuleClient = GlobalForwardingRuleClient.create()) {
-   *   ProjectGlobalForwardingRuleName forwardingRule = ProjectGlobalForwardingRuleName.of("[PROJECT]", "[FORWARDING_RULE]");
+   *   String formattedForwardingRule = ProjectGlobalForwardingRuleName.format("[PROJECT]", "[FORWARDING_RULE]");
    *   TargetReference targetReferenceResource = TargetReference.newBuilder().build();
    *   SetTargetGlobalForwardingRuleHttpRequest request = SetTargetGlobalForwardingRuleHttpRequest.newBuilder()
-   *     .setForwardingRule(forwardingRule.toString())
+   *     .setForwardingRule(formattedForwardingRule)
    *     .setTargetReferenceResource(targetReferenceResource)
    *     .build();
    *   ApiFuture<Operation> future = globalForwardingRuleClient.setTargetGlobalForwardingRuleCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalOperationClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalOperationClient.java
index 59e97d9af274..286d8f5ae469 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalOperationClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalOperationClient.java
@@ -216,9 +216,9 @@ public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOpe
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListGlobalOperationsHttpRequest request = AggregatedListGlobalOperationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (OperationsScopedList element : globalOperationClient.aggregatedListGlobalOperations(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -243,9 +243,9 @@ public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOpe
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListGlobalOperationsHttpRequest request = AggregatedListGlobalOperationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListGlobalOperationsPagedResponse> future = globalOperationClient.aggregatedListGlobalOperationsPagedCallable().futureCall(request);
    *   // Do something
@@ -270,9 +270,9 @@ public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOpe
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListGlobalOperationsHttpRequest request = AggregatedListGlobalOperationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     OperationAggregatedList response = globalOperationClient.aggregatedListGlobalOperationsCallable().call(request);
@@ -353,9 +353,9 @@ public final void deleteGlobalOperation(String operation) {
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectGlobalOperationName operation = ProjectGlobalOperationName.of("[PROJECT]", "[OPERATION]");
+   *   String formattedOperation = ProjectGlobalOperationName.format("[PROJECT]", "[OPERATION]");
    *   DeleteGlobalOperationHttpRequest request = DeleteGlobalOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   globalOperationClient.deleteGlobalOperation(request);
    * }
@@ -377,9 +377,9 @@ public final void deleteGlobalOperation(DeleteGlobalOperationHttpRequest request
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectGlobalOperationName operation = ProjectGlobalOperationName.of("[PROJECT]", "[OPERATION]");
+   *   String formattedOperation = ProjectGlobalOperationName.format("[PROJECT]", "[OPERATION]");
    *   DeleteGlobalOperationHttpRequest request = DeleteGlobalOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   ApiFuture<Void> future = globalOperationClient.deleteGlobalOperationCallable().futureCall(request);
    *   // Do something
@@ -454,9 +454,9 @@ public final Operation getGlobalOperation(String operation) {
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectGlobalOperationName operation = ProjectGlobalOperationName.of("[PROJECT]", "[OPERATION]");
+   *   String formattedOperation = ProjectGlobalOperationName.format("[PROJECT]", "[OPERATION]");
    *   GetGlobalOperationHttpRequest request = GetGlobalOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   Operation response = globalOperationClient.getGlobalOperation(request);
    * }
@@ -479,9 +479,9 @@ public final Operation getGlobalOperation(GetGlobalOperationHttpRequest request)
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectGlobalOperationName operation = ProjectGlobalOperationName.of("[PROJECT]", "[OPERATION]");
+   *   String formattedOperation = ProjectGlobalOperationName.format("[PROJECT]", "[OPERATION]");
    *   GetGlobalOperationHttpRequest request = GetGlobalOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   ApiFuture<Operation> future = globalOperationClient.getGlobalOperationCallable().futureCall(request);
    *   // Do something
@@ -555,9 +555,9 @@ public final ListGlobalOperationsPagedResponse listGlobalOperations(String proje
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalOperationsHttpRequest request = ListGlobalOperationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Operation element : globalOperationClient.listGlobalOperations(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -582,9 +582,9 @@ public final ListGlobalOperationsPagedResponse listGlobalOperations(
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalOperationsHttpRequest request = ListGlobalOperationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListGlobalOperationsPagedResponse> future = globalOperationClient.listGlobalOperationsPagedCallable().futureCall(request);
    *   // Do something
@@ -608,9 +608,9 @@ public final ListGlobalOperationsPagedResponse listGlobalOperations(
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListGlobalOperationsHttpRequest request = ListGlobalOperationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     OperationList response = globalOperationClient.listGlobalOperationsCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java
index da6f30e54756..5f31778acb47 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java
@@ -210,9 +210,9 @@ public final Operation deleteHealthCheck(String healthCheck) {
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectGlobalHealthCheckName healthCheck = ProjectGlobalHealthCheckName.of("[PROJECT]", "[HEALTH_CHECK]");
+   *   String formattedHealthCheck = ProjectGlobalHealthCheckName.format("[PROJECT]", "[HEALTH_CHECK]");
    *   DeleteHealthCheckHttpRequest request = DeleteHealthCheckHttpRequest.newBuilder()
-   *     .setHealthCheck(healthCheck.toString())
+   *     .setHealthCheck(formattedHealthCheck)
    *     .build();
    *   Operation response = healthCheckClient.deleteHealthCheck(request);
    * }
@@ -234,9 +234,9 @@ public final Operation deleteHealthCheck(DeleteHealthCheckHttpRequest request) {
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectGlobalHealthCheckName healthCheck = ProjectGlobalHealthCheckName.of("[PROJECT]", "[HEALTH_CHECK]");
+   *   String formattedHealthCheck = ProjectGlobalHealthCheckName.format("[PROJECT]", "[HEALTH_CHECK]");
    *   DeleteHealthCheckHttpRequest request = DeleteHealthCheckHttpRequest.newBuilder()
-   *     .setHealthCheck(healthCheck.toString())
+   *     .setHealthCheck(formattedHealthCheck)
    *     .build();
    *   ApiFuture<Operation> future = healthCheckClient.deleteHealthCheckCallable().futureCall(request);
    *   // Do something
@@ -310,9 +310,9 @@ public final HealthCheck getHealthCheck(String healthCheck) {
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectGlobalHealthCheckName healthCheck = ProjectGlobalHealthCheckName.of("[PROJECT]", "[HEALTH_CHECK]");
+   *   String formattedHealthCheck = ProjectGlobalHealthCheckName.format("[PROJECT]", "[HEALTH_CHECK]");
    *   GetHealthCheckHttpRequest request = GetHealthCheckHttpRequest.newBuilder()
-   *     .setHealthCheck(healthCheck.toString())
+   *     .setHealthCheck(formattedHealthCheck)
    *     .build();
    *   HealthCheck response = healthCheckClient.getHealthCheck(request);
    * }
@@ -335,9 +335,9 @@ public final HealthCheck getHealthCheck(GetHealthCheckHttpRequest request) {
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectGlobalHealthCheckName healthCheck = ProjectGlobalHealthCheckName.of("[PROJECT]", "[HEALTH_CHECK]");
+   *   String formattedHealthCheck = ProjectGlobalHealthCheckName.format("[PROJECT]", "[HEALTH_CHECK]");
    *   GetHealthCheckHttpRequest request = GetHealthCheckHttpRequest.newBuilder()
-   *     .setHealthCheck(healthCheck.toString())
+   *     .setHealthCheck(formattedHealthCheck)
    *     .build();
    *   ApiFuture<HealthCheck> future = healthCheckClient.getHealthCheckCallable().futureCall(request);
    *   // Do something
@@ -420,10 +420,10 @@ public final Operation insertHealthCheck(String project, HealthCheck healthCheck
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   HealthCheck healthCheckResource = HealthCheck.newBuilder().build();
    *   InsertHealthCheckHttpRequest request = InsertHealthCheckHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setHealthCheckResource(healthCheckResource)
    *     .build();
    *   Operation response = healthCheckClient.insertHealthCheck(request);
@@ -446,10 +446,10 @@ public final Operation insertHealthCheck(InsertHealthCheckHttpRequest request) {
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   HealthCheck healthCheckResource = HealthCheck.newBuilder().build();
    *   InsertHealthCheckHttpRequest request = InsertHealthCheckHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setHealthCheckResource(healthCheckResource)
    *     .build();
    *   ApiFuture<Operation> future = healthCheckClient.insertHealthCheckCallable().futureCall(request);
@@ -523,9 +523,9 @@ public final ListHealthChecksPagedResponse listHealthChecks(String project) {
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHealthChecksHttpRequest request = ListHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (HealthCheck element : healthCheckClient.listHealthChecks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -549,9 +549,9 @@ public final ListHealthChecksPagedResponse listHealthChecks(ListHealthChecksHttp
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHealthChecksHttpRequest request = ListHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListHealthChecksPagedResponse> future = healthCheckClient.listHealthChecksPagedCallable().futureCall(request);
    *   // Do something
@@ -575,9 +575,9 @@ public final ListHealthChecksPagedResponse listHealthChecks(ListHealthChecksHttp
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHealthChecksHttpRequest request = ListHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     HealthCheckList response = healthCheckClient.listHealthChecksCallable().call(request);
@@ -689,11 +689,11 @@ public final Operation patchHealthCheck(
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectGlobalHealthCheckName healthCheck = ProjectGlobalHealthCheckName.of("[PROJECT]", "[HEALTH_CHECK]");
+   *   String formattedHealthCheck = ProjectGlobalHealthCheckName.format("[PROJECT]", "[HEALTH_CHECK]");
    *   HealthCheck healthCheckResource = HealthCheck.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchHealthCheckHttpRequest request = PatchHealthCheckHttpRequest.newBuilder()
-   *     .setHealthCheck(healthCheck.toString())
+   *     .setHealthCheck(formattedHealthCheck)
    *     .setHealthCheckResource(healthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -718,11 +718,11 @@ public final Operation patchHealthCheck(PatchHealthCheckHttpRequest request) {
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectGlobalHealthCheckName healthCheck = ProjectGlobalHealthCheckName.of("[PROJECT]", "[HEALTH_CHECK]");
+   *   String formattedHealthCheck = ProjectGlobalHealthCheckName.format("[PROJECT]", "[HEALTH_CHECK]");
    *   HealthCheck healthCheckResource = HealthCheck.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchHealthCheckHttpRequest request = PatchHealthCheckHttpRequest.newBuilder()
-   *     .setHealthCheck(healthCheck.toString())
+   *     .setHealthCheck(formattedHealthCheck)
    *     .setHealthCheckResource(healthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -823,11 +823,11 @@ public final Operation updateHealthCheck(
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectGlobalHealthCheckName healthCheck = ProjectGlobalHealthCheckName.of("[PROJECT]", "[HEALTH_CHECK]");
+   *   String formattedHealthCheck = ProjectGlobalHealthCheckName.format("[PROJECT]", "[HEALTH_CHECK]");
    *   HealthCheck healthCheckResource = HealthCheck.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateHealthCheckHttpRequest request = UpdateHealthCheckHttpRequest.newBuilder()
-   *     .setHealthCheck(healthCheck.toString())
+   *     .setHealthCheck(formattedHealthCheck)
    *     .setHealthCheckResource(healthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -851,11 +851,11 @@ public final Operation updateHealthCheck(UpdateHealthCheckHttpRequest request) {
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
-   *   ProjectGlobalHealthCheckName healthCheck = ProjectGlobalHealthCheckName.of("[PROJECT]", "[HEALTH_CHECK]");
+   *   String formattedHealthCheck = ProjectGlobalHealthCheckName.format("[PROJECT]", "[HEALTH_CHECK]");
    *   HealthCheck healthCheckResource = HealthCheck.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateHealthCheckHttpRequest request = UpdateHealthCheckHttpRequest.newBuilder()
-   *     .setHealthCheck(healthCheck.toString())
+   *     .setHealthCheck(formattedHealthCheck)
    *     .setHealthCheckResource(healthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java
new file mode 100644
index 000000000000..dcb8c317db86
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java
@@ -0,0 +1,256 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+public final class HealthStatusForNetworkEndpoint implements ApiMessage {
+  private final BackendServiceReference backendService;
+  private final ForwardingRuleReference forwardingRule;
+  private final HealthCheckReference healthCheck;
+  private final String healthState;
+
+  private HealthStatusForNetworkEndpoint() {
+    this.backendService = null;
+    this.forwardingRule = null;
+    this.healthCheck = null;
+    this.healthState = null;
+  }
+
+  private HealthStatusForNetworkEndpoint(
+      BackendServiceReference backendService,
+      ForwardingRuleReference forwardingRule,
+      HealthCheckReference healthCheck,
+      String healthState) {
+    this.backendService = backendService;
+    this.forwardingRule = forwardingRule;
+    this.healthCheck = healthCheck;
+    this.healthState = healthState;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("backendService".equals(fieldName)) {
+      return backendService;
+    }
+    if ("forwardingRule".equals(fieldName)) {
+      return forwardingRule;
+    }
+    if ("healthCheck".equals(fieldName)) {
+      return healthCheck;
+    }
+    if ("healthState".equals(fieldName)) {
+      return healthState;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** URL of the backend service associated with the health state of the network endpoint. */
+  public BackendServiceReference getBackendService() {
+    return backendService;
+  }
+
+  /** URL of the forwarding rule associated with the health state of the network endpoint. */
+  public ForwardingRuleReference getForwardingRule() {
+    return forwardingRule;
+  }
+
+  /** URL of the health check associated with the health state of the network endpoint. */
+  public HealthCheckReference getHealthCheck() {
+    return healthCheck;
+  }
+
+  /** Health state of the network endpoint determined based on the health checks configured. */
+  public String getHealthState() {
+    return healthState;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(HealthStatusForNetworkEndpoint prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static HealthStatusForNetworkEndpoint getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final HealthStatusForNetworkEndpoint DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new HealthStatusForNetworkEndpoint();
+  }
+
+  public static class Builder {
+    private BackendServiceReference backendService;
+    private ForwardingRuleReference forwardingRule;
+    private HealthCheckReference healthCheck;
+    private String healthState;
+
+    Builder() {}
+
+    public Builder mergeFrom(HealthStatusForNetworkEndpoint other) {
+      if (other == HealthStatusForNetworkEndpoint.getDefaultInstance()) return this;
+      if (other.getBackendService() != null) {
+        this.backendService = other.backendService;
+      }
+      if (other.getForwardingRule() != null) {
+        this.forwardingRule = other.forwardingRule;
+      }
+      if (other.getHealthCheck() != null) {
+        this.healthCheck = other.healthCheck;
+      }
+      if (other.getHealthState() != null) {
+        this.healthState = other.healthState;
+      }
+      return this;
+    }
+
+    Builder(HealthStatusForNetworkEndpoint source) {
+      this.backendService = source.backendService;
+      this.forwardingRule = source.forwardingRule;
+      this.healthCheck = source.healthCheck;
+      this.healthState = source.healthState;
+    }
+
+    /** URL of the backend service associated with the health state of the network endpoint. */
+    public BackendServiceReference getBackendService() {
+      return backendService;
+    }
+
+    /** URL of the backend service associated with the health state of the network endpoint. */
+    public Builder setBackendService(BackendServiceReference backendService) {
+      this.backendService = backendService;
+      return this;
+    }
+
+    /** URL of the forwarding rule associated with the health state of the network endpoint. */
+    public ForwardingRuleReference getForwardingRule() {
+      return forwardingRule;
+    }
+
+    /** URL of the forwarding rule associated with the health state of the network endpoint. */
+    public Builder setForwardingRule(ForwardingRuleReference forwardingRule) {
+      this.forwardingRule = forwardingRule;
+      return this;
+    }
+
+    /** URL of the health check associated with the health state of the network endpoint. */
+    public HealthCheckReference getHealthCheck() {
+      return healthCheck;
+    }
+
+    /** URL of the health check associated with the health state of the network endpoint. */
+    public Builder setHealthCheck(HealthCheckReference healthCheck) {
+      this.healthCheck = healthCheck;
+      return this;
+    }
+
+    /** Health state of the network endpoint determined based on the health checks configured. */
+    public String getHealthState() {
+      return healthState;
+    }
+
+    /** Health state of the network endpoint determined based on the health checks configured. */
+    public Builder setHealthState(String healthState) {
+      this.healthState = healthState;
+      return this;
+    }
+
+    public HealthStatusForNetworkEndpoint build() {
+
+      return new HealthStatusForNetworkEndpoint(
+          backendService, forwardingRule, healthCheck, healthState);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setBackendService(this.backendService);
+      newBuilder.setForwardingRule(this.forwardingRule);
+      newBuilder.setHealthCheck(this.healthCheck);
+      newBuilder.setHealthState(this.healthState);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "HealthStatusForNetworkEndpoint{"
+        + "backendService="
+        + backendService
+        + ", "
+        + "forwardingRule="
+        + forwardingRule
+        + ", "
+        + "healthCheck="
+        + healthCheck
+        + ", "
+        + "healthState="
+        + healthState
+        + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof HealthStatusForNetworkEndpoint) {
+      HealthStatusForNetworkEndpoint that = (HealthStatusForNetworkEndpoint) o;
+      return Objects.equals(this.backendService, that.getBackendService())
+          && Objects.equals(this.forwardingRule, that.getForwardingRule())
+          && Objects.equals(this.healthCheck, that.getHealthCheck())
+          && Objects.equals(this.healthState, that.getHealthState());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(backendService, forwardingRule, healthCheck, healthState);
+  }
+}
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Http2HealthCheck.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Http2HealthCheck.java
index 6453d5d70ae7..550664a2267f 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Http2HealthCheck.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Http2HealthCheck.java
@@ -28,6 +28,7 @@ public final class Http2HealthCheck implements ApiMessage {
   private final String host;
   private final Integer port;
   private final String portName;
+  private final String portSpecification;
   private final String proxyHeader;
   private final String requestPath;
   private final String response;
@@ -36,6 +37,7 @@ private Http2HealthCheck() {
     this.host = null;
     this.port = null;
     this.portName = null;
+    this.portSpecification = null;
     this.proxyHeader = null;
     this.requestPath = null;
     this.response = null;
@@ -45,12 +47,14 @@ private Http2HealthCheck(
       String host,
       Integer port,
       String portName,
+      String portSpecification,
       String proxyHeader,
       String requestPath,
       String response) {
     this.host = host;
     this.port = port;
     this.portName = portName;
+    this.portSpecification = portSpecification;
     this.proxyHeader = proxyHeader;
     this.requestPath = requestPath;
     this.response = response;
@@ -67,6 +71,9 @@ public Object getFieldValue(String fieldName) {
     if ("portName".equals(fieldName)) {
       return portName;
     }
+    if ("portSpecification".equals(fieldName)) {
+      return portSpecification;
+    }
     if ("proxyHeader".equals(fieldName)) {
       return proxyHeader;
     }
@@ -121,6 +128,19 @@ public String getPortName() {
     return portName;
   }
 
+  /**
+   * Specifies how port is selected for health checking, can be one of following values:
+   * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The
+   * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port
+   * specified for each network endpoint is used for health checking. For other backends, the port
+   * or named port specified in the Backend Service is used for health checking.
+   *
+   * 

If not specified, HTTP2 health check follows behavior specified in port and portName fields. + */ + public String getPortSpecification() { + return portSpecification; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE or * PROXY_V1. The default is NONE. @@ -168,6 +188,7 @@ public static class Builder { private String host; private Integer port; private String portName; + private String portSpecification; private String proxyHeader; private String requestPath; private String response; @@ -185,6 +206,9 @@ public Builder mergeFrom(Http2HealthCheck other) { if (other.getPortName() != null) { this.portName = other.portName; } + if (other.getPortSpecification() != null) { + this.portSpecification = other.portSpecification; + } if (other.getProxyHeader() != null) { this.proxyHeader = other.proxyHeader; } @@ -201,6 +225,7 @@ public Builder mergeFrom(Http2HealthCheck other) { this.host = source.host; this.port = source.port; this.portName = source.portName; + this.portSpecification = source.portSpecification; this.proxyHeader = source.proxyHeader; this.requestPath = source.requestPath; this.response = source.response; @@ -257,6 +282,35 @@ public Builder setPortName(String portName) { return this; } + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, HTTP2 health check follows behavior specified in port and portName + * fields. + */ + public String getPortSpecification() { + return portSpecification; + } + + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, HTTP2 health check follows behavior specified in port and portName + * fields. + */ + public Builder setPortSpecification(String portSpecification) { + this.portSpecification = portSpecification; + return this; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE * or PROXY_V1. The default is NONE. @@ -304,7 +358,8 @@ public Builder setResponse(String response) { public Http2HealthCheck build() { - return new Http2HealthCheck(host, port, portName, proxyHeader, requestPath, response); + return new Http2HealthCheck( + host, port, portName, portSpecification, proxyHeader, requestPath, response); } public Builder clone() { @@ -312,6 +367,7 @@ public Builder clone() { newBuilder.setHost(this.host); newBuilder.setPort(this.port); newBuilder.setPortName(this.portName); + newBuilder.setPortSpecification(this.portSpecification); newBuilder.setProxyHeader(this.proxyHeader); newBuilder.setRequestPath(this.requestPath); newBuilder.setResponse(this.response); @@ -331,6 +387,9 @@ public String toString() { + "portName=" + portName + ", " + + "portSpecification=" + + portSpecification + + ", " + "proxyHeader=" + proxyHeader + ", " @@ -352,6 +411,7 @@ public boolean equals(Object o) { return Objects.equals(this.host, that.getHost()) && Objects.equals(this.port, that.getPort()) && Objects.equals(this.portName, that.getPortName()) + && Objects.equals(this.portSpecification, that.getPortSpecification()) && Objects.equals(this.proxyHeader, that.getProxyHeader()) && Objects.equals(this.requestPath, that.getRequestPath()) && Objects.equals(this.response, that.getResponse()); @@ -361,6 +421,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(host, port, portName, proxyHeader, requestPath, response); + return Objects.hash( + host, port, portName, portSpecification, proxyHeader, requestPath, response); } } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpHealthCheck.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpHealthCheck.java index e54a127c4ba7..ad7b6f1bb9ef 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpHealthCheck.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpHealthCheck.java @@ -28,6 +28,7 @@ public final class HttpHealthCheck implements ApiMessage { private final String host; private final Integer port; private final String portName; + private final String portSpecification; private final String proxyHeader; private final String requestPath; private final String response; @@ -36,6 +37,7 @@ private HttpHealthCheck() { this.host = null; this.port = null; this.portName = null; + this.portSpecification = null; this.proxyHeader = null; this.requestPath = null; this.response = null; @@ -45,12 +47,14 @@ private HttpHealthCheck( String host, Integer port, String portName, + String portSpecification, String proxyHeader, String requestPath, String response) { this.host = host; this.port = port; this.portName = portName; + this.portSpecification = portSpecification; this.proxyHeader = proxyHeader; this.requestPath = requestPath; this.response = response; @@ -67,6 +71,9 @@ public Object getFieldValue(String fieldName) { if ("portName".equals(fieldName)) { return portName; } + if ("portSpecification".equals(fieldName)) { + return portSpecification; + } if ("proxyHeader".equals(fieldName)) { return proxyHeader; } @@ -121,6 +128,19 @@ public String getPortName() { return portName; } + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, HTTP health check follows behavior specified in port and portName fields. + */ + public String getPortSpecification() { + return portSpecification; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE or * PROXY_V1. The default is NONE. @@ -168,6 +188,7 @@ public static class Builder { private String host; private Integer port; private String portName; + private String portSpecification; private String proxyHeader; private String requestPath; private String response; @@ -185,6 +206,9 @@ public Builder mergeFrom(HttpHealthCheck other) { if (other.getPortName() != null) { this.portName = other.portName; } + if (other.getPortSpecification() != null) { + this.portSpecification = other.portSpecification; + } if (other.getProxyHeader() != null) { this.proxyHeader = other.proxyHeader; } @@ -201,6 +225,7 @@ public Builder mergeFrom(HttpHealthCheck other) { this.host = source.host; this.port = source.port; this.portName = source.portName; + this.portSpecification = source.portSpecification; this.proxyHeader = source.proxyHeader; this.requestPath = source.requestPath; this.response = source.response; @@ -257,6 +282,35 @@ public Builder setPortName(String portName) { return this; } + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, HTTP health check follows behavior specified in port and portName + * fields. + */ + public String getPortSpecification() { + return portSpecification; + } + + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, HTTP health check follows behavior specified in port and portName + * fields. + */ + public Builder setPortSpecification(String portSpecification) { + this.portSpecification = portSpecification; + return this; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE * or PROXY_V1. The default is NONE. @@ -304,7 +358,8 @@ public Builder setResponse(String response) { public HttpHealthCheck build() { - return new HttpHealthCheck(host, port, portName, proxyHeader, requestPath, response); + return new HttpHealthCheck( + host, port, portName, portSpecification, proxyHeader, requestPath, response); } public Builder clone() { @@ -312,6 +367,7 @@ public Builder clone() { newBuilder.setHost(this.host); newBuilder.setPort(this.port); newBuilder.setPortName(this.portName); + newBuilder.setPortSpecification(this.portSpecification); newBuilder.setProxyHeader(this.proxyHeader); newBuilder.setRequestPath(this.requestPath); newBuilder.setResponse(this.response); @@ -331,6 +387,9 @@ public String toString() { + "portName=" + portName + ", " + + "portSpecification=" + + portSpecification + + ", " + "proxyHeader=" + proxyHeader + ", " @@ -352,6 +411,7 @@ public boolean equals(Object o) { return Objects.equals(this.host, that.getHost()) && Objects.equals(this.port, that.getPort()) && Objects.equals(this.portName, that.getPortName()) + && Objects.equals(this.portSpecification, that.getPortSpecification()) && Objects.equals(this.proxyHeader, that.getProxyHeader()) && Objects.equals(this.requestPath, that.getRequestPath()) && Objects.equals(this.response, that.getResponse()); @@ -361,6 +421,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(host, port, portName, proxyHeader, requestPath, response); + return Objects.hash( + host, port, portName, portSpecification, proxyHeader, requestPath, response); } } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpHealthCheckClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpHealthCheckClient.java index 51f30aece082..371b38a3c982 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpHealthCheckClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpHealthCheckClient.java @@ -212,9 +212,9 @@ public final Operation deleteHttpHealthCheck(String httpHealthCheck) { * *


    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectGlobalHttpHealthCheckName httpHealthCheck = ProjectGlobalHttpHealthCheckName.of("[PROJECT]", "[HTTP_HEALTH_CHECK]");
+   *   String formattedHttpHealthCheck = ProjectGlobalHttpHealthCheckName.format("[PROJECT]", "[HTTP_HEALTH_CHECK]");
    *   DeleteHttpHealthCheckHttpRequest request = DeleteHttpHealthCheckHttpRequest.newBuilder()
-   *     .setHttpHealthCheck(httpHealthCheck.toString())
+   *     .setHttpHealthCheck(formattedHttpHealthCheck)
    *     .build();
    *   Operation response = httpHealthCheckClient.deleteHttpHealthCheck(request);
    * }
@@ -236,9 +236,9 @@ public final Operation deleteHttpHealthCheck(DeleteHttpHealthCheckHttpRequest re
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectGlobalHttpHealthCheckName httpHealthCheck = ProjectGlobalHttpHealthCheckName.of("[PROJECT]", "[HTTP_HEALTH_CHECK]");
+   *   String formattedHttpHealthCheck = ProjectGlobalHttpHealthCheckName.format("[PROJECT]", "[HTTP_HEALTH_CHECK]");
    *   DeleteHttpHealthCheckHttpRequest request = DeleteHttpHealthCheckHttpRequest.newBuilder()
-   *     .setHttpHealthCheck(httpHealthCheck.toString())
+   *     .setHttpHealthCheck(formattedHttpHealthCheck)
    *     .build();
    *   ApiFuture<Operation> future = httpHealthCheckClient.deleteHttpHealthCheckCallable().futureCall(request);
    *   // Do something
@@ -314,9 +314,9 @@ public final HttpHealthCheck2 getHttpHealthCheck(String httpHealthCheck) {
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectGlobalHttpHealthCheckName httpHealthCheck = ProjectGlobalHttpHealthCheckName.of("[PROJECT]", "[HTTP_HEALTH_CHECK]");
+   *   String formattedHttpHealthCheck = ProjectGlobalHttpHealthCheckName.format("[PROJECT]", "[HTTP_HEALTH_CHECK]");
    *   GetHttpHealthCheckHttpRequest request = GetHttpHealthCheckHttpRequest.newBuilder()
-   *     .setHttpHealthCheck(httpHealthCheck.toString())
+   *     .setHttpHealthCheck(formattedHttpHealthCheck)
    *     .build();
    *   HttpHealthCheck2 response = httpHealthCheckClient.getHttpHealthCheck(request);
    * }
@@ -339,9 +339,9 @@ public final HttpHealthCheck2 getHttpHealthCheck(GetHttpHealthCheckHttpRequest r
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectGlobalHttpHealthCheckName httpHealthCheck = ProjectGlobalHttpHealthCheckName.of("[PROJECT]", "[HTTP_HEALTH_CHECK]");
+   *   String formattedHttpHealthCheck = ProjectGlobalHttpHealthCheckName.format("[PROJECT]", "[HTTP_HEALTH_CHECK]");
    *   GetHttpHealthCheckHttpRequest request = GetHttpHealthCheckHttpRequest.newBuilder()
-   *     .setHttpHealthCheck(httpHealthCheck.toString())
+   *     .setHttpHealthCheck(formattedHttpHealthCheck)
    *     .build();
    *   ApiFuture<HttpHealthCheck2> future = httpHealthCheckClient.getHttpHealthCheckCallable().futureCall(request);
    *   // Do something
@@ -428,10 +428,10 @@ public final Operation insertHttpHealthCheck(
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   HttpHealthCheck2 httpHealthCheckResource = HttpHealthCheck2.newBuilder().build();
    *   InsertHttpHealthCheckHttpRequest request = InsertHttpHealthCheckHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setHttpHealthCheckResource(httpHealthCheckResource)
    *     .build();
    *   Operation response = httpHealthCheckClient.insertHttpHealthCheck(request);
@@ -455,10 +455,10 @@ public final Operation insertHttpHealthCheck(InsertHttpHealthCheckHttpRequest re
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   HttpHealthCheck2 httpHealthCheckResource = HttpHealthCheck2.newBuilder().build();
    *   InsertHttpHealthCheckHttpRequest request = InsertHttpHealthCheckHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setHttpHealthCheckResource(httpHealthCheckResource)
    *     .build();
    *   ApiFuture<Operation> future = httpHealthCheckClient.insertHttpHealthCheckCallable().futureCall(request);
@@ -533,9 +533,9 @@ public final ListHttpHealthChecksPagedResponse listHttpHealthChecks(String proje
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHttpHealthChecksHttpRequest request = ListHttpHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (HttpHealthCheck2 element : httpHealthCheckClient.listHttpHealthChecks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -560,9 +560,9 @@ public final ListHttpHealthChecksPagedResponse listHttpHealthChecks(
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHttpHealthChecksHttpRequest request = ListHttpHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListHttpHealthChecksPagedResponse> future = httpHealthCheckClient.listHttpHealthChecksPagedCallable().futureCall(request);
    *   // Do something
@@ -586,9 +586,9 @@ public final ListHttpHealthChecksPagedResponse listHttpHealthChecks(
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHttpHealthChecksHttpRequest request = ListHttpHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     HttpHealthCheckList response = httpHealthCheckClient.listHttpHealthChecksCallable().call(request);
@@ -701,11 +701,11 @@ public final Operation patchHttpHealthCheck(
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectGlobalHttpHealthCheckName httpHealthCheck = ProjectGlobalHttpHealthCheckName.of("[PROJECT]", "[HTTP_HEALTH_CHECK]");
+   *   String formattedHttpHealthCheck = ProjectGlobalHttpHealthCheckName.format("[PROJECT]", "[HTTP_HEALTH_CHECK]");
    *   HttpHealthCheck2 httpHealthCheckResource = HttpHealthCheck2.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchHttpHealthCheckHttpRequest request = PatchHttpHealthCheckHttpRequest.newBuilder()
-   *     .setHttpHealthCheck(httpHealthCheck.toString())
+   *     .setHttpHealthCheck(formattedHttpHealthCheck)
    *     .setHttpHealthCheckResource(httpHealthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -731,11 +731,11 @@ public final Operation patchHttpHealthCheck(PatchHttpHealthCheckHttpRequest requ
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectGlobalHttpHealthCheckName httpHealthCheck = ProjectGlobalHttpHealthCheckName.of("[PROJECT]", "[HTTP_HEALTH_CHECK]");
+   *   String formattedHttpHealthCheck = ProjectGlobalHttpHealthCheckName.format("[PROJECT]", "[HTTP_HEALTH_CHECK]");
    *   HttpHealthCheck2 httpHealthCheckResource = HttpHealthCheck2.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchHttpHealthCheckHttpRequest request = PatchHttpHealthCheckHttpRequest.newBuilder()
-   *     .setHttpHealthCheck(httpHealthCheck.toString())
+   *     .setHttpHealthCheck(formattedHttpHealthCheck)
    *     .setHttpHealthCheckResource(httpHealthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -838,11 +838,11 @@ public final Operation updateHttpHealthCheck(
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectGlobalHttpHealthCheckName httpHealthCheck = ProjectGlobalHttpHealthCheckName.of("[PROJECT]", "[HTTP_HEALTH_CHECK]");
+   *   String formattedHttpHealthCheck = ProjectGlobalHttpHealthCheckName.format("[PROJECT]", "[HTTP_HEALTH_CHECK]");
    *   HttpHealthCheck2 httpHealthCheckResource = HttpHealthCheck2.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateHttpHealthCheckHttpRequest request = UpdateHttpHealthCheckHttpRequest.newBuilder()
-   *     .setHttpHealthCheck(httpHealthCheck.toString())
+   *     .setHttpHealthCheck(formattedHttpHealthCheck)
    *     .setHttpHealthCheckResource(httpHealthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -867,11 +867,11 @@ public final Operation updateHttpHealthCheck(UpdateHttpHealthCheckHttpRequest re
    *
    * 

    * try (HttpHealthCheckClient httpHealthCheckClient = HttpHealthCheckClient.create()) {
-   *   ProjectGlobalHttpHealthCheckName httpHealthCheck = ProjectGlobalHttpHealthCheckName.of("[PROJECT]", "[HTTP_HEALTH_CHECK]");
+   *   String formattedHttpHealthCheck = ProjectGlobalHttpHealthCheckName.format("[PROJECT]", "[HTTP_HEALTH_CHECK]");
    *   HttpHealthCheck2 httpHealthCheckResource = HttpHealthCheck2.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateHttpHealthCheckHttpRequest request = UpdateHttpHealthCheckHttpRequest.newBuilder()
-   *     .setHttpHealthCheck(httpHealthCheck.toString())
+   *     .setHttpHealthCheck(formattedHttpHealthCheck)
    *     .setHttpHealthCheckResource(httpHealthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpSHealthCheck.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpSHealthCheck.java
index 60cfb497ab43..24237dacbe8f 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpSHealthCheck.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpSHealthCheck.java
@@ -28,6 +28,7 @@ public final class HttpSHealthCheck implements ApiMessage {
   private final String host;
   private final Integer port;
   private final String portName;
+  private final String portSpecification;
   private final String proxyHeader;
   private final String requestPath;
   private final String response;
@@ -36,6 +37,7 @@ private HttpSHealthCheck() {
     this.host = null;
     this.port = null;
     this.portName = null;
+    this.portSpecification = null;
     this.proxyHeader = null;
     this.requestPath = null;
     this.response = null;
@@ -45,12 +47,14 @@ private HttpSHealthCheck(
       String host,
       Integer port,
       String portName,
+      String portSpecification,
       String proxyHeader,
       String requestPath,
       String response) {
     this.host = host;
     this.port = port;
     this.portName = portName;
+    this.portSpecification = portSpecification;
     this.proxyHeader = proxyHeader;
     this.requestPath = requestPath;
     this.response = response;
@@ -67,6 +71,9 @@ public Object getFieldValue(String fieldName) {
     if ("portName".equals(fieldName)) {
       return portName;
     }
+    if ("portSpecification".equals(fieldName)) {
+      return portSpecification;
+    }
     if ("proxyHeader".equals(fieldName)) {
       return proxyHeader;
     }
@@ -121,6 +128,19 @@ public String getPortName() {
     return portName;
   }
 
+  /**
+   * Specifies how port is selected for health checking, can be one of following values:
+   * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The
+   * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port
+   * specified for each network endpoint is used for health checking. For other backends, the port
+   * or named port specified in the Backend Service is used for health checking.
+   *
+   * 

If not specified, HTTPS health check follows behavior specified in port and portName fields. + */ + public String getPortSpecification() { + return portSpecification; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE or * PROXY_V1. The default is NONE. @@ -168,6 +188,7 @@ public static class Builder { private String host; private Integer port; private String portName; + private String portSpecification; private String proxyHeader; private String requestPath; private String response; @@ -185,6 +206,9 @@ public Builder mergeFrom(HttpSHealthCheck other) { if (other.getPortName() != null) { this.portName = other.portName; } + if (other.getPortSpecification() != null) { + this.portSpecification = other.portSpecification; + } if (other.getProxyHeader() != null) { this.proxyHeader = other.proxyHeader; } @@ -201,6 +225,7 @@ public Builder mergeFrom(HttpSHealthCheck other) { this.host = source.host; this.port = source.port; this.portName = source.portName; + this.portSpecification = source.portSpecification; this.proxyHeader = source.proxyHeader; this.requestPath = source.requestPath; this.response = source.response; @@ -257,6 +282,35 @@ public Builder setPortName(String portName) { return this; } + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, HTTPS health check follows behavior specified in port and portName + * fields. + */ + public String getPortSpecification() { + return portSpecification; + } + + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, HTTPS health check follows behavior specified in port and portName + * fields. + */ + public Builder setPortSpecification(String portSpecification) { + this.portSpecification = portSpecification; + return this; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE * or PROXY_V1. The default is NONE. @@ -304,7 +358,8 @@ public Builder setResponse(String response) { public HttpSHealthCheck build() { - return new HttpSHealthCheck(host, port, portName, proxyHeader, requestPath, response); + return new HttpSHealthCheck( + host, port, portName, portSpecification, proxyHeader, requestPath, response); } public Builder clone() { @@ -312,6 +367,7 @@ public Builder clone() { newBuilder.setHost(this.host); newBuilder.setPort(this.port); newBuilder.setPortName(this.portName); + newBuilder.setPortSpecification(this.portSpecification); newBuilder.setProxyHeader(this.proxyHeader); newBuilder.setRequestPath(this.requestPath); newBuilder.setResponse(this.response); @@ -331,6 +387,9 @@ public String toString() { + "portName=" + portName + ", " + + "portSpecification=" + + portSpecification + + ", " + "proxyHeader=" + proxyHeader + ", " @@ -352,6 +411,7 @@ public boolean equals(Object o) { return Objects.equals(this.host, that.getHost()) && Objects.equals(this.port, that.getPort()) && Objects.equals(this.portName, that.getPortName()) + && Objects.equals(this.portSpecification, that.getPortSpecification()) && Objects.equals(this.proxyHeader, that.getProxyHeader()) && Objects.equals(this.requestPath, that.getRequestPath()) && Objects.equals(this.response, that.getResponse()); @@ -361,6 +421,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(host, port, portName, proxyHeader, requestPath, response); + return Objects.hash( + host, port, portName, portSpecification, proxyHeader, requestPath, response); } } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpsHealthCheckClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpsHealthCheckClient.java index c286a2d35b35..566c513a9d2d 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpsHealthCheckClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/HttpsHealthCheckClient.java @@ -215,9 +215,9 @@ public final Operation deleteHttpsHealthCheck(String httpsHealthCheck) { * *


    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectGlobalHttpsHealthCheckName httpsHealthCheck = ProjectGlobalHttpsHealthCheckName.of("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
+   *   String formattedHttpsHealthCheck = ProjectGlobalHttpsHealthCheckName.format("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
    *   DeleteHttpsHealthCheckHttpRequest request = DeleteHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setHttpsHealthCheck(httpsHealthCheck.toString())
+   *     .setHttpsHealthCheck(formattedHttpsHealthCheck)
    *     .build();
    *   Operation response = httpsHealthCheckClient.deleteHttpsHealthCheck(request);
    * }
@@ -239,9 +239,9 @@ public final Operation deleteHttpsHealthCheck(DeleteHttpsHealthCheckHttpRequest
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectGlobalHttpsHealthCheckName httpsHealthCheck = ProjectGlobalHttpsHealthCheckName.of("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
+   *   String formattedHttpsHealthCheck = ProjectGlobalHttpsHealthCheckName.format("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
    *   DeleteHttpsHealthCheckHttpRequest request = DeleteHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setHttpsHealthCheck(httpsHealthCheck.toString())
+   *     .setHttpsHealthCheck(formattedHttpsHealthCheck)
    *     .build();
    *   ApiFuture<Operation> future = httpsHealthCheckClient.deleteHttpsHealthCheckCallable().futureCall(request);
    *   // Do something
@@ -317,9 +317,9 @@ public final HttpsHealthCheck2 getHttpsHealthCheck(String httpsHealthCheck) {
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectGlobalHttpsHealthCheckName httpsHealthCheck = ProjectGlobalHttpsHealthCheckName.of("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
+   *   String formattedHttpsHealthCheck = ProjectGlobalHttpsHealthCheckName.format("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
    *   GetHttpsHealthCheckHttpRequest request = GetHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setHttpsHealthCheck(httpsHealthCheck.toString())
+   *     .setHttpsHealthCheck(formattedHttpsHealthCheck)
    *     .build();
    *   HttpsHealthCheck2 response = httpsHealthCheckClient.getHttpsHealthCheck(request);
    * }
@@ -342,9 +342,9 @@ public final HttpsHealthCheck2 getHttpsHealthCheck(GetHttpsHealthCheckHttpReques
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectGlobalHttpsHealthCheckName httpsHealthCheck = ProjectGlobalHttpsHealthCheckName.of("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
+   *   String formattedHttpsHealthCheck = ProjectGlobalHttpsHealthCheckName.format("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
    *   GetHttpsHealthCheckHttpRequest request = GetHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setHttpsHealthCheck(httpsHealthCheck.toString())
+   *     .setHttpsHealthCheck(formattedHttpsHealthCheck)
    *     .build();
    *   ApiFuture<HttpsHealthCheck2> future = httpsHealthCheckClient.getHttpsHealthCheckCallable().futureCall(request);
    *   // Do something
@@ -431,10 +431,10 @@ public final Operation insertHttpsHealthCheck(
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   HttpsHealthCheck2 httpsHealthCheckResource = HttpsHealthCheck2.newBuilder().build();
    *   InsertHttpsHealthCheckHttpRequest request = InsertHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setHttpsHealthCheckResource(httpsHealthCheckResource)
    *     .build();
    *   Operation response = httpsHealthCheckClient.insertHttpsHealthCheck(request);
@@ -458,10 +458,10 @@ public final Operation insertHttpsHealthCheck(InsertHttpsHealthCheckHttpRequest
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   HttpsHealthCheck2 httpsHealthCheckResource = HttpsHealthCheck2.newBuilder().build();
    *   InsertHttpsHealthCheckHttpRequest request = InsertHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setHttpsHealthCheckResource(httpsHealthCheckResource)
    *     .build();
    *   ApiFuture<Operation> future = httpsHealthCheckClient.insertHttpsHealthCheckCallable().futureCall(request);
@@ -536,9 +536,9 @@ public final ListHttpsHealthChecksPagedResponse listHttpsHealthChecks(String pro
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHttpsHealthChecksHttpRequest request = ListHttpsHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (HttpsHealthCheck2 element : httpsHealthCheckClient.listHttpsHealthChecks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -563,9 +563,9 @@ public final ListHttpsHealthChecksPagedResponse listHttpsHealthChecks(
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHttpsHealthChecksHttpRequest request = ListHttpsHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListHttpsHealthChecksPagedResponse> future = httpsHealthCheckClient.listHttpsHealthChecksPagedCallable().futureCall(request);
    *   // Do something
@@ -589,9 +589,9 @@ public final ListHttpsHealthChecksPagedResponse listHttpsHealthChecks(
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListHttpsHealthChecksHttpRequest request = ListHttpsHealthChecksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     HttpsHealthCheckList response = httpsHealthCheckClient.listHttpsHealthChecksCallable().call(request);
@@ -704,11 +704,11 @@ public final Operation patchHttpsHealthCheck(
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectGlobalHttpsHealthCheckName httpsHealthCheck = ProjectGlobalHttpsHealthCheckName.of("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
+   *   String formattedHttpsHealthCheck = ProjectGlobalHttpsHealthCheckName.format("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
    *   HttpsHealthCheck2 httpsHealthCheckResource = HttpsHealthCheck2.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchHttpsHealthCheckHttpRequest request = PatchHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setHttpsHealthCheck(httpsHealthCheck.toString())
+   *     .setHttpsHealthCheck(formattedHttpsHealthCheck)
    *     .setHttpsHealthCheckResource(httpsHealthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -734,11 +734,11 @@ public final Operation patchHttpsHealthCheck(PatchHttpsHealthCheckHttpRequest re
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectGlobalHttpsHealthCheckName httpsHealthCheck = ProjectGlobalHttpsHealthCheckName.of("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
+   *   String formattedHttpsHealthCheck = ProjectGlobalHttpsHealthCheckName.format("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
    *   HttpsHealthCheck2 httpsHealthCheckResource = HttpsHealthCheck2.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchHttpsHealthCheckHttpRequest request = PatchHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setHttpsHealthCheck(httpsHealthCheck.toString())
+   *     .setHttpsHealthCheck(formattedHttpsHealthCheck)
    *     .setHttpsHealthCheckResource(httpsHealthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -841,11 +841,11 @@ public final Operation updateHttpsHealthCheck(
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectGlobalHttpsHealthCheckName httpsHealthCheck = ProjectGlobalHttpsHealthCheckName.of("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
+   *   String formattedHttpsHealthCheck = ProjectGlobalHttpsHealthCheckName.format("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
    *   HttpsHealthCheck2 httpsHealthCheckResource = HttpsHealthCheck2.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateHttpsHealthCheckHttpRequest request = UpdateHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setHttpsHealthCheck(httpsHealthCheck.toString())
+   *     .setHttpsHealthCheck(formattedHttpsHealthCheck)
    *     .setHttpsHealthCheckResource(httpsHealthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -870,11 +870,11 @@ public final Operation updateHttpsHealthCheck(UpdateHttpsHealthCheckHttpRequest
    *
    * 

    * try (HttpsHealthCheckClient httpsHealthCheckClient = HttpsHealthCheckClient.create()) {
-   *   ProjectGlobalHttpsHealthCheckName httpsHealthCheck = ProjectGlobalHttpsHealthCheckName.of("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
+   *   String formattedHttpsHealthCheck = ProjectGlobalHttpsHealthCheckName.format("[PROJECT]", "[HTTPS_HEALTH_CHECK]");
    *   HttpsHealthCheck2 httpsHealthCheckResource = HttpsHealthCheck2.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateHttpsHealthCheckHttpRequest request = UpdateHttpsHealthCheckHttpRequest.newBuilder()
-   *     .setHttpsHealthCheck(httpsHealthCheck.toString())
+   *     .setHttpsHealthCheck(formattedHttpsHealthCheck)
    *     .setHttpsHealthCheckResource(httpsHealthCheckResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java
index b82b84081162..9d35c1cc42d6 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ImageClient.java
@@ -208,9 +208,9 @@ public final Operation deleteImage(String image) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]");
+   *   String formattedImage = ProjectGlobalImageName.format("[PROJECT]", "[IMAGE]");
    *   DeleteImageHttpRequest request = DeleteImageHttpRequest.newBuilder()
-   *     .setImage(image.toString())
+   *     .setImage(formattedImage)
    *     .build();
    *   Operation response = imageClient.deleteImage(request);
    * }
@@ -232,9 +232,9 @@ public final Operation deleteImage(DeleteImageHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]");
+   *   String formattedImage = ProjectGlobalImageName.format("[PROJECT]", "[IMAGE]");
    *   DeleteImageHttpRequest request = DeleteImageHttpRequest.newBuilder()
-   *     .setImage(image.toString())
+   *     .setImage(formattedImage)
    *     .build();
    *   ApiFuture<Operation> future = imageClient.deleteImageCallable().futureCall(request);
    *   // Do something
@@ -320,10 +320,10 @@ public final Operation deprecateImage(String image, DeprecationStatus deprecatio
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]");
+   *   String formattedImage = ProjectGlobalImageName.format("[PROJECT]", "[IMAGE]");
    *   DeprecationStatus deprecationStatusResource = DeprecationStatus.newBuilder().build();
    *   DeprecateImageHttpRequest request = DeprecateImageHttpRequest.newBuilder()
-   *     .setImage(image.toString())
+   *     .setImage(formattedImage)
    *     .setDeprecationStatusResource(deprecationStatusResource)
    *     .build();
    *   Operation response = imageClient.deprecateImage(request);
@@ -348,10 +348,10 @@ public final Operation deprecateImage(DeprecateImageHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]");
+   *   String formattedImage = ProjectGlobalImageName.format("[PROJECT]", "[IMAGE]");
    *   DeprecationStatus deprecationStatusResource = DeprecationStatus.newBuilder().build();
    *   DeprecateImageHttpRequest request = DeprecateImageHttpRequest.newBuilder()
-   *     .setImage(image.toString())
+   *     .setImage(formattedImage)
    *     .setDeprecationStatusResource(deprecationStatusResource)
    *     .build();
    *   ApiFuture<Operation> future = imageClient.deprecateImageCallable().futureCall(request);
@@ -420,9 +420,9 @@ public final Image getImage(String image) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]");
+   *   String formattedImage = ProjectGlobalImageName.format("[PROJECT]", "[IMAGE]");
    *   GetImageHttpRequest request = GetImageHttpRequest.newBuilder()
-   *     .setImage(image.toString())
+   *     .setImage(formattedImage)
    *     .build();
    *   Image response = imageClient.getImage(request);
    * }
@@ -444,9 +444,9 @@ public final Image getImage(GetImageHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]");
+   *   String formattedImage = ProjectGlobalImageName.format("[PROJECT]", "[IMAGE]");
    *   GetImageHttpRequest request = GetImageHttpRequest.newBuilder()
-   *     .setImage(image.toString())
+   *     .setImage(formattedImage)
    *     .build();
    *   ApiFuture<Image> future = imageClient.getImageCallable().futureCall(request);
    *   // Do something
@@ -517,9 +517,9 @@ public final Image getFromFamilyImage(String family) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageFamilyName family = ProjectGlobalImageFamilyName.of("[PROJECT]", "[FAMILY]");
+   *   String formattedFamily = ProjectGlobalImageFamilyName.format("[PROJECT]", "[FAMILY]");
    *   GetFromFamilyImageHttpRequest request = GetFromFamilyImageHttpRequest.newBuilder()
-   *     .setFamily(family.toString())
+   *     .setFamily(formattedFamily)
    *     .build();
    *   Image response = imageClient.getFromFamilyImage(request);
    * }
@@ -541,9 +541,9 @@ public final Image getFromFamilyImage(GetFromFamilyImageHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageFamilyName family = ProjectGlobalImageFamilyName.of("[PROJECT]", "[FAMILY]");
+   *   String formattedFamily = ProjectGlobalImageFamilyName.format("[PROJECT]", "[FAMILY]");
    *   GetFromFamilyImageHttpRequest request = GetFromFamilyImageHttpRequest.newBuilder()
-   *     .setFamily(family.toString())
+   *     .setFamily(formattedFamily)
    *     .build();
    *   ApiFuture<Image> future = imageClient.getFromFamilyImageCallable().futureCall(request);
    *   // Do something
@@ -617,9 +617,9 @@ public final Policy getIamPolicyImage(String resource) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalImageResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GetIamPolicyImageHttpRequest request = GetIamPolicyImageHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = imageClient.getIamPolicyImage(request);
    * }
@@ -642,9 +642,9 @@ public final Policy getIamPolicyImage(GetIamPolicyImageHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalImageResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GetIamPolicyImageHttpRequest request = GetIamPolicyImageHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = imageClient.getIamPolicyImageCallable().futureCall(request);
    *   // Do something
@@ -733,11 +733,11 @@ public final Operation insertImage(Boolean forceCreate, String project, Image im
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
    *   Boolean forceCreate = false;
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Image imageResource = Image.newBuilder().build();
    *   InsertImageHttpRequest request = InsertImageHttpRequest.newBuilder()
    *     .setForceCreate(forceCreate)
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setImageResource(imageResource)
    *     .build();
    *   Operation response = imageClient.insertImage(request);
@@ -761,11 +761,11 @@ public final Operation insertImage(InsertImageHttpRequest request) {
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
    *   Boolean forceCreate = false;
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Image imageResource = Image.newBuilder().build();
    *   InsertImageHttpRequest request = InsertImageHttpRequest.newBuilder()
    *     .setForceCreate(forceCreate)
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setImageResource(imageResource)
    *     .build();
    *   ApiFuture<Operation> future = imageClient.insertImageCallable().futureCall(request);
@@ -850,9 +850,9 @@ public final ListImagesPagedResponse listImages(String project) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListImagesHttpRequest request = ListImagesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Image element : imageClient.listImages(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -880,9 +880,9 @@ public final ListImagesPagedResponse listImages(ListImagesHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListImagesHttpRequest request = ListImagesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListImagesPagedResponse> future = imageClient.listImagesPagedCallable().futureCall(request);
    *   // Do something
@@ -910,9 +910,9 @@ public final ListImagesPagedResponse listImages(ListImagesHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListImagesHttpRequest request = ListImagesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     ImageList response = imageClient.listImagesCallable().call(request);
@@ -1003,10 +1003,10 @@ public final Policy setIamPolicyImage(
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalImageResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetPolicyRequest globalSetPolicyRequestResource = GlobalSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyImageHttpRequest request = SetIamPolicyImageHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
    *     .build();
    *   Policy response = imageClient.setIamPolicyImage(request);
@@ -1029,10 +1029,10 @@ public final Policy setIamPolicyImage(SetIamPolicyImageHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalImageResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetPolicyRequest globalSetPolicyRequestResource = GlobalSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyImageHttpRequest request = SetIamPolicyImageHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = imageClient.setIamPolicyImageCallable().futureCall(request);
@@ -1118,10 +1118,10 @@ public final Operation setLabelsImage(
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalImageResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetLabelsRequest globalSetLabelsRequestResource = GlobalSetLabelsRequest.newBuilder().build();
    *   SetLabelsImageHttpRequest request = SetLabelsImageHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetLabelsRequestResource(globalSetLabelsRequestResource)
    *     .build();
    *   Operation response = imageClient.setLabelsImage(request);
@@ -1145,10 +1145,10 @@ public final Operation setLabelsImage(SetLabelsImageHttpRequest request) {
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalImageResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetLabelsRequest globalSetLabelsRequestResource = GlobalSetLabelsRequest.newBuilder().build();
    *   SetLabelsImageHttpRequest request = SetLabelsImageHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetLabelsRequestResource(globalSetLabelsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = imageClient.setLabelsImageCallable().futureCall(request);
@@ -1231,10 +1231,10 @@ public final TestPermissionsResponse testIamPermissionsImage(
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalImageResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsImageHttpRequest request = TestIamPermissionsImageHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = imageClient.testIamPermissionsImage(request);
@@ -1258,10 +1258,10 @@ public final TestPermissionsResponse testIamPermissionsImage(
    *
    * 

    * try (ImageClient imageClient = ImageClient.create()) {
-   *   ProjectGlobalImageResourceName resource = ProjectGlobalImageResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalImageResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsImageHttpRequest request = TestIamPermissionsImageHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = imageClient.testIamPermissionsImageCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupHttpRequest.java
new file mode 100644
index 000000000000..f27e4af318a8
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupHttpRequest.java
@@ -0,0 +1,543 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.networkEndpointGroups.insert. Creates a network endpoint group
+ * in the specified project using the parameters that are included in the request.
+ */
+public final class InsertNetworkEndpointGroupHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String key;
+  private final NetworkEndpointGroup networkEndpointGroupResource;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String requestId;
+  private final String userIp;
+  private final String zone;
+
+  private InsertNetworkEndpointGroupHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.key = null;
+    this.networkEndpointGroupResource = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.requestId = null;
+    this.userIp = null;
+    this.zone = null;
+  }
+
+  private InsertNetworkEndpointGroupHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String key,
+      NetworkEndpointGroup networkEndpointGroupResource,
+      String prettyPrint,
+      String quotaUser,
+      String requestId,
+      String userIp,
+      String zone) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.key = key;
+    this.networkEndpointGroupResource = networkEndpointGroupResource;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.requestId = requestId;
+    this.userIp = userIp;
+    this.zone = zone;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("networkEndpointGroupResource".equals(fieldName)) {
+      return networkEndpointGroupResource;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("requestId".equals(fieldName)) {
+      return requestId;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    if ("zone".equals(fieldName)) {
+      return zone;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public NetworkEndpointGroup getApiMessageRequestBody() {
+    return networkEndpointGroupResource;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /** Represents a collection of network endpoints. */
+  public NetworkEndpointGroup getNetworkEndpointGroupResource() {
+    return networkEndpointGroupResource;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /**
+   * 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). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** + * The name of the zone where you want to create the network endpoint group. It should comply with + * RFC1035. It must have the format `{project}/zones/{zone}/networkEndpointGroups`. \`{zone}\` + * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes + * (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent + * * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not + * start with \`"goog"\`. + */ + public String getZone() { + return zone; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InsertNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InsertNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InsertNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InsertNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String key; + private NetworkEndpointGroup networkEndpointGroupResource; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + private String zone; + + Builder() {} + + public Builder mergeFrom(InsertNetworkEndpointGroupHttpRequest other) { + if (other == InsertNetworkEndpointGroupHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroupResource() != null) { + this.networkEndpointGroupResource = other.networkEndpointGroupResource; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + if (other.getZone() != null) { + this.zone = other.zone; + } + return this; + } + + Builder(InsertNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.key = source.key; + this.networkEndpointGroupResource = source.networkEndpointGroupResource; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + this.zone = source.zone; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** Represents a collection of network endpoints. */ + public NetworkEndpointGroup getNetworkEndpointGroupResource() { + return networkEndpointGroupResource; + } + + /** Represents a collection of network endpoints. */ + public Builder setNetworkEndpointGroupResource( + NetworkEndpointGroup networkEndpointGroupResource) { + this.networkEndpointGroupResource = networkEndpointGroupResource; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + 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). + */ + public String getRequestId() { + return 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). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + /** + * The name of the zone where you want to create the network endpoint group. It should comply + * with RFC1035. It must have the format `{project}/zones/{zone}/networkEndpointGroups`. + * \`{zone}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers + * (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus + * (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters in length, + * and it * must not start with \`"goog"\`. + */ + public String getZone() { + return zone; + } + + /** + * The name of the zone where you want to create the network endpoint group. It should comply + * with RFC1035. It must have the format `{project}/zones/{zone}/networkEndpointGroups`. + * \`{zone}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers + * (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus + * (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters in length, + * and it * must not start with \`"goog"\`. + */ + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + public InsertNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (zone == null) { + missing += " zone"; + } + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new InsertNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + key, + networkEndpointGroupResource, + prettyPrint, + quotaUser, + requestId, + userIp, + zone); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroupResource(this.networkEndpointGroupResource); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + newBuilder.setZone(this.zone); + return newBuilder; + } + } + + @Override + public String toString() { + return "InsertNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroupResource=" + + networkEndpointGroupResource + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + ", " + + "zone=" + + zone + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InsertNetworkEndpointGroupHttpRequest) { + InsertNetworkEndpointGroupHttpRequest that = (InsertNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals( + this.networkEndpointGroupResource, that.getNetworkEndpointGroupResource()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()) + && Objects.equals(this.zone, that.getZone()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + key, + networkEndpointGroupResource, + prettyPrint, + quotaUser, + requestId, + userIp, + zone); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertNodeGroupHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertNodeGroupHttpRequest.java index c9accd233702..7bae7d3e202f 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertNodeGroupHttpRequest.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InsertNodeGroupHttpRequest.java @@ -161,7 +161,9 @@ public String getKey() { return key; } - /** A NodeGroup resource. */ + /** + * A NodeGroup resource. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) + */ public NodeGroup getNodeGroupResource() { return nodeGroupResource; } @@ -353,12 +355,16 @@ public Builder setKey(String key) { return this; } - /** A NodeGroup resource. */ + /** + * A NodeGroup resource. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) + */ public NodeGroup getNodeGroupResource() { return nodeGroupResource; } - /** A NodeGroup resource. */ + /** + * A NodeGroup resource. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) + */ public Builder setNodeGroupResource(NodeGroup nodeGroupResource) { this.nodeGroupResource = nodeGroupResource; return this; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java index d96eaccb1843..91d57ed69428 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceClient.java @@ -231,11 +231,11 @@ public final Operation addAccessConfigInstance( * *


    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String networkInterface = "";
    *   AccessConfig accessConfigResource = AccessConfig.newBuilder().build();
    *   AddAccessConfigInstanceHttpRequest request = AddAccessConfigInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setNetworkInterface(networkInterface)
    *     .setAccessConfigResource(accessConfigResource)
    *     .build();
@@ -259,11 +259,11 @@ public final Operation addAccessConfigInstance(AddAccessConfigInstanceHttpReques
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String networkInterface = "";
    *   AccessConfig accessConfigResource = AccessConfig.newBuilder().build();
    *   AddAccessConfigInstanceHttpRequest request = AddAccessConfigInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setNetworkInterface(networkInterface)
    *     .setAccessConfigResource(accessConfigResource)
    *     .build();
@@ -339,9 +339,9 @@ public final AggregatedListInstancesPagedResponse aggregatedListInstances(String
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstancesHttpRequest request = AggregatedListInstancesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (InstancesScopedList element : instanceClient.aggregatedListInstances(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -366,9 +366,9 @@ public final AggregatedListInstancesPagedResponse aggregatedListInstances(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstancesHttpRequest request = AggregatedListInstancesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListInstancesPagedResponse> future = instanceClient.aggregatedListInstancesPagedCallable().futureCall(request);
    *   // Do something
@@ -393,9 +393,9 @@ public final AggregatedListInstancesPagedResponse aggregatedListInstances(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstancesHttpRequest request = AggregatedListInstancesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     InstanceAggregatedList response = instanceClient.aggregatedListInstancesCallable().call(request);
@@ -500,11 +500,11 @@ public final Operation attachDiskInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Boolean forceAttach = false;
    *   AttachedDisk attachedDiskResource = AttachedDisk.newBuilder().build();
    *   AttachDiskInstanceHttpRequest request = AttachDiskInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setForceAttach(forceAttach)
    *     .setAttachedDiskResource(attachedDiskResource)
    *     .build();
@@ -530,11 +530,11 @@ public final Operation attachDiskInstance(AttachDiskInstanceHttpRequest request)
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Boolean forceAttach = false;
    *   AttachedDisk attachedDiskResource = AttachedDisk.newBuilder().build();
    *   AttachDiskInstanceHttpRequest request = AttachDiskInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setForceAttach(forceAttach)
    *     .setAttachedDiskResource(attachedDiskResource)
    *     .build();
@@ -611,9 +611,9 @@ public final Operation deleteInstance(String instance) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   DeleteInstanceHttpRequest request = DeleteInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   Operation response = instanceClient.deleteInstance(request);
    * }
@@ -636,9 +636,9 @@ public final Operation deleteInstance(DeleteInstanceHttpRequest request) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   DeleteInstanceHttpRequest request = DeleteInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.deleteInstanceCallable().futureCall(request);
    *   // Do something
@@ -725,11 +725,11 @@ public final Operation deleteAccessConfigInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String networkInterface = "";
    *   String accessConfig = "";
    *   DeleteAccessConfigInstanceHttpRequest request = DeleteAccessConfigInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setNetworkInterface(networkInterface)
    *     .setAccessConfig(accessConfig)
    *     .build();
@@ -753,11 +753,11 @@ public final Operation deleteAccessConfigInstance(DeleteAccessConfigInstanceHttp
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String networkInterface = "";
    *   String accessConfig = "";
    *   DeleteAccessConfigInstanceHttpRequest request = DeleteAccessConfigInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setNetworkInterface(networkInterface)
    *     .setAccessConfig(accessConfig)
    *     .build();
@@ -841,10 +841,10 @@ public final Operation detachDiskInstance(String instance, String deviceName) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String deviceName = "";
    *   DetachDiskInstanceHttpRequest request = DetachDiskInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setDeviceName(deviceName)
    *     .build();
    *   Operation response = instanceClient.detachDiskInstance(request);
@@ -867,10 +867,10 @@ public final Operation detachDiskInstance(DetachDiskInstanceHttpRequest request)
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String deviceName = "";
    *   DetachDiskInstanceHttpRequest request = DetachDiskInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setDeviceName(deviceName)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.detachDiskInstanceCallable().futureCall(request);
@@ -946,9 +946,9 @@ public final Instance getInstance(String instance) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   GetInstanceHttpRequest request = GetInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   Instance response = instanceClient.getInstance(request);
    * }
@@ -971,9 +971,9 @@ public final Instance getInstance(GetInstanceHttpRequest request) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   GetInstanceHttpRequest request = GetInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   ApiFuture<Instance> future = instanceClient.getInstanceCallable().futureCall(request);
    *   // Do something
@@ -1047,9 +1047,9 @@ public final Policy getIamPolicyInstance(String resource) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneInstanceResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   GetIamPolicyInstanceHttpRequest request = GetIamPolicyInstanceHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = instanceClient.getIamPolicyInstance(request);
    * }
@@ -1072,9 +1072,9 @@ public final Policy getIamPolicyInstance(GetIamPolicyInstanceHttpRequest request
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneInstanceResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   GetIamPolicyInstanceHttpRequest request = GetIamPolicyInstanceHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = instanceClient.getIamPolicyInstanceCallable().futureCall(request);
    *   // Do something
@@ -1168,11 +1168,11 @@ public final SerialPortOutput getSerialPortOutputInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Integer port = 0;
    *   String start = "";
    *   GetSerialPortOutputInstanceHttpRequest request = GetSerialPortOutputInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setPort(port)
    *     .setStart(start)
    *     .build();
@@ -1197,11 +1197,11 @@ public final SerialPortOutput getSerialPortOutputInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Integer port = 0;
    *   String start = "";
    *   GetSerialPortOutputInstanceHttpRequest request = GetSerialPortOutputInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setPort(port)
    *     .setStart(start)
    *     .build();
@@ -1217,6 +1217,107 @@ public final SerialPortOutput getSerialPortOutputInstance(
     return stub.getSerialPortOutputInstanceCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Returns the Shielded Instance Identity of an instance
+   *
+   * 

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceIdentity response = instanceClient.getShieldedInstanceIdentityInstance(instance);
+   * }
+   * 
+ * + * @param instance Name or id of the instance scoping this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ShieldedInstanceIdentity getShieldedInstanceIdentityInstance( + ProjectZoneInstanceName instance) { + + GetShieldedInstanceIdentityInstanceHttpRequest request = + GetShieldedInstanceIdentityInstanceHttpRequest.newBuilder() + .setInstance(instance == null ? null : instance.toString()) + .build(); + return getShieldedInstanceIdentityInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the Shielded Instance Identity of an instance + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceIdentity response = instanceClient.getShieldedInstanceIdentityInstance(instance.toString());
+   * }
+   * 
+ * + * @param instance Name or id of the instance scoping this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ShieldedInstanceIdentity getShieldedInstanceIdentityInstance(String instance) { + + GetShieldedInstanceIdentityInstanceHttpRequest request = + GetShieldedInstanceIdentityInstanceHttpRequest.newBuilder().setInstance(instance).build(); + return getShieldedInstanceIdentityInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the Shielded Instance Identity of an instance + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   GetShieldedInstanceIdentityInstanceHttpRequest request = GetShieldedInstanceIdentityInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .build();
+   *   ShieldedInstanceIdentity response = instanceClient.getShieldedInstanceIdentityInstance(request);
+   * }
+   * 
+ * + * @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 + public final ShieldedInstanceIdentity getShieldedInstanceIdentityInstance( + GetShieldedInstanceIdentityInstanceHttpRequest request) { + return getShieldedInstanceIdentityInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the Shielded Instance Identity of an instance + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   GetShieldedInstanceIdentityInstanceHttpRequest request = GetShieldedInstanceIdentityInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .build();
+   *   ApiFuture<ShieldedInstanceIdentity> future = instanceClient.getShieldedInstanceIdentityInstanceCallable().futureCall(request);
+   *   // Do something
+   *   ShieldedInstanceIdentity response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + GetShieldedInstanceIdentityInstanceHttpRequest, ShieldedInstanceIdentity> + getShieldedInstanceIdentityInstanceCallable() { + return stub.getShieldedInstanceIdentityInstanceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates an instance resource in the specified project using the data included in the request. @@ -1285,10 +1386,10 @@ public final Operation insertInstance(String zone, Instance instanceResource) { * *

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Instance instanceResource = Instance.newBuilder().build();
    *   InsertInstanceHttpRequest request = InsertInstanceHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setInstanceResource(instanceResource)
    *     .build();
    *   Operation response = instanceClient.insertInstance(request);
@@ -1311,10 +1412,10 @@ public final Operation insertInstance(InsertInstanceHttpRequest request) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   Instance instanceResource = Instance.newBuilder().build();
    *   InsertInstanceHttpRequest request = InsertInstanceHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setInstanceResource(instanceResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.insertInstanceCallable().futureCall(request);
@@ -1387,9 +1488,9 @@ public final ListInstancesPagedResponse listInstances(String zone) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstancesHttpRequest request = ListInstancesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (Instance element : instanceClient.listInstances(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -1413,9 +1514,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesHttpRequest r
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstancesHttpRequest request = ListInstancesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListInstancesPagedResponse> future = instanceClient.listInstancesPagedCallable().futureCall(request);
    *   // Do something
@@ -1439,9 +1540,9 @@ public final ListInstancesPagedResponse listInstances(ListInstancesHttpRequest r
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstancesHttpRequest request = ListInstancesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     InstanceList response = instanceClient.listInstancesCallable().call(request);
@@ -1529,9 +1630,9 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances(String i
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   ListReferrersInstancesHttpRequest request = ListReferrersInstancesHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   for (Reference element : instanceClient.listReferrersInstances(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -1557,9 +1658,9 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   ListReferrersInstancesHttpRequest request = ListReferrersInstancesHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   ApiFuture<ListReferrersInstancesPagedResponse> future = instanceClient.listReferrersInstancesPagedCallable().futureCall(request);
    *   // Do something
@@ -1584,9 +1685,9 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   ListReferrersInstancesHttpRequest request = ListReferrersInstancesHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   while (true) {
    *     InstanceListReferrers response = instanceClient.listReferrersInstancesCallable().call(request);
@@ -1670,9 +1771,9 @@ public final Operation resetInstance(String instance) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   ResetInstanceHttpRequest request = ResetInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   Operation response = instanceClient.resetInstance(request);
    * }
@@ -1695,9 +1796,9 @@ public final Operation resetInstance(ResetInstanceHttpRequest request) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   ResetInstanceHttpRequest request = ResetInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.resetInstanceCallable().futureCall(request);
    *   // Do something
@@ -1778,10 +1879,10 @@ public final Operation setDeletionProtectionInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneInstanceResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   Boolean deletionProtection = false;
    *   SetDeletionProtectionInstanceHttpRequest request = SetDeletionProtectionInstanceHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setDeletionProtection(deletionProtection)
    *     .build();
    *   Operation response = instanceClient.setDeletionProtectionInstance(request);
@@ -1805,10 +1906,10 @@ public final Operation setDeletionProtectionInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneInstanceResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   Boolean deletionProtection = false;
    *   SetDeletionProtectionInstanceHttpRequest request = SetDeletionProtectionInstanceHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setDeletionProtection(deletionProtection)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setDeletionProtectionInstanceCallable().futureCall(request);
@@ -1899,11 +2000,11 @@ public final Operation setDiskAutoDeleteInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Boolean autoDelete = false;
    *   String deviceName = "";
    *   SetDiskAutoDeleteInstanceHttpRequest request = SetDiskAutoDeleteInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setAutoDelete(autoDelete)
    *     .setDeviceName(deviceName)
    *     .build();
@@ -1927,11 +2028,11 @@ public final Operation setDiskAutoDeleteInstance(SetDiskAutoDeleteInstanceHttpRe
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Boolean autoDelete = false;
    *   String deviceName = "";
    *   SetDiskAutoDeleteInstanceHttpRequest request = SetDiskAutoDeleteInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setAutoDelete(autoDelete)
    *     .setDeviceName(deviceName)
    *     .build();
@@ -2015,10 +2116,10 @@ public final Policy setIamPolicyInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneInstanceResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyInstanceHttpRequest request = SetIamPolicyInstanceHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setZoneSetPolicyRequestResource(zoneSetPolicyRequestResource)
    *     .build();
    *   Policy response = instanceClient.setIamPolicyInstance(request);
@@ -2041,10 +2142,10 @@ public final Policy setIamPolicyInstance(SetIamPolicyInstanceHttpRequest request
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneInstanceResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyInstanceHttpRequest request = SetIamPolicyInstanceHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setZoneSetPolicyRequestResource(zoneSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = instanceClient.setIamPolicyInstanceCallable().futureCall(request);
@@ -2131,10 +2232,10 @@ public final Operation setLabelsInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetLabelsRequest instancesSetLabelsRequestResource = InstancesSetLabelsRequest.newBuilder().build();
    *   SetLabelsInstanceHttpRequest request = SetLabelsInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetLabelsRequestResource(instancesSetLabelsRequestResource)
    *     .build();
    *   Operation response = instanceClient.setLabelsInstance(request);
@@ -2158,10 +2259,10 @@ public final Operation setLabelsInstance(SetLabelsInstanceHttpRequest request) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetLabelsRequest instancesSetLabelsRequestResource = InstancesSetLabelsRequest.newBuilder().build();
    *   SetLabelsInstanceHttpRequest request = SetLabelsInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetLabelsRequestResource(instancesSetLabelsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setLabelsInstanceCallable().futureCall(request);
@@ -2250,10 +2351,10 @@ public final Operation setMachineResourcesInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource = InstancesSetMachineResourcesRequest.newBuilder().build();
    *   SetMachineResourcesInstanceHttpRequest request = SetMachineResourcesInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetMachineResourcesRequestResource(instancesSetMachineResourcesRequestResource)
    *     .build();
    *   Operation response = instanceClient.setMachineResourcesInstance(request);
@@ -2278,10 +2379,10 @@ public final Operation setMachineResourcesInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetMachineResourcesRequest instancesSetMachineResourcesRequestResource = InstancesSetMachineResourcesRequest.newBuilder().build();
    *   SetMachineResourcesInstanceHttpRequest request = SetMachineResourcesInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetMachineResourcesRequestResource(instancesSetMachineResourcesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setMachineResourcesInstanceCallable().futureCall(request);
@@ -2365,10 +2466,10 @@ public final Operation setMachineTypeInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource = InstancesSetMachineTypeRequest.newBuilder().build();
    *   SetMachineTypeInstanceHttpRequest request = SetMachineTypeInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetMachineTypeRequestResource(instancesSetMachineTypeRequestResource)
    *     .build();
    *   Operation response = instanceClient.setMachineTypeInstance(request);
@@ -2391,10 +2492,10 @@ public final Operation setMachineTypeInstance(SetMachineTypeInstanceHttpRequest
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetMachineTypeRequest instancesSetMachineTypeRequestResource = InstancesSetMachineTypeRequest.newBuilder().build();
    *   SetMachineTypeInstanceHttpRequest request = SetMachineTypeInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetMachineTypeRequestResource(instancesSetMachineTypeRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setMachineTypeInstanceCallable().futureCall(request);
@@ -2476,10 +2577,10 @@ public final Operation setMetadataInstance(String instance, Metadata metadataRes
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Metadata metadataResource = Metadata.newBuilder().build();
    *   SetMetadataInstanceHttpRequest request = SetMetadataInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setMetadataResource(metadataResource)
    *     .build();
    *   Operation response = instanceClient.setMetadataInstance(request);
@@ -2502,10 +2603,10 @@ public final Operation setMetadataInstance(SetMetadataInstanceHttpRequest reques
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Metadata metadataResource = Metadata.newBuilder().build();
    *   SetMetadataInstanceHttpRequest request = SetMetadataInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setMetadataResource(metadataResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setMetadataInstanceCallable().futureCall(request);
@@ -2593,10 +2694,10 @@ public final Operation setMinCpuPlatformInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource = InstancesSetMinCpuPlatformRequest.newBuilder().build();
    *   SetMinCpuPlatformInstanceHttpRequest request = SetMinCpuPlatformInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetMinCpuPlatformRequestResource(instancesSetMinCpuPlatformRequestResource)
    *     .build();
    *   Operation response = instanceClient.setMinCpuPlatformInstance(request);
@@ -2620,10 +2721,10 @@ public final Operation setMinCpuPlatformInstance(SetMinCpuPlatformInstanceHttpRe
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetMinCpuPlatformRequest instancesSetMinCpuPlatformRequestResource = InstancesSetMinCpuPlatformRequest.newBuilder().build();
    *   SetMinCpuPlatformInstanceHttpRequest request = SetMinCpuPlatformInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetMinCpuPlatformRequestResource(instancesSetMinCpuPlatformRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setMinCpuPlatformInstanceCallable().futureCall(request);
@@ -2705,10 +2806,10 @@ public final Operation setSchedulingInstance(String instance, Scheduling schedul
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Scheduling schedulingResource = Scheduling.newBuilder().build();
    *   SetSchedulingInstanceHttpRequest request = SetSchedulingInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setSchedulingResource(schedulingResource)
    *     .build();
    *   Operation response = instanceClient.setSchedulingInstance(request);
@@ -2731,10 +2832,10 @@ public final Operation setSchedulingInstance(SetSchedulingInstanceHttpRequest re
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Scheduling schedulingResource = Scheduling.newBuilder().build();
    *   SetSchedulingInstanceHttpRequest request = SetSchedulingInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setSchedulingResource(schedulingResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setSchedulingInstanceCallable().futureCall(request);
@@ -2822,10 +2923,10 @@ public final Operation setServiceAccountInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource = InstancesSetServiceAccountRequest.newBuilder().build();
    *   SetServiceAccountInstanceHttpRequest request = SetServiceAccountInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetServiceAccountRequestResource(instancesSetServiceAccountRequestResource)
    *     .build();
    *   Operation response = instanceClient.setServiceAccountInstance(request);
@@ -2849,10 +2950,10 @@ public final Operation setServiceAccountInstance(SetServiceAccountInstanceHttpRe
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesSetServiceAccountRequest instancesSetServiceAccountRequestResource = InstancesSetServiceAccountRequest.newBuilder().build();
    *   SetServiceAccountInstanceHttpRequest request = SetServiceAccountInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesSetServiceAccountRequestResource(instancesSetServiceAccountRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setServiceAccountInstanceCallable().futureCall(request);
@@ -2867,6 +2968,149 @@ public final Operation setServiceAccountInstance(SetServiceAccountInstanceHttpRe
     return stub.setServiceAccountInstanceCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Sets the Shielded Instance integrity policy for an instance. You can only use this method on a
+   * running instance. This method supports PATCH semantics and uses the JSON merge patch format and
+   * processing rules.
+   *
+   * 

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = ShieldedInstanceIntegrityPolicy.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   Operation response = instanceClient.setShieldedInstanceIntegrityPolicyInstance(instance, shieldedInstanceIntegrityPolicyResource, fieldMask);
+   * }
+   * 
+ * + * @param instance Name or id of the instance scoping this request. + * @param shieldedInstanceIntegrityPolicyResource The policy describes the baseline against which + * Instance boot integrity is measured. + * @param fieldMask The fields that should be serialized (even if they have empty values). If the + * containing message object has a non-null fieldmask, then all the fields in the field mask + * (and only those fields in the field mask) will be serialized. If the containing object does + * not have a fieldmask, then only non-empty fields will be serialized. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation setShieldedInstanceIntegrityPolicyInstance( + ProjectZoneInstanceName instance, + ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource, + List fieldMask) { + + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest request = + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.newBuilder() + .setInstance(instance == null ? null : instance.toString()) + .setShieldedInstanceIntegrityPolicyResource(shieldedInstanceIntegrityPolicyResource) + .addAllFieldMask(fieldMask) + .build(); + return setShieldedInstanceIntegrityPolicyInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the Shielded Instance integrity policy for an instance. You can only use this method on a + * running instance. This method supports PATCH semantics and uses the JSON merge patch format and + * processing rules. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = ShieldedInstanceIntegrityPolicy.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   Operation response = instanceClient.setShieldedInstanceIntegrityPolicyInstance(instance.toString(), shieldedInstanceIntegrityPolicyResource, fieldMask);
+   * }
+   * 
+ * + * @param instance Name or id of the instance scoping this request. + * @param shieldedInstanceIntegrityPolicyResource The policy describes the baseline against which + * Instance boot integrity is measured. + * @param fieldMask The fields that should be serialized (even if they have empty values). If the + * containing message object has a non-null fieldmask, then all the fields in the field mask + * (and only those fields in the field mask) will be serialized. If the containing object does + * not have a fieldmask, then only non-empty fields will be serialized. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation setShieldedInstanceIntegrityPolicyInstance( + String instance, + ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource, + List fieldMask) { + + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest request = + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.newBuilder() + .setInstance(instance) + .setShieldedInstanceIntegrityPolicyResource(shieldedInstanceIntegrityPolicyResource) + .addAllFieldMask(fieldMask) + .build(); + return setShieldedInstanceIntegrityPolicyInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the Shielded Instance integrity policy for an instance. You can only use this method on a + * running instance. This method supports PATCH semantics and uses the JSON merge patch format and + * processing rules. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = ShieldedInstanceIntegrityPolicy.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   SetShieldedInstanceIntegrityPolicyInstanceHttpRequest request = SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .setShieldedInstanceIntegrityPolicyResource(shieldedInstanceIntegrityPolicyResource)
+   *     .addAllFieldMask(fieldMask)
+   *     .build();
+   *   Operation response = instanceClient.setShieldedInstanceIntegrityPolicyInstance(request);
+   * }
+   * 
+ * + * @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 + public final Operation setShieldedInstanceIntegrityPolicyInstance( + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest request) { + return setShieldedInstanceIntegrityPolicyInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the Shielded Instance integrity policy for an instance. You can only use this method on a + * running instance. This method supports PATCH semantics and uses the JSON merge patch format and + * processing rules. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = ShieldedInstanceIntegrityPolicy.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   SetShieldedInstanceIntegrityPolicyInstanceHttpRequest request = SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .setShieldedInstanceIntegrityPolicyResource(shieldedInstanceIntegrityPolicyResource)
+   *     .addAllFieldMask(fieldMask)
+   *     .build();
+   *   ApiFuture<Operation> future = instanceClient.setShieldedInstanceIntegrityPolicyInstanceCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + setShieldedInstanceIntegrityPolicyInstanceCallable() { + return stub.setShieldedInstanceIntegrityPolicyInstanceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Sets network tags for the specified instance to the data included in the request. @@ -2933,10 +3177,10 @@ public final Operation setTagsInstance(String instance, Tags tagsResource) { * *

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Tags tagsResource = Tags.newBuilder().build();
    *   SetTagsInstanceHttpRequest request = SetTagsInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setTagsResource(tagsResource)
    *     .build();
    *   Operation response = instanceClient.setTagsInstance(request);
@@ -2959,10 +3203,10 @@ public final Operation setTagsInstance(SetTagsInstanceHttpRequest request) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   Tags tagsResource = Tags.newBuilder().build();
    *   SetTagsInstanceHttpRequest request = SetTagsInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setTagsResource(tagsResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.setTagsInstanceCallable().futureCall(request);
@@ -3034,9 +3278,9 @@ public final Operation simulateMaintenanceEventInstance(String instance) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   SimulateMaintenanceEventInstanceHttpRequest request = SimulateMaintenanceEventInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   Operation response = instanceClient.simulateMaintenanceEventInstance(request);
    * }
@@ -3059,9 +3303,9 @@ public final Operation simulateMaintenanceEventInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   SimulateMaintenanceEventInstanceHttpRequest request = SimulateMaintenanceEventInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.simulateMaintenanceEventInstanceCallable().futureCall(request);
    *   // Do something
@@ -3136,9 +3380,9 @@ public final Operation startInstance(String instance) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   StartInstanceHttpRequest request = StartInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   Operation response = instanceClient.startInstance(request);
    * }
@@ -3161,9 +3405,9 @@ public final Operation startInstance(StartInstanceHttpRequest request) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   StartInstanceHttpRequest request = StartInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.startInstanceCallable().futureCall(request);
    *   // Do something
@@ -3251,10 +3495,10 @@ public final Operation startWithEncryptionKeyInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource = InstancesStartWithEncryptionKeyRequest.newBuilder().build();
    *   StartWithEncryptionKeyInstanceHttpRequest request = StartWithEncryptionKeyInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesStartWithEncryptionKeyRequestResource(instancesStartWithEncryptionKeyRequestResource)
    *     .build();
    *   Operation response = instanceClient.startWithEncryptionKeyInstance(request);
@@ -3279,10 +3523,10 @@ public final Operation startWithEncryptionKeyInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   InstancesStartWithEncryptionKeyRequest instancesStartWithEncryptionKeyRequestResource = InstancesStartWithEncryptionKeyRequest.newBuilder().build();
    *   StartWithEncryptionKeyInstanceHttpRequest request = StartWithEncryptionKeyInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setInstancesStartWithEncryptionKeyRequestResource(instancesStartWithEncryptionKeyRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.startWithEncryptionKeyInstanceCallable().futureCall(request);
@@ -3364,9 +3608,9 @@ public final Operation stopInstance(String instance) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   StopInstanceHttpRequest request = StopInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   Operation response = instanceClient.stopInstance(request);
    * }
@@ -3391,9 +3635,9 @@ public final Operation stopInstance(StopInstanceHttpRequest request) {
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   StopInstanceHttpRequest request = StopInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .build();
    *   ApiFuture<Operation> future = instanceClient.stopInstanceCallable().futureCall(request);
    *   // Do something
@@ -3475,10 +3719,10 @@ public final TestPermissionsResponse testIamPermissionsInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneInstanceResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsInstanceHttpRequest request = TestIamPermissionsInstanceHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = instanceClient.testIamPermissionsInstance(request);
@@ -3502,10 +3746,10 @@ public final TestPermissionsResponse testIamPermissionsInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceResourceName resource = ProjectZoneInstanceResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneInstanceResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsInstanceHttpRequest request = TestIamPermissionsInstanceHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = instanceClient.testIamPermissionsInstanceCallable().futureCall(request);
@@ -3604,11 +3848,11 @@ public final Operation updateAccessConfigInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String networkInterface = "";
    *   AccessConfig accessConfigResource = AccessConfig.newBuilder().build();
    *   UpdateAccessConfigInstanceHttpRequest request = UpdateAccessConfigInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setNetworkInterface(networkInterface)
    *     .setAccessConfigResource(accessConfigResource)
    *     .build();
@@ -3634,11 +3878,11 @@ public final Operation updateAccessConfigInstance(UpdateAccessConfigInstanceHttp
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String networkInterface = "";
    *   AccessConfig accessConfigResource = AccessConfig.newBuilder().build();
    *   UpdateAccessConfigInstanceHttpRequest request = UpdateAccessConfigInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setNetworkInterface(networkInterface)
    *     .setAccessConfigResource(accessConfigResource)
    *     .build();
@@ -3746,12 +3990,12 @@ public final Operation updateNetworkInterfaceInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String networkInterface = "";
    *   NetworkInterface networkInterfaceResource = NetworkInterface.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateNetworkInterfaceInstanceHttpRequest request = UpdateNetworkInterfaceInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setNetworkInterface(networkInterface)
    *     .setNetworkInterfaceResource(networkInterfaceResource)
    *     .addAllFieldMask(fieldMask)
@@ -3777,12 +4021,12 @@ public final Operation updateNetworkInterfaceInstance(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
-   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
    *   String networkInterface = "";
    *   NetworkInterface networkInterfaceResource = NetworkInterface.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateNetworkInterfaceInstanceHttpRequest request = UpdateNetworkInterfaceInstanceHttpRequest.newBuilder()
-   *     .setInstance(instance.toString())
+   *     .setInstance(formattedInstance)
    *     .setNetworkInterface(networkInterface)
    *     .setNetworkInterfaceResource(networkInterfaceResource)
    *     .addAllFieldMask(fieldMask)
@@ -3799,6 +4043,147 @@ public final Operation updateNetworkInterfaceInstance(
     return stub.updateNetworkInterfaceInstanceCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Updates the Shielded Instance config for an instance. You can only use this method on a stopped
+   * instance. This method supports PATCH semantics and uses the JSON merge patch format and
+   * processing rules.
+   *
+   * 

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceConfig shieldedInstanceConfigResource = ShieldedInstanceConfig.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   Operation response = instanceClient.updateShieldedInstanceConfigInstance(instance, shieldedInstanceConfigResource, fieldMask);
+   * }
+   * 
+ * + * @param instance Name or id of the instance scoping this request. + * @param shieldedInstanceConfigResource A set of Shielded Instance options. + * @param fieldMask The fields that should be serialized (even if they have empty values). If the + * containing message object has a non-null fieldmask, then all the fields in the field mask + * (and only those fields in the field mask) will be serialized. If the containing object does + * not have a fieldmask, then only non-empty fields will be serialized. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation updateShieldedInstanceConfigInstance( + ProjectZoneInstanceName instance, + ShieldedInstanceConfig shieldedInstanceConfigResource, + List fieldMask) { + + UpdateShieldedInstanceConfigInstanceHttpRequest request = + UpdateShieldedInstanceConfigInstanceHttpRequest.newBuilder() + .setInstance(instance == null ? null : instance.toString()) + .setShieldedInstanceConfigResource(shieldedInstanceConfigResource) + .addAllFieldMask(fieldMask) + .build(); + return updateShieldedInstanceConfigInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates the Shielded Instance config for an instance. You can only use this method on a stopped + * instance. This method supports PATCH semantics and uses the JSON merge patch format and + * processing rules. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceConfig shieldedInstanceConfigResource = ShieldedInstanceConfig.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   Operation response = instanceClient.updateShieldedInstanceConfigInstance(instance.toString(), shieldedInstanceConfigResource, fieldMask);
+   * }
+   * 
+ * + * @param instance Name or id of the instance scoping this request. + * @param shieldedInstanceConfigResource A set of Shielded Instance options. + * @param fieldMask The fields that should be serialized (even if they have empty values). If the + * containing message object has a non-null fieldmask, then all the fields in the field mask + * (and only those fields in the field mask) will be serialized. If the containing object does + * not have a fieldmask, then only non-empty fields will be serialized. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation updateShieldedInstanceConfigInstance( + String instance, + ShieldedInstanceConfig shieldedInstanceConfigResource, + List fieldMask) { + + UpdateShieldedInstanceConfigInstanceHttpRequest request = + UpdateShieldedInstanceConfigInstanceHttpRequest.newBuilder() + .setInstance(instance) + .setShieldedInstanceConfigResource(shieldedInstanceConfigResource) + .addAllFieldMask(fieldMask) + .build(); + return updateShieldedInstanceConfigInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates the Shielded Instance config for an instance. You can only use this method on a stopped + * instance. This method supports PATCH semantics and uses the JSON merge patch format and + * processing rules. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceConfig shieldedInstanceConfigResource = ShieldedInstanceConfig.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   UpdateShieldedInstanceConfigInstanceHttpRequest request = UpdateShieldedInstanceConfigInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .setShieldedInstanceConfigResource(shieldedInstanceConfigResource)
+   *     .addAllFieldMask(fieldMask)
+   *     .build();
+   *   Operation response = instanceClient.updateShieldedInstanceConfigInstance(request);
+   * }
+   * 
+ * + * @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 + public final Operation updateShieldedInstanceConfigInstance( + UpdateShieldedInstanceConfigInstanceHttpRequest request) { + return updateShieldedInstanceConfigInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates the Shielded Instance config for an instance. You can only use this method on a stopped + * instance. This method supports PATCH semantics and uses the JSON merge patch format and + * processing rules. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   ShieldedInstanceConfig shieldedInstanceConfigResource = ShieldedInstanceConfig.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   UpdateShieldedInstanceConfigInstanceHttpRequest request = UpdateShieldedInstanceConfigInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .setShieldedInstanceConfigResource(shieldedInstanceConfigResource)
+   *     .addAllFieldMask(fieldMask)
+   *     .build();
+   *   ApiFuture<Operation> future = instanceClient.updateShieldedInstanceConfigInstanceCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + updateShieldedInstanceConfigInstanceCallable() { + return stub.updateShieldedInstanceConfigInstanceCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java index 230022674f3c..376515636863 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java @@ -227,10 +227,10 @@ public final Operation addInstancesInstanceGroup( * *

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsAddInstancesRequest instanceGroupsAddInstancesRequestResource = InstanceGroupsAddInstancesRequest.newBuilder().build();
    *   AddInstancesInstanceGroupHttpRequest request = AddInstancesInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsAddInstancesRequestResource(instanceGroupsAddInstancesRequestResource)
    *     .build();
    *   Operation response = instanceGroupClient.addInstancesInstanceGroup(request);
@@ -254,10 +254,10 @@ public final Operation addInstancesInstanceGroup(AddInstancesInstanceGroupHttpRe
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsAddInstancesRequest instanceGroupsAddInstancesRequestResource = InstanceGroupsAddInstancesRequest.newBuilder().build();
    *   AddInstancesInstanceGroupHttpRequest request = AddInstancesInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsAddInstancesRequestResource(instanceGroupsAddInstancesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupClient.addInstancesInstanceGroupCallable().futureCall(request);
@@ -334,9 +334,9 @@ public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGro
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (InstanceGroupsScopedList element : instanceGroupClient.aggregatedListInstanceGroups(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -361,9 +361,9 @@ public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGro
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListInstanceGroupsPagedResponse> future = instanceGroupClient.aggregatedListInstanceGroupsPagedCallable().futureCall(request);
    *   // Do something
@@ -388,9 +388,9 @@ public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGro
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     InstanceGroupAggregatedList response = instanceGroupClient.aggregatedListInstanceGroupsCallable().call(request);
@@ -477,9 +477,9 @@ public final Operation deleteInstanceGroup(String instanceGroup) {
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   DeleteInstanceGroupHttpRequest request = DeleteInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .build();
    *   Operation response = instanceGroupClient.deleteInstanceGroup(request);
    * }
@@ -503,9 +503,9 @@ public final Operation deleteInstanceGroup(DeleteInstanceGroupHttpRequest reques
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   DeleteInstanceGroupHttpRequest request = DeleteInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupClient.deleteInstanceGroupCallable().futureCall(request);
    *   // Do something
@@ -580,9 +580,9 @@ public final InstanceGroup getInstanceGroup(String instanceGroup) {
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   GetInstanceGroupHttpRequest request = GetInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .build();
    *   InstanceGroup response = instanceGroupClient.getInstanceGroup(request);
    * }
@@ -605,9 +605,9 @@ public final InstanceGroup getInstanceGroup(GetInstanceGroupHttpRequest request)
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   GetInstanceGroupHttpRequest request = GetInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .build();
    *   ApiFuture<InstanceGroup> future = instanceGroupClient.getInstanceGroupCallable().futureCall(request);
    *   // Do something
@@ -695,10 +695,10 @@ public final Operation insertInstanceGroup(String zone, InstanceGroup instanceGr
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   InstanceGroup instanceGroupResource = InstanceGroup.newBuilder().build();
    *   InsertInstanceGroupHttpRequest request = InsertInstanceGroupHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setInstanceGroupResource(instanceGroupResource)
    *     .build();
    *   Operation response = instanceGroupClient.insertInstanceGroup(request);
@@ -722,10 +722,10 @@ public final Operation insertInstanceGroup(InsertInstanceGroupHttpRequest reques
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   InstanceGroup instanceGroupResource = InstanceGroup.newBuilder().build();
    *   InsertInstanceGroupHttpRequest request = InsertInstanceGroupHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setInstanceGroupResource(instanceGroupResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupClient.insertInstanceGroupCallable().futureCall(request);
@@ -800,9 +800,9 @@ public final ListInstanceGroupsPagedResponse listInstanceGroups(String zone) {
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstanceGroupsHttpRequest request = ListInstanceGroupsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (InstanceGroup element : instanceGroupClient.listInstanceGroups(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -827,9 +827,9 @@ public final ListInstanceGroupsPagedResponse listInstanceGroups(
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstanceGroupsHttpRequest request = ListInstanceGroupsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListInstanceGroupsPagedResponse> future = instanceGroupClient.listInstanceGroupsPagedCallable().futureCall(request);
    *   // Do something
@@ -853,9 +853,9 @@ public final ListInstanceGroupsPagedResponse listInstanceGroups(
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstanceGroupsHttpRequest request = ListInstanceGroupsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     InstanceGroupList response = instanceGroupClient.listInstanceGroupsCallable().call(request);
@@ -954,10 +954,10 @@ public final ListInstancesInstanceGroupsPagedResponse listInstancesInstanceGroup
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsListInstancesRequest instanceGroupsListInstancesRequestResource = InstanceGroupsListInstancesRequest.newBuilder().build();
    *   ListInstancesInstanceGroupsHttpRequest request = ListInstancesInstanceGroupsHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsListInstancesRequestResource(instanceGroupsListInstancesRequestResource)
    *     .build();
    *   for (InstanceWithNamedPorts element : instanceGroupClient.listInstancesInstanceGroups(request).iterateAll()) {
@@ -983,10 +983,10 @@ public final ListInstancesInstanceGroupsPagedResponse listInstancesInstanceGroup
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsListInstancesRequest instanceGroupsListInstancesRequestResource = InstanceGroupsListInstancesRequest.newBuilder().build();
    *   ListInstancesInstanceGroupsHttpRequest request = ListInstancesInstanceGroupsHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsListInstancesRequestResource(instanceGroupsListInstancesRequestResource)
    *     .build();
    *   ApiFuture<ListInstancesInstanceGroupsPagedResponse> future = instanceGroupClient.listInstancesInstanceGroupsPagedCallable().futureCall(request);
@@ -1012,10 +1012,10 @@ public final ListInstancesInstanceGroupsPagedResponse listInstancesInstanceGroup
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsListInstancesRequest instanceGroupsListInstancesRequestResource = InstanceGroupsListInstancesRequest.newBuilder().build();
    *   ListInstancesInstanceGroupsHttpRequest request = ListInstancesInstanceGroupsHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsListInstancesRequestResource(instanceGroupsListInstancesRequestResource)
    *     .build();
    *   while (true) {
@@ -1128,10 +1128,10 @@ public final Operation removeInstancesInstanceGroup(
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsRemoveInstancesRequest instanceGroupsRemoveInstancesRequestResource = InstanceGroupsRemoveInstancesRequest.newBuilder().build();
    *   RemoveInstancesInstanceGroupHttpRequest request = RemoveInstancesInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsRemoveInstancesRequestResource(instanceGroupsRemoveInstancesRequestResource)
    *     .build();
    *   Operation response = instanceGroupClient.removeInstancesInstanceGroup(request);
@@ -1160,10 +1160,10 @@ public final Operation removeInstancesInstanceGroup(
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsRemoveInstancesRequest instanceGroupsRemoveInstancesRequestResource = InstanceGroupsRemoveInstancesRequest.newBuilder().build();
    *   RemoveInstancesInstanceGroupHttpRequest request = RemoveInstancesInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsRemoveInstancesRequestResource(instanceGroupsRemoveInstancesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupClient.removeInstancesInstanceGroupCallable().futureCall(request);
@@ -1250,10 +1250,10 @@ public final Operation setNamedPortsInstanceGroup(
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsSetNamedPortsRequest instanceGroupsSetNamedPortsRequestResource = InstanceGroupsSetNamedPortsRequest.newBuilder().build();
    *   SetNamedPortsInstanceGroupHttpRequest request = SetNamedPortsInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsSetNamedPortsRequestResource(instanceGroupsSetNamedPortsRequestResource)
    *     .build();
    *   Operation response = instanceGroupClient.setNamedPortsInstanceGroup(request);
@@ -1276,10 +1276,10 @@ public final Operation setNamedPortsInstanceGroup(SetNamedPortsInstanceGroupHttp
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
-   *   ProjectZoneInstanceGroupName instanceGroup = ProjectZoneInstanceGroupName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectZoneInstanceGroupName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP]");
    *   InstanceGroupsSetNamedPortsRequest instanceGroupsSetNamedPortsRequestResource = InstanceGroupsSetNamedPortsRequest.newBuilder().build();
    *   SetNamedPortsInstanceGroupHttpRequest request = SetNamedPortsInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setInstanceGroupsSetNamedPortsRequestResource(instanceGroupsSetNamedPortsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupClient.setNamedPortsInstanceGroupCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java
index 98daac1376c1..2bc54860411d 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java
@@ -266,10 +266,10 @@ public final Operation abandonInstancesInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersAbandonInstancesRequest instanceGroupManagersAbandonInstancesRequestResource = InstanceGroupManagersAbandonInstancesRequest.newBuilder().build();
    *   AbandonInstancesInstanceGroupManagerHttpRequest request = AbandonInstancesInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersAbandonInstancesRequestResource(instanceGroupManagersAbandonInstancesRequestResource)
    *     .build();
    *   Operation response = instanceGroupManagerClient.abandonInstancesInstanceGroupManager(request);
@@ -305,10 +305,10 @@ public final Operation abandonInstancesInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersAbandonInstancesRequest instanceGroupManagersAbandonInstancesRequestResource = InstanceGroupManagersAbandonInstancesRequest.newBuilder().build();
    *   AbandonInstancesInstanceGroupManagerHttpRequest request = AbandonInstancesInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersAbandonInstancesRequestResource(instanceGroupManagersAbandonInstancesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupManagerClient.abandonInstancesInstanceGroupManagerCallable().futureCall(request);
@@ -385,9 +385,9 @@ public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInst
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupManagersHttpRequest request = AggregatedListInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (InstanceGroupManagersScopedList element : instanceGroupManagerClient.aggregatedListInstanceGroupManagers(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -412,9 +412,9 @@ public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInst
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupManagersHttpRequest request = AggregatedListInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListInstanceGroupManagersPagedResponse> future = instanceGroupManagerClient.aggregatedListInstanceGroupManagersPagedCallable().futureCall(request);
    *   // Do something
@@ -440,9 +440,9 @@ public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInst
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupManagersHttpRequest request = AggregatedListInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     InstanceGroupManagerAggregatedList response = instanceGroupManagerClient.aggregatedListInstanceGroupManagersCallable().call(request);
@@ -534,9 +534,9 @@ public final Operation deleteInstanceGroupManager(String instanceGroupManager) {
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   DeleteInstanceGroupManagerHttpRequest request = DeleteInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   Operation response = instanceGroupManagerClient.deleteInstanceGroupManager(request);
    * }
@@ -560,9 +560,9 @@ public final Operation deleteInstanceGroupManager(DeleteInstanceGroupManagerHttp
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   DeleteInstanceGroupManagerHttpRequest request = DeleteInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupManagerClient.deleteInstanceGroupManagerCallable().futureCall(request);
    *   // Do something
@@ -684,10 +684,10 @@ public final Operation deleteInstancesInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersDeleteInstancesRequest instanceGroupManagersDeleteInstancesRequestResource = InstanceGroupManagersDeleteInstancesRequest.newBuilder().build();
    *   DeleteInstancesInstanceGroupManagerHttpRequest request = DeleteInstancesInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersDeleteInstancesRequestResource(instanceGroupManagersDeleteInstancesRequestResource)
    *     .build();
    *   Operation response = instanceGroupManagerClient.deleteInstancesInstanceGroupManager(request);
@@ -722,10 +722,10 @@ public final Operation deleteInstancesInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersDeleteInstancesRequest instanceGroupManagersDeleteInstancesRequestResource = InstanceGroupManagersDeleteInstancesRequest.newBuilder().build();
    *   DeleteInstancesInstanceGroupManagerHttpRequest request = DeleteInstancesInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersDeleteInstancesRequestResource(instanceGroupManagersDeleteInstancesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupManagerClient.deleteInstancesInstanceGroupManagerCallable().futureCall(request);
@@ -805,9 +805,9 @@ public final InstanceGroupManager getInstanceGroupManager(String instanceGroupMa
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   GetInstanceGroupManagerHttpRequest request = GetInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   InstanceGroupManager response = instanceGroupManagerClient.getInstanceGroupManager(request);
    * }
@@ -831,9 +831,9 @@ public final InstanceGroupManager getInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   GetInstanceGroupManagerHttpRequest request = GetInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   ApiFuture<InstanceGroupManager> future = instanceGroupManagerClient.getInstanceGroupManagerCallable().futureCall(request);
    *   // Do something
@@ -942,10 +942,10 @@ public final Operation insertInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
    *   InsertInstanceGroupManagerHttpRequest request = InsertInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setInstanceGroupManagerResource(instanceGroupManagerResource)
    *     .build();
    *   Operation response = instanceGroupManagerClient.insertInstanceGroupManager(request);
@@ -975,10 +975,10 @@ public final Operation insertInstanceGroupManager(InsertInstanceGroupManagerHttp
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
    *   InsertInstanceGroupManagerHttpRequest request = InsertInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setInstanceGroupManagerResource(instanceGroupManagerResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupManagerClient.insertInstanceGroupManagerCallable().futureCall(request);
@@ -1057,9 +1057,9 @@ public final ListInstanceGroupManagersPagedResponse listInstanceGroupManagers(St
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstanceGroupManagersHttpRequest request = ListInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (InstanceGroupManager element : instanceGroupManagerClient.listInstanceGroupManagers(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -1085,9 +1085,9 @@ public final ListInstanceGroupManagersPagedResponse listInstanceGroupManagers(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstanceGroupManagersHttpRequest request = ListInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListInstanceGroupManagersPagedResponse> future = instanceGroupManagerClient.listInstanceGroupManagersPagedCallable().futureCall(request);
    *   // Do something
@@ -1113,9 +1113,9 @@ public final ListInstanceGroupManagersPagedResponse listInstanceGroupManagers(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListInstanceGroupManagersHttpRequest request = ListInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     InstanceGroupManagerList response = instanceGroupManagerClient.listInstanceGroupManagersCallable().call(request);
@@ -1211,9 +1211,9 @@ public final ListInstanceGroupManagersPagedResponse listInstanceGroupManagers(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   ListManagedInstancesInstanceGroupManagersHttpRequest request = ListManagedInstancesInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   InstanceGroupManagersListManagedInstancesResponse response = instanceGroupManagerClient.listManagedInstancesInstanceGroupManagers(request);
    * }
@@ -1240,9 +1240,9 @@ public final ListInstanceGroupManagersPagedResponse listInstanceGroupManagers(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   ListManagedInstancesInstanceGroupManagersHttpRequest request = ListManagedInstancesInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   ApiFuture<InstanceGroupManagersListManagedInstancesResponse> future = instanceGroupManagerClient.listManagedInstancesInstanceGroupManagersCallable().futureCall(request);
    *   // Do something
@@ -1361,11 +1361,11 @@ public final Operation patchInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchInstanceGroupManagerHttpRequest request = PatchInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagerResource(instanceGroupManagerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1393,11 +1393,11 @@ public final Operation patchInstanceGroupManager(PatchInstanceGroupManagerHttpRe
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchInstanceGroupManagerHttpRequest request = PatchInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagerResource(instanceGroupManagerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1518,10 +1518,10 @@ public final Operation recreateInstancesInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersRecreateInstancesRequest instanceGroupManagersRecreateInstancesRequestResource = InstanceGroupManagersRecreateInstancesRequest.newBuilder().build();
    *   RecreateInstancesInstanceGroupManagerHttpRequest request = RecreateInstancesInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersRecreateInstancesRequestResource(instanceGroupManagersRecreateInstancesRequestResource)
    *     .build();
    *   Operation response = instanceGroupManagerClient.recreateInstancesInstanceGroupManager(request);
@@ -1555,10 +1555,10 @@ public final Operation recreateInstancesInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersRecreateInstancesRequest instanceGroupManagersRecreateInstancesRequestResource = InstanceGroupManagersRecreateInstancesRequest.newBuilder().build();
    *   RecreateInstancesInstanceGroupManagerHttpRequest request = RecreateInstancesInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersRecreateInstancesRequestResource(instanceGroupManagersRecreateInstancesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupManagerClient.recreateInstancesInstanceGroupManagerCallable().futureCall(request);
@@ -1697,10 +1697,10 @@ public final Operation resizeInstanceGroupManager(Integer size, String instanceG
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
    *   Integer size = 0;
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   ResizeInstanceGroupManagerHttpRequest request = ResizeInstanceGroupManagerHttpRequest.newBuilder()
    *     .setSize(size)
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   Operation response = instanceGroupManagerClient.resizeInstanceGroupManager(request);
    * }
@@ -1740,10 +1740,10 @@ public final Operation resizeInstanceGroupManager(ResizeInstanceGroupManagerHttp
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
    *   Integer size = 0;
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   ResizeInstanceGroupManagerHttpRequest request = ResizeInstanceGroupManagerHttpRequest.newBuilder()
    *     .setSize(size)
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupManagerClient.resizeInstanceGroupManagerCallable().futureCall(request);
    *   // Do something
@@ -1835,10 +1835,10 @@ public final Operation setInstanceTemplateInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersSetInstanceTemplateRequest instanceGroupManagersSetInstanceTemplateRequestResource = InstanceGroupManagersSetInstanceTemplateRequest.newBuilder().build();
    *   SetInstanceTemplateInstanceGroupManagerHttpRequest request = SetInstanceTemplateInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersSetInstanceTemplateRequestResource(instanceGroupManagersSetInstanceTemplateRequestResource)
    *     .build();
    *   Operation response = instanceGroupManagerClient.setInstanceTemplateInstanceGroupManager(request);
@@ -1863,10 +1863,10 @@ public final Operation setInstanceTemplateInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersSetInstanceTemplateRequest instanceGroupManagersSetInstanceTemplateRequestResource = InstanceGroupManagersSetInstanceTemplateRequest.newBuilder().build();
    *   SetInstanceTemplateInstanceGroupManagerHttpRequest request = SetInstanceTemplateInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersSetInstanceTemplateRequestResource(instanceGroupManagersSetInstanceTemplateRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupManagerClient.setInstanceTemplateInstanceGroupManagerCallable().futureCall(request);
@@ -1968,10 +1968,10 @@ public final Operation setTargetPoolsInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersSetTargetPoolsRequest instanceGroupManagersSetTargetPoolsRequestResource = InstanceGroupManagersSetTargetPoolsRequest.newBuilder().build();
    *   SetTargetPoolsInstanceGroupManagerHttpRequest request = SetTargetPoolsInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersSetTargetPoolsRequestResource(instanceGroupManagersSetTargetPoolsRequestResource)
    *     .build();
    *   Operation response = instanceGroupManagerClient.setTargetPoolsInstanceGroupManager(request);
@@ -1999,10 +1999,10 @@ public final Operation setTargetPoolsInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
-   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManagersSetTargetPoolsRequest instanceGroupManagersSetTargetPoolsRequestResource = InstanceGroupManagersSetTargetPoolsRequest.newBuilder().build();
    *   SetTargetPoolsInstanceGroupManagerHttpRequest request = SetTargetPoolsInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagersSetTargetPoolsRequestResource(instanceGroupManagersSetTargetPoolsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceGroupManagerClient.setTargetPoolsInstanceGroupManagerCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java
index d26c973954bc..3693f98162f7 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java
@@ -38,6 +38,7 @@ public final class InstanceProperties implements ApiMessage {
   private final List networkInterfaces;
   private final Scheduling scheduling;
   private final List serviceAccounts;
+  private final ShieldedInstanceConfig shieldedInstanceConfig;
   private final Tags tags;
 
   private InstanceProperties() {
@@ -52,6 +53,7 @@ private InstanceProperties() {
     this.networkInterfaces = null;
     this.scheduling = null;
     this.serviceAccounts = null;
+    this.shieldedInstanceConfig = null;
     this.tags = null;
   }
 
@@ -67,6 +69,7 @@ private InstanceProperties(
       List networkInterfaces,
       Scheduling scheduling,
       List serviceAccounts,
+      ShieldedInstanceConfig shieldedInstanceConfig,
       Tags tags) {
     this.canIpForward = canIpForward;
     this.description = description;
@@ -79,6 +82,7 @@ private InstanceProperties(
     this.networkInterfaces = networkInterfaces;
     this.scheduling = scheduling;
     this.serviceAccounts = serviceAccounts;
+    this.shieldedInstanceConfig = shieldedInstanceConfig;
     this.tags = tags;
   }
 
@@ -117,6 +121,9 @@ public Object getFieldValue(String fieldName) {
     if ("serviceAccounts".equals(fieldName)) {
       return serviceAccounts;
     }
+    if ("shieldedInstanceConfig".equals(fieldName)) {
+      return shieldedInstanceConfig;
+    }
     if ("tags".equals(fieldName)) {
       return tags;
     }
@@ -222,6 +229,10 @@ public List getServiceAccountsList() {
     return serviceAccounts;
   }
 
+  public ShieldedInstanceConfig getShieldedInstanceConfig() {
+    return shieldedInstanceConfig;
+  }
+
   /**
    * A list of tags to apply to the instances that are created from this template. The tags identify
    * valid sources or targets for network firewalls. The setTags method can modify this list of
@@ -265,6 +276,7 @@ public static class Builder {
     private List networkInterfaces;
     private Scheduling scheduling;
     private List serviceAccounts;
+    private ShieldedInstanceConfig shieldedInstanceConfig;
     private Tags tags;
 
     Builder() {}
@@ -304,6 +316,9 @@ public Builder mergeFrom(InstanceProperties other) {
       if (other.getServiceAccountsList() != null) {
         this.serviceAccounts = other.serviceAccounts;
       }
+      if (other.getShieldedInstanceConfig() != null) {
+        this.shieldedInstanceConfig = other.shieldedInstanceConfig;
+      }
       if (other.getTags() != null) {
         this.tags = other.tags;
       }
@@ -322,6 +337,7 @@ public Builder mergeFrom(InstanceProperties other) {
       this.networkInterfaces = source.networkInterfaces;
       this.scheduling = source.scheduling;
       this.serviceAccounts = source.serviceAccounts;
+      this.shieldedInstanceConfig = source.shieldedInstanceConfig;
       this.tags = source.tags;
     }
 
@@ -555,6 +571,15 @@ public Builder addServiceAccounts(ServiceAccount serviceAccounts) {
       return this;
     }
 
+    public ShieldedInstanceConfig getShieldedInstanceConfig() {
+      return shieldedInstanceConfig;
+    }
+
+    public Builder setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig) {
+      this.shieldedInstanceConfig = shieldedInstanceConfig;
+      return this;
+    }
+
     /**
      * A list of tags to apply to the instances that are created from this template. The tags
      * identify valid sources or targets for network firewalls. The setTags method can modify this
@@ -588,6 +613,7 @@ public InstanceProperties build() {
           networkInterfaces,
           scheduling,
           serviceAccounts,
+          shieldedInstanceConfig,
           tags);
     }
 
@@ -604,6 +630,7 @@ public Builder clone() {
       newBuilder.addAllNetworkInterfaces(this.networkInterfaces);
       newBuilder.setScheduling(this.scheduling);
       newBuilder.addAllServiceAccounts(this.serviceAccounts);
+      newBuilder.setShieldedInstanceConfig(this.shieldedInstanceConfig);
       newBuilder.setTags(this.tags);
       return newBuilder;
     }
@@ -645,6 +672,9 @@ public String toString() {
         + "serviceAccounts="
         + serviceAccounts
         + ", "
+        + "shieldedInstanceConfig="
+        + shieldedInstanceConfig
+        + ", "
         + "tags="
         + tags
         + "}";
@@ -668,6 +698,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.networkInterfaces, that.getNetworkInterfacesList())
           && Objects.equals(this.scheduling, that.getScheduling())
           && Objects.equals(this.serviceAccounts, that.getServiceAccountsList())
+          && Objects.equals(this.shieldedInstanceConfig, that.getShieldedInstanceConfig())
           && Objects.equals(this.tags, that.getTags());
     }
     return false;
@@ -687,6 +718,7 @@ public int hashCode() {
         networkInterfaces,
         scheduling,
         serviceAccounts,
+        shieldedInstanceConfig,
         tags);
   }
 }
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceSettings.java
index b4c674af0497..5aecfee1e00f 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceSettings.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceSettings.java
@@ -117,6 +117,12 @@ public UnaryCallSettings getIamPolicyIn
     return ((InstanceStubSettings) getStubSettings()).getSerialPortOutputInstanceSettings();
   }
 
+  /** Returns the object with the settings used for calls to getShieldedInstanceIdentityInstance. */
+  public UnaryCallSettings
+      getShieldedInstanceIdentityInstanceSettings() {
+    return ((InstanceStubSettings) getStubSettings()).getShieldedInstanceIdentityInstanceSettings();
+  }
+
   /** Returns the object with the settings used for calls to insertInstance. */
   public UnaryCallSettings insertInstanceSettings() {
     return ((InstanceStubSettings) getStubSettings()).insertInstanceSettings();
@@ -200,6 +206,16 @@ public UnaryCallSettings setLabelsInsta
     return ((InstanceStubSettings) getStubSettings()).setServiceAccountInstanceSettings();
   }
 
+  /**
+   * Returns the object with the settings used for calls to
+   * setShieldedInstanceIntegrityPolicyInstance.
+   */
+  public UnaryCallSettings
+      setShieldedInstanceIntegrityPolicyInstanceSettings() {
+    return ((InstanceStubSettings) getStubSettings())
+        .setShieldedInstanceIntegrityPolicyInstanceSettings();
+  }
+
   /** Returns the object with the settings used for calls to setTagsInstance. */
   public UnaryCallSettings setTagsInstanceSettings() {
     return ((InstanceStubSettings) getStubSettings()).setTagsInstanceSettings();
@@ -245,6 +261,15 @@ public UnaryCallSettings stopInstanceSetting
     return ((InstanceStubSettings) getStubSettings()).updateNetworkInterfaceInstanceSettings();
   }
 
+  /**
+   * Returns the object with the settings used for calls to updateShieldedInstanceConfigInstance.
+   */
+  public UnaryCallSettings
+      updateShieldedInstanceConfigInstanceSettings() {
+    return ((InstanceStubSettings) getStubSettings())
+        .updateShieldedInstanceConfigInstanceSettings();
+  }
+
   public static final InstanceSettings create(InstanceStubSettings stub) throws IOException {
     return new InstanceSettings.Builder(stub.toBuilder()).build();
   }
@@ -402,6 +427,15 @@ public UnaryCallSettings.Builder getInstanceSe
       return getStubSettingsBuilder().getSerialPortOutputInstanceSettings();
     }
 
+    /**
+     * Returns the builder for the settings used for calls to getShieldedInstanceIdentityInstance.
+     */
+    public UnaryCallSettings.Builder<
+            GetShieldedInstanceIdentityInstanceHttpRequest, ShieldedInstanceIdentity>
+        getShieldedInstanceIdentityInstanceSettings() {
+      return getStubSettingsBuilder().getShieldedInstanceIdentityInstanceSettings();
+    }
+
     /** Returns the builder for the settings used for calls to insertInstance. */
     public UnaryCallSettings.Builder
         insertInstanceSettings() {
@@ -489,6 +523,16 @@ public UnaryCallSettings.Builder resetInsta
       return getStubSettingsBuilder().setServiceAccountInstanceSettings();
     }
 
+    /**
+     * Returns the builder for the settings used for calls to
+     * setShieldedInstanceIntegrityPolicyInstance.
+     */
+    public UnaryCallSettings.Builder<
+            SetShieldedInstanceIntegrityPolicyInstanceHttpRequest, Operation>
+        setShieldedInstanceIntegrityPolicyInstanceSettings() {
+      return getStubSettingsBuilder().setShieldedInstanceIntegrityPolicyInstanceSettings();
+    }
+
     /** Returns the builder for the settings used for calls to setTagsInstance. */
     public UnaryCallSettings.Builder
         setTagsInstanceSettings() {
@@ -535,6 +579,14 @@ public UnaryCallSettings.Builder stopInstanc
       return getStubSettingsBuilder().updateNetworkInterfaceInstanceSettings();
     }
 
+    /**
+     * Returns the builder for the settings used for calls to updateShieldedInstanceConfigInstance.
+     */
+    public UnaryCallSettings.Builder
+        updateShieldedInstanceConfigInstanceSettings() {
+      return getStubSettingsBuilder().updateShieldedInstanceConfigInstanceSettings();
+    }
+
     @Override
     public InstanceSettings build() throws IOException {
       return new InstanceSettings(this);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceTemplateClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceTemplateClient.java
index d53795c3e251..8bf6c79151d6 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceTemplateClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceTemplateClient.java
@@ -221,9 +221,9 @@ public final Operation deleteInstanceTemplate(String instanceTemplate) {
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateName instanceTemplate = ProjectGlobalInstanceTemplateName.of("[PROJECT]", "[INSTANCE_TEMPLATE]");
+   *   String formattedInstanceTemplate = ProjectGlobalInstanceTemplateName.format("[PROJECT]", "[INSTANCE_TEMPLATE]");
    *   DeleteInstanceTemplateHttpRequest request = DeleteInstanceTemplateHttpRequest.newBuilder()
-   *     .setInstanceTemplate(instanceTemplate.toString())
+   *     .setInstanceTemplate(formattedInstanceTemplate)
    *     .build();
    *   Operation response = instanceTemplateClient.deleteInstanceTemplate(request);
    * }
@@ -247,9 +247,9 @@ public final Operation deleteInstanceTemplate(DeleteInstanceTemplateHttpRequest
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateName instanceTemplate = ProjectGlobalInstanceTemplateName.of("[PROJECT]", "[INSTANCE_TEMPLATE]");
+   *   String formattedInstanceTemplate = ProjectGlobalInstanceTemplateName.format("[PROJECT]", "[INSTANCE_TEMPLATE]");
    *   DeleteInstanceTemplateHttpRequest request = DeleteInstanceTemplateHttpRequest.newBuilder()
-   *     .setInstanceTemplate(instanceTemplate.toString())
+   *     .setInstanceTemplate(formattedInstanceTemplate)
    *     .build();
    *   ApiFuture<Operation> future = instanceTemplateClient.deleteInstanceTemplateCallable().futureCall(request);
    *   // Do something
@@ -325,9 +325,9 @@ public final InstanceTemplate getInstanceTemplate(String instanceTemplate) {
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateName instanceTemplate = ProjectGlobalInstanceTemplateName.of("[PROJECT]", "[INSTANCE_TEMPLATE]");
+   *   String formattedInstanceTemplate = ProjectGlobalInstanceTemplateName.format("[PROJECT]", "[INSTANCE_TEMPLATE]");
    *   GetInstanceTemplateHttpRequest request = GetInstanceTemplateHttpRequest.newBuilder()
-   *     .setInstanceTemplate(instanceTemplate.toString())
+   *     .setInstanceTemplate(formattedInstanceTemplate)
    *     .build();
    *   InstanceTemplate response = instanceTemplateClient.getInstanceTemplate(request);
    * }
@@ -350,9 +350,9 @@ public final InstanceTemplate getInstanceTemplate(GetInstanceTemplateHttpRequest
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateName instanceTemplate = ProjectGlobalInstanceTemplateName.of("[PROJECT]", "[INSTANCE_TEMPLATE]");
+   *   String formattedInstanceTemplate = ProjectGlobalInstanceTemplateName.format("[PROJECT]", "[INSTANCE_TEMPLATE]");
    *   GetInstanceTemplateHttpRequest request = GetInstanceTemplateHttpRequest.newBuilder()
-   *     .setInstanceTemplate(instanceTemplate.toString())
+   *     .setInstanceTemplate(formattedInstanceTemplate)
    *     .build();
    *   ApiFuture<InstanceTemplate> future = instanceTemplateClient.getInstanceTemplateCallable().futureCall(request);
    *   // Do something
@@ -428,9 +428,9 @@ public final Policy getIamPolicyInstanceTemplate(String resource) {
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateResourceName resource = ProjectGlobalInstanceTemplateResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalInstanceTemplateResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GetIamPolicyInstanceTemplateHttpRequest request = GetIamPolicyInstanceTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = instanceTemplateClient.getIamPolicyInstanceTemplate(request);
    * }
@@ -454,9 +454,9 @@ public final Policy getIamPolicyInstanceTemplate(
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateResourceName resource = ProjectGlobalInstanceTemplateResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalInstanceTemplateResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GetIamPolicyInstanceTemplateHttpRequest request = GetIamPolicyInstanceTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = instanceTemplateClient.getIamPolicyInstanceTemplateCallable().futureCall(request);
    *   // Do something
@@ -549,10 +549,10 @@ public final Operation insertInstanceTemplate(
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   InstanceTemplate instanceTemplateResource = InstanceTemplate.newBuilder().build();
    *   InsertInstanceTemplateHttpRequest request = InsertInstanceTemplateHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setInstanceTemplateResource(instanceTemplateResource)
    *     .build();
    *   Operation response = instanceTemplateClient.insertInstanceTemplate(request);
@@ -578,10 +578,10 @@ public final Operation insertInstanceTemplate(InsertInstanceTemplateHttpRequest
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   InstanceTemplate instanceTemplateResource = InstanceTemplate.newBuilder().build();
    *   InsertInstanceTemplateHttpRequest request = InsertInstanceTemplateHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setInstanceTemplateResource(instanceTemplateResource)
    *     .build();
    *   ApiFuture<Operation> future = instanceTemplateClient.insertInstanceTemplateCallable().futureCall(request);
@@ -656,9 +656,9 @@ public final ListInstanceTemplatesPagedResponse listInstanceTemplates(String pro
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInstanceTemplatesHttpRequest request = ListInstanceTemplatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (InstanceTemplate element : instanceTemplateClient.listInstanceTemplates(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -683,9 +683,9 @@ public final ListInstanceTemplatesPagedResponse listInstanceTemplates(
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInstanceTemplatesHttpRequest request = ListInstanceTemplatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListInstanceTemplatesPagedResponse> future = instanceTemplateClient.listInstanceTemplatesPagedCallable().futureCall(request);
    *   // Do something
@@ -709,9 +709,9 @@ public final ListInstanceTemplatesPagedResponse listInstanceTemplates(
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInstanceTemplatesHttpRequest request = ListInstanceTemplatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     InstanceTemplateList response = instanceTemplateClient.listInstanceTemplatesCallable().call(request);
@@ -803,10 +803,10 @@ public final Policy setIamPolicyInstanceTemplate(
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateResourceName resource = ProjectGlobalInstanceTemplateResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalInstanceTemplateResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetPolicyRequest globalSetPolicyRequestResource = GlobalSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyInstanceTemplateHttpRequest request = SetIamPolicyInstanceTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
    *     .build();
    *   Policy response = instanceTemplateClient.setIamPolicyInstanceTemplate(request);
@@ -830,10 +830,10 @@ public final Policy setIamPolicyInstanceTemplate(
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateResourceName resource = ProjectGlobalInstanceTemplateResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalInstanceTemplateResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetPolicyRequest globalSetPolicyRequestResource = GlobalSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyInstanceTemplateHttpRequest request = SetIamPolicyInstanceTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = instanceTemplateClient.setIamPolicyInstanceTemplateCallable().futureCall(request);
@@ -917,10 +917,10 @@ public final TestPermissionsResponse testIamPermissionsInstanceTemplate(
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateResourceName resource = ProjectGlobalInstanceTemplateResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalInstanceTemplateResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsInstanceTemplateHttpRequest request = TestIamPermissionsInstanceTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = instanceTemplateClient.testIamPermissionsInstanceTemplate(request);
@@ -944,10 +944,10 @@ public final TestPermissionsResponse testIamPermissionsInstanceTemplate(
    *
    * 

    * try (InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient.create()) {
-   *   ProjectGlobalInstanceTemplateResourceName resource = ProjectGlobalInstanceTemplateResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalInstanceTemplateResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsInstanceTemplateHttpRequest request = TestIamPermissionsInstanceTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = instanceTemplateClient.testIamPermissionsInstanceTemplateCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java
index faeea674b4f0..a03eee6a2cf6 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java
@@ -217,9 +217,9 @@ public InterconnectAttachmentStub getStub() {
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInterconnectAttachmentsHttpRequest request = AggregatedListInterconnectAttachmentsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (InterconnectAttachmentsScopedList element : interconnectAttachmentClient.aggregatedListInterconnectAttachments(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -245,9 +245,9 @@ public InterconnectAttachmentStub getStub() {
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInterconnectAttachmentsHttpRequest request = AggregatedListInterconnectAttachmentsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListInterconnectAttachmentsPagedResponse> future = interconnectAttachmentClient.aggregatedListInterconnectAttachmentsPagedCallable().futureCall(request);
    *   // Do something
@@ -273,9 +273,9 @@ public InterconnectAttachmentStub getStub() {
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInterconnectAttachmentsHttpRequest request = AggregatedListInterconnectAttachmentsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     InterconnectAttachmentAggregatedList response = interconnectAttachmentClient.aggregatedListInterconnectAttachmentsCallable().call(request);
@@ -361,9 +361,9 @@ public final Operation deleteInterconnectAttachment(String interconnectAttachmen
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionInterconnectAttachmentName interconnectAttachment = ProjectRegionInterconnectAttachmentName.of("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
+   *   String formattedInterconnectAttachment = ProjectRegionInterconnectAttachmentName.format("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
    *   DeleteInterconnectAttachmentHttpRequest request = DeleteInterconnectAttachmentHttpRequest.newBuilder()
-   *     .setInterconnectAttachment(interconnectAttachment.toString())
+   *     .setInterconnectAttachment(formattedInterconnectAttachment)
    *     .build();
    *   Operation response = interconnectAttachmentClient.deleteInterconnectAttachment(request);
    * }
@@ -386,9 +386,9 @@ public final Operation deleteInterconnectAttachment(
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionInterconnectAttachmentName interconnectAttachment = ProjectRegionInterconnectAttachmentName.of("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
+   *   String formattedInterconnectAttachment = ProjectRegionInterconnectAttachmentName.format("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
    *   DeleteInterconnectAttachmentHttpRequest request = DeleteInterconnectAttachmentHttpRequest.newBuilder()
-   *     .setInterconnectAttachment(interconnectAttachment.toString())
+   *     .setInterconnectAttachment(formattedInterconnectAttachment)
    *     .build();
    *   ApiFuture<Operation> future = interconnectAttachmentClient.deleteInterconnectAttachmentCallable().futureCall(request);
    *   // Do something
@@ -464,9 +464,9 @@ public final InterconnectAttachment getInterconnectAttachment(String interconnec
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionInterconnectAttachmentName interconnectAttachment = ProjectRegionInterconnectAttachmentName.of("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
+   *   String formattedInterconnectAttachment = ProjectRegionInterconnectAttachmentName.format("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
    *   GetInterconnectAttachmentHttpRequest request = GetInterconnectAttachmentHttpRequest.newBuilder()
-   *     .setInterconnectAttachment(interconnectAttachment.toString())
+   *     .setInterconnectAttachment(formattedInterconnectAttachment)
    *     .build();
    *   InterconnectAttachment response = interconnectAttachmentClient.getInterconnectAttachment(request);
    * }
@@ -489,9 +489,9 @@ public final InterconnectAttachment getInterconnectAttachment(
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionInterconnectAttachmentName interconnectAttachment = ProjectRegionInterconnectAttachmentName.of("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
+   *   String formattedInterconnectAttachment = ProjectRegionInterconnectAttachmentName.format("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
    *   GetInterconnectAttachmentHttpRequest request = GetInterconnectAttachmentHttpRequest.newBuilder()
-   *     .setInterconnectAttachment(interconnectAttachment.toString())
+   *     .setInterconnectAttachment(formattedInterconnectAttachment)
    *     .build();
    *   ApiFuture<InterconnectAttachment> future = interconnectAttachmentClient.getInterconnectAttachmentCallable().futureCall(request);
    *   // Do something
@@ -580,10 +580,10 @@ public final Operation insertInterconnectAttachment(
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   InterconnectAttachment interconnectAttachmentResource = InterconnectAttachment.newBuilder().build();
    *   InsertInterconnectAttachmentHttpRequest request = InsertInterconnectAttachmentHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setInterconnectAttachmentResource(interconnectAttachmentResource)
    *     .build();
    *   Operation response = interconnectAttachmentClient.insertInterconnectAttachment(request);
@@ -608,10 +608,10 @@ public final Operation insertInterconnectAttachment(
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   InterconnectAttachment interconnectAttachmentResource = InterconnectAttachment.newBuilder().build();
    *   InsertInterconnectAttachmentHttpRequest request = InsertInterconnectAttachmentHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setInterconnectAttachmentResource(interconnectAttachmentResource)
    *     .build();
    *   ApiFuture<Operation> future = interconnectAttachmentClient.insertInterconnectAttachmentCallable().futureCall(request);
@@ -687,9 +687,9 @@ public final ListInterconnectAttachmentsPagedResponse listInterconnectAttachment
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListInterconnectAttachmentsHttpRequest request = ListInterconnectAttachmentsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (InterconnectAttachment element : interconnectAttachmentClient.listInterconnectAttachments(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -714,9 +714,9 @@ public final ListInterconnectAttachmentsPagedResponse listInterconnectAttachment
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListInterconnectAttachmentsHttpRequest request = ListInterconnectAttachmentsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListInterconnectAttachmentsPagedResponse> future = interconnectAttachmentClient.listInterconnectAttachmentsPagedCallable().futureCall(request);
    *   // Do something
@@ -741,9 +741,9 @@ public final ListInterconnectAttachmentsPagedResponse listInterconnectAttachment
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListInterconnectAttachmentsHttpRequest request = ListInterconnectAttachmentsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     InterconnectAttachmentList response = interconnectAttachmentClient.listInterconnectAttachmentsCallable().call(request);
@@ -858,11 +858,11 @@ public final Operation patchInterconnectAttachment(
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionInterconnectAttachmentName interconnectAttachment = ProjectRegionInterconnectAttachmentName.of("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
+   *   String formattedInterconnectAttachment = ProjectRegionInterconnectAttachmentName.format("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
    *   InterconnectAttachment interconnectAttachmentResource = InterconnectAttachment.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchInterconnectAttachmentHttpRequest request = PatchInterconnectAttachmentHttpRequest.newBuilder()
-   *     .setInterconnectAttachment(interconnectAttachment.toString())
+   *     .setInterconnectAttachment(formattedInterconnectAttachment)
    *     .setInterconnectAttachmentResource(interconnectAttachmentResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -888,11 +888,11 @@ public final Operation patchInterconnectAttachment(
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
-   *   ProjectRegionInterconnectAttachmentName interconnectAttachment = ProjectRegionInterconnectAttachmentName.of("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
+   *   String formattedInterconnectAttachment = ProjectRegionInterconnectAttachmentName.format("[PROJECT]", "[REGION]", "[INTERCONNECT_ATTACHMENT]");
    *   InterconnectAttachment interconnectAttachmentResource = InterconnectAttachment.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchInterconnectAttachmentHttpRequest request = PatchInterconnectAttachmentHttpRequest.newBuilder()
-   *     .setInterconnectAttachment(interconnectAttachment.toString())
+   *     .setInterconnectAttachment(formattedInterconnectAttachment)
    *     .setInterconnectAttachmentResource(interconnectAttachmentResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectClient.java
index 3111244a2b9c..a067471079f2 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectClient.java
@@ -210,9 +210,9 @@ public final Operation deleteInterconnect(String interconnect) {
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectGlobalInterconnectName interconnect = ProjectGlobalInterconnectName.of("[PROJECT]", "[INTERCONNECT]");
+   *   String formattedInterconnect = ProjectGlobalInterconnectName.format("[PROJECT]", "[INTERCONNECT]");
    *   DeleteInterconnectHttpRequest request = DeleteInterconnectHttpRequest.newBuilder()
-   *     .setInterconnect(interconnect.toString())
+   *     .setInterconnect(formattedInterconnect)
    *     .build();
    *   Operation response = interconnectClient.deleteInterconnect(request);
    * }
@@ -234,9 +234,9 @@ public final Operation deleteInterconnect(DeleteInterconnectHttpRequest request)
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectGlobalInterconnectName interconnect = ProjectGlobalInterconnectName.of("[PROJECT]", "[INTERCONNECT]");
+   *   String formattedInterconnect = ProjectGlobalInterconnectName.format("[PROJECT]", "[INTERCONNECT]");
    *   DeleteInterconnectHttpRequest request = DeleteInterconnectHttpRequest.newBuilder()
-   *     .setInterconnect(interconnect.toString())
+   *     .setInterconnect(formattedInterconnect)
    *     .build();
    *   ApiFuture<Operation> future = interconnectClient.deleteInterconnectCallable().futureCall(request);
    *   // Do something
@@ -311,9 +311,9 @@ public final Interconnect getInterconnect(String interconnect) {
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectGlobalInterconnectName interconnect = ProjectGlobalInterconnectName.of("[PROJECT]", "[INTERCONNECT]");
+   *   String formattedInterconnect = ProjectGlobalInterconnectName.format("[PROJECT]", "[INTERCONNECT]");
    *   GetInterconnectHttpRequest request = GetInterconnectHttpRequest.newBuilder()
-   *     .setInterconnect(interconnect.toString())
+   *     .setInterconnect(formattedInterconnect)
    *     .build();
    *   Interconnect response = interconnectClient.getInterconnect(request);
    * }
@@ -336,9 +336,9 @@ public final Interconnect getInterconnect(GetInterconnectHttpRequest request) {
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectGlobalInterconnectName interconnect = ProjectGlobalInterconnectName.of("[PROJECT]", "[INTERCONNECT]");
+   *   String formattedInterconnect = ProjectGlobalInterconnectName.format("[PROJECT]", "[INTERCONNECT]");
    *   GetInterconnectHttpRequest request = GetInterconnectHttpRequest.newBuilder()
-   *     .setInterconnect(interconnect.toString())
+   *     .setInterconnect(formattedInterconnect)
    *     .build();
    *   ApiFuture<Interconnect> future = interconnectClient.getInterconnectCallable().futureCall(request);
    *   // Do something
@@ -410,9 +410,9 @@ public final InterconnectsGetDiagnosticsResponse getDiagnosticsInterconnect(Stri
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectGlobalInterconnectName interconnect = ProjectGlobalInterconnectName.of("[PROJECT]", "[INTERCONNECT]");
+   *   String formattedInterconnect = ProjectGlobalInterconnectName.format("[PROJECT]", "[INTERCONNECT]");
    *   GetDiagnosticsInterconnectHttpRequest request = GetDiagnosticsInterconnectHttpRequest.newBuilder()
-   *     .setInterconnect(interconnect.toString())
+   *     .setInterconnect(formattedInterconnect)
    *     .build();
    *   InterconnectsGetDiagnosticsResponse response = interconnectClient.getDiagnosticsInterconnect(request);
    * }
@@ -435,9 +435,9 @@ public final InterconnectsGetDiagnosticsResponse getDiagnosticsInterconnect(
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectGlobalInterconnectName interconnect = ProjectGlobalInterconnectName.of("[PROJECT]", "[INTERCONNECT]");
+   *   String formattedInterconnect = ProjectGlobalInterconnectName.format("[PROJECT]", "[INTERCONNECT]");
    *   GetDiagnosticsInterconnectHttpRequest request = GetDiagnosticsInterconnectHttpRequest.newBuilder()
-   *     .setInterconnect(interconnect.toString())
+   *     .setInterconnect(formattedInterconnect)
    *     .build();
    *   ApiFuture<InterconnectsGetDiagnosticsResponse> future = interconnectClient.getDiagnosticsInterconnectCallable().futureCall(request);
    *   // Do something
@@ -525,10 +525,10 @@ public final Operation insertInterconnect(String project, Interconnect interconn
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Interconnect interconnectResource = Interconnect.newBuilder().build();
    *   InsertInterconnectHttpRequest request = InsertInterconnectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setInterconnectResource(interconnectResource)
    *     .build();
    *   Operation response = interconnectClient.insertInterconnect(request);
@@ -551,10 +551,10 @@ public final Operation insertInterconnect(InsertInterconnectHttpRequest request)
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Interconnect interconnectResource = Interconnect.newBuilder().build();
    *   InsertInterconnectHttpRequest request = InsertInterconnectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setInterconnectResource(interconnectResource)
    *     .build();
    *   ApiFuture<Operation> future = interconnectClient.insertInterconnectCallable().futureCall(request);
@@ -629,9 +629,9 @@ public final ListInterconnectsPagedResponse listInterconnects(String project) {
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInterconnectsHttpRequest request = ListInterconnectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Interconnect element : interconnectClient.listInterconnects(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -656,9 +656,9 @@ public final ListInterconnectsPagedResponse listInterconnects(
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInterconnectsHttpRequest request = ListInterconnectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListInterconnectsPagedResponse> future = interconnectClient.listInterconnectsPagedCallable().futureCall(request);
    *   // Do something
@@ -682,9 +682,9 @@ public final ListInterconnectsPagedResponse listInterconnects(
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInterconnectsHttpRequest request = ListInterconnectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     InterconnectList response = interconnectClient.listInterconnectsCallable().call(request);
@@ -798,11 +798,11 @@ public final Operation patchInterconnect(
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectGlobalInterconnectName interconnect = ProjectGlobalInterconnectName.of("[PROJECT]", "[INTERCONNECT]");
+   *   String formattedInterconnect = ProjectGlobalInterconnectName.format("[PROJECT]", "[INTERCONNECT]");
    *   Interconnect interconnectResource = Interconnect.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchInterconnectHttpRequest request = PatchInterconnectHttpRequest.newBuilder()
-   *     .setInterconnect(interconnect.toString())
+   *     .setInterconnect(formattedInterconnect)
    *     .setInterconnectResource(interconnectResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -827,11 +827,11 @@ public final Operation patchInterconnect(PatchInterconnectHttpRequest request) {
    *
    * 

    * try (InterconnectClient interconnectClient = InterconnectClient.create()) {
-   *   ProjectGlobalInterconnectName interconnect = ProjectGlobalInterconnectName.of("[PROJECT]", "[INTERCONNECT]");
+   *   String formattedInterconnect = ProjectGlobalInterconnectName.format("[PROJECT]", "[INTERCONNECT]");
    *   Interconnect interconnectResource = Interconnect.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchInterconnectHttpRequest request = PatchInterconnectHttpRequest.newBuilder()
-   *     .setInterconnect(interconnect.toString())
+   *     .setInterconnect(formattedInterconnect)
    *     .setInterconnectResource(interconnectResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectLocationClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectLocationClient.java
index 57c6676d86ca..20c15d5e0cef 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectLocationClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectLocationClient.java
@@ -219,9 +219,9 @@ public final InterconnectLocation getInterconnectLocation(String interconnectLoc
    *
    * 

    * try (InterconnectLocationClient interconnectLocationClient = InterconnectLocationClient.create()) {
-   *   ProjectGlobalInterconnectLocationName interconnectLocation = ProjectGlobalInterconnectLocationName.of("[PROJECT]", "[INTERCONNECT_LOCATION]");
+   *   String formattedInterconnectLocation = ProjectGlobalInterconnectLocationName.format("[PROJECT]", "[INTERCONNECT_LOCATION]");
    *   GetInterconnectLocationHttpRequest request = GetInterconnectLocationHttpRequest.newBuilder()
-   *     .setInterconnectLocation(interconnectLocation.toString())
+   *     .setInterconnectLocation(formattedInterconnectLocation)
    *     .build();
    *   InterconnectLocation response = interconnectLocationClient.getInterconnectLocation(request);
    * }
@@ -245,9 +245,9 @@ public final InterconnectLocation getInterconnectLocation(
    *
    * 

    * try (InterconnectLocationClient interconnectLocationClient = InterconnectLocationClient.create()) {
-   *   ProjectGlobalInterconnectLocationName interconnectLocation = ProjectGlobalInterconnectLocationName.of("[PROJECT]", "[INTERCONNECT_LOCATION]");
+   *   String formattedInterconnectLocation = ProjectGlobalInterconnectLocationName.format("[PROJECT]", "[INTERCONNECT_LOCATION]");
    *   GetInterconnectLocationHttpRequest request = GetInterconnectLocationHttpRequest.newBuilder()
-   *     .setInterconnectLocation(interconnectLocation.toString())
+   *     .setInterconnectLocation(formattedInterconnectLocation)
    *     .build();
    *   ApiFuture<InterconnectLocation> future = interconnectLocationClient.getInterconnectLocationCallable().futureCall(request);
    *   // Do something
@@ -322,9 +322,9 @@ public final ListInterconnectLocationsPagedResponse listInterconnectLocations(St
    *
    * 

    * try (InterconnectLocationClient interconnectLocationClient = InterconnectLocationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInterconnectLocationsHttpRequest request = ListInterconnectLocationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (InterconnectLocation element : interconnectLocationClient.listInterconnectLocations(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -349,9 +349,9 @@ public final ListInterconnectLocationsPagedResponse listInterconnectLocations(
    *
    * 

    * try (InterconnectLocationClient interconnectLocationClient = InterconnectLocationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInterconnectLocationsHttpRequest request = ListInterconnectLocationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListInterconnectLocationsPagedResponse> future = interconnectLocationClient.listInterconnectLocationsPagedCallable().futureCall(request);
    *   // Do something
@@ -376,9 +376,9 @@ public final ListInterconnectLocationsPagedResponse listInterconnectLocations(
    *
    * 

    * try (InterconnectLocationClient interconnectLocationClient = InterconnectLocationClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListInterconnectLocationsHttpRequest request = ListInterconnectLocationsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     InterconnectLocationList response = interconnectLocationClient.listInterconnectLocationsCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseClient.java
index b909832fb1db..79494c4bd71e 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseClient.java
@@ -209,9 +209,9 @@ public final Operation deleteLicense(String license) {
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseName license = ProjectGlobalLicenseName.of("[PROJECT]", "[LICENSE]");
+   *   String formattedLicense = ProjectGlobalLicenseName.format("[PROJECT]", "[LICENSE]");
    *   DeleteLicenseHttpRequest request = DeleteLicenseHttpRequest.newBuilder()
-   *     .setLicense(license.toString())
+   *     .setLicense(formattedLicense)
    *     .build();
    *   Operation response = licenseClient.deleteLicense(request);
    * }
@@ -233,9 +233,9 @@ public final Operation deleteLicense(DeleteLicenseHttpRequest request) {
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseName license = ProjectGlobalLicenseName.of("[PROJECT]", "[LICENSE]");
+   *   String formattedLicense = ProjectGlobalLicenseName.format("[PROJECT]", "[LICENSE]");
    *   DeleteLicenseHttpRequest request = DeleteLicenseHttpRequest.newBuilder()
-   *     .setLicense(license.toString())
+   *     .setLicense(formattedLicense)
    *     .build();
    *   ApiFuture<Operation> future = licenseClient.deleteLicenseCallable().futureCall(request);
    *   // Do something
@@ -305,9 +305,9 @@ public final License getLicense(String license) {
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseName license = ProjectGlobalLicenseName.of("[PROJECT]", "[LICENSE]");
+   *   String formattedLicense = ProjectGlobalLicenseName.format("[PROJECT]", "[LICENSE]");
    *   GetLicenseHttpRequest request = GetLicenseHttpRequest.newBuilder()
-   *     .setLicense(license.toString())
+   *     .setLicense(formattedLicense)
    *     .build();
    *   License response = licenseClient.getLicense(request);
    * }
@@ -329,9 +329,9 @@ public final License getLicense(GetLicenseHttpRequest request) {
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseName license = ProjectGlobalLicenseName.of("[PROJECT]", "[LICENSE]");
+   *   String formattedLicense = ProjectGlobalLicenseName.format("[PROJECT]", "[LICENSE]");
    *   GetLicenseHttpRequest request = GetLicenseHttpRequest.newBuilder()
-   *     .setLicense(license.toString())
+   *     .setLicense(formattedLicense)
    *     .build();
    *   ApiFuture<License> future = licenseClient.getLicenseCallable().futureCall(request);
    *   // Do something
@@ -405,9 +405,9 @@ public final Policy getIamPolicyLicense(String resource) {
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseResourceName resource = ProjectGlobalLicenseResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalLicenseResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GetIamPolicyLicenseHttpRequest request = GetIamPolicyLicenseHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = licenseClient.getIamPolicyLicense(request);
    * }
@@ -430,9 +430,9 @@ public final Policy getIamPolicyLicense(GetIamPolicyLicenseHttpRequest request)
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseResourceName resource = ProjectGlobalLicenseResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalLicenseResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GetIamPolicyLicenseHttpRequest request = GetIamPolicyLicenseHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = licenseClient.getIamPolicyLicenseCallable().futureCall(request);
    *   // Do something
@@ -511,10 +511,10 @@ public final Operation insertLicense(String project, License licenseResource) {
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   License licenseResource = License.newBuilder().build();
    *   InsertLicenseHttpRequest request = InsertLicenseHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setLicenseResource(licenseResource)
    *     .build();
    *   Operation response = licenseClient.insertLicense(request);
@@ -537,10 +537,10 @@ public final Operation insertLicense(InsertLicenseHttpRequest request) {
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   License licenseResource = License.newBuilder().build();
    *   InsertLicenseHttpRequest request = InsertLicenseHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setLicenseResource(licenseResource)
    *     .build();
    *   ApiFuture<Operation> future = licenseClient.insertLicenseCallable().futureCall(request);
@@ -626,9 +626,9 @@ public final ListLicensesPagedResponse listLicenses(String project) {
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListLicensesHttpRequest request = ListLicensesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (License element : licenseClient.listLicenses(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -656,9 +656,9 @@ public final ListLicensesPagedResponse listLicenses(ListLicensesHttpRequest requ
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListLicensesHttpRequest request = ListLicensesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListLicensesPagedResponse> future = licenseClient.listLicensesPagedCallable().futureCall(request);
    *   // Do something
@@ -686,9 +686,9 @@ public final ListLicensesPagedResponse listLicenses(ListLicensesHttpRequest requ
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListLicensesHttpRequest request = ListLicensesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     LicensesListResponse response = licenseClient.listLicensesCallable().call(request);
@@ -779,10 +779,10 @@ public final Policy setIamPolicyLicense(
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseResourceName resource = ProjectGlobalLicenseResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalLicenseResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetPolicyRequest globalSetPolicyRequestResource = GlobalSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyLicenseHttpRequest request = SetIamPolicyLicenseHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
    *     .build();
    *   Policy response = licenseClient.setIamPolicyLicense(request);
@@ -805,10 +805,10 @@ public final Policy setIamPolicyLicense(SetIamPolicyLicenseHttpRequest request)
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseResourceName resource = ProjectGlobalLicenseResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalLicenseResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetPolicyRequest globalSetPolicyRequestResource = GlobalSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyLicenseHttpRequest request = SetIamPolicyLicenseHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = licenseClient.setIamPolicyLicenseCallable().futureCall(request);
@@ -891,10 +891,10 @@ public final TestPermissionsResponse testIamPermissionsLicense(
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseResourceName resource = ProjectGlobalLicenseResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalLicenseResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsLicenseHttpRequest request = TestIamPermissionsLicenseHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = licenseClient.testIamPermissionsLicense(request);
@@ -918,10 +918,10 @@ public final TestPermissionsResponse testIamPermissionsLicense(
    *
    * 

    * try (LicenseClient licenseClient = LicenseClient.create()) {
-   *   ProjectGlobalLicenseResourceName resource = ProjectGlobalLicenseResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalLicenseResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsLicenseHttpRequest request = TestIamPermissionsLicenseHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = licenseClient.testIamPermissionsLicenseCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseCodeClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseCodeClient.java
index 58c517195558..13790068255f 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseCodeClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/LicenseCodeClient.java
@@ -204,9 +204,9 @@ public final LicenseCode getLicenseCode(String licenseCode) {
    *
    * 

    * try (LicenseCodeClient licenseCodeClient = LicenseCodeClient.create()) {
-   *   ProjectGlobalLicenseCodeName licenseCode = ProjectGlobalLicenseCodeName.of("[PROJECT]", "[LICENSE_CODE]");
+   *   String formattedLicenseCode = ProjectGlobalLicenseCodeName.format("[PROJECT]", "[LICENSE_CODE]");
    *   GetLicenseCodeHttpRequest request = GetLicenseCodeHttpRequest.newBuilder()
-   *     .setLicenseCode(licenseCode.toString())
+   *     .setLicenseCode(formattedLicenseCode)
    *     .build();
    *   LicenseCode response = licenseCodeClient.getLicenseCode(request);
    * }
@@ -229,9 +229,9 @@ public final LicenseCode getLicenseCode(GetLicenseCodeHttpRequest request) {
    *
    * 

    * try (LicenseCodeClient licenseCodeClient = LicenseCodeClient.create()) {
-   *   ProjectGlobalLicenseCodeName licenseCode = ProjectGlobalLicenseCodeName.of("[PROJECT]", "[LICENSE_CODE]");
+   *   String formattedLicenseCode = ProjectGlobalLicenseCodeName.format("[PROJECT]", "[LICENSE_CODE]");
    *   GetLicenseCodeHttpRequest request = GetLicenseCodeHttpRequest.newBuilder()
-   *     .setLicenseCode(licenseCode.toString())
+   *     .setLicenseCode(formattedLicenseCode)
    *     .build();
    *   ApiFuture<LicenseCode> future = licenseCodeClient.getLicenseCodeCallable().futureCall(request);
    *   // Do something
@@ -313,10 +313,10 @@ public final TestPermissionsResponse testIamPermissionsLicenseCode(
    *
    * 

    * try (LicenseCodeClient licenseCodeClient = LicenseCodeClient.create()) {
-   *   ProjectGlobalLicenseCodeResourceName resource = ProjectGlobalLicenseCodeResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalLicenseCodeResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsLicenseCodeHttpRequest request = TestIamPermissionsLicenseCodeHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = licenseCodeClient.testIamPermissionsLicenseCode(request);
@@ -340,10 +340,10 @@ public final TestPermissionsResponse testIamPermissionsLicenseCode(
    *
    * 

    * try (LicenseCodeClient licenseCodeClient = LicenseCodeClient.create()) {
-   *   ProjectGlobalLicenseCodeResourceName resource = ProjectGlobalLicenseCodeResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalLicenseCodeResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsLicenseCodeHttpRequest request = TestIamPermissionsLicenseCodeHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = licenseCodeClient.testIamPermissionsLicenseCodeCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointGroupsHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointGroupsHttpRequest.java
new file mode 100644
index 000000000000..2d351ba286ca
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointGroupsHttpRequest.java
@@ -0,0 +1,685 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.networkEndpointGroups.list. Retrieves the list of network
+ * endpoint groups that are located in the specified project and zone.
+ */
+public final class ListNetworkEndpointGroupsHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String filter;
+  private final String key;
+  private final Integer maxResults;
+  private final String orderBy;
+  private final String pageToken;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String userIp;
+  private final String zone;
+
+  private ListNetworkEndpointGroupsHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.filter = null;
+    this.key = null;
+    this.maxResults = null;
+    this.orderBy = null;
+    this.pageToken = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.userIp = null;
+    this.zone = null;
+  }
+
+  private ListNetworkEndpointGroupsHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String filter,
+      String key,
+      Integer maxResults,
+      String orderBy,
+      String pageToken,
+      String prettyPrint,
+      String quotaUser,
+      String userIp,
+      String zone) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.filter = filter;
+    this.key = key;
+    this.maxResults = maxResults;
+    this.orderBy = orderBy;
+    this.pageToken = pageToken;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.userIp = userIp;
+    this.zone = zone;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("filter".equals(fieldName)) {
+      return filter;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("maxResults".equals(fieldName)) {
+      return maxResults;
+    }
+    if ("orderBy".equals(fieldName)) {
+      return orderBy;
+    }
+    if ("pageToken".equals(fieldName)) {
+      return pageToken;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    if ("zone".equals(fieldName)) {
+      return zone;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /**
+   * A filter expression that filters resources listed in the response. The expression must specify
+   * the field name, a comparison operator, and the value that you want to use for filtering. The
+   * value must be a string, a number, or a boolean. The comparison operator must be either =, !=,
+   * >, or <.
+   *
+   * 

For example, if you are filtering Compute Engine instances, you can exclude instances named + * example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. For + * example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each + * expression is an AND expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND + * (scheduling.automaticRestart = true). + */ + public String getFilter() { + return filter; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order + * based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public String getOrderBy() { + return orderBy; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public String getPageToken() { + return pageToken; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** + * The name of the zone where the network endpoint group is located. It should comply with + * RFC1035. It must have the format `{project}/zones/{zone}/networkEndpointGroups`. \`{zone}\` + * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes + * (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent + * * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not + * start with \`"goog"\`. + */ + public String getZone() { + return zone; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ListNetworkEndpointGroupsHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static ListNetworkEndpointGroupsHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final ListNetworkEndpointGroupsHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ListNetworkEndpointGroupsHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String filter; + private String key; + private Integer maxResults; + private String orderBy; + private String pageToken; + private String prettyPrint; + private String quotaUser; + private String userIp; + private String zone; + + Builder() {} + + public Builder mergeFrom(ListNetworkEndpointGroupsHttpRequest other) { + if (other == ListNetworkEndpointGroupsHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getFilter() != null) { + this.filter = other.filter; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getMaxResults() != null) { + this.maxResults = other.maxResults; + } + if (other.getOrderBy() != null) { + this.orderBy = other.orderBy; + } + if (other.getPageToken() != null) { + this.pageToken = other.pageToken; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + if (other.getZone() != null) { + this.zone = other.zone; + } + return this; + } + + Builder(ListNetworkEndpointGroupsHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.filter = source.filter; + this.key = source.key; + this.maxResults = source.maxResults; + this.orderBy = source.orderBy; + this.pageToken = source.pageToken; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.userIp = source.userIp; + this.zone = source.zone; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** + * A filter expression that filters resources listed in the response. The expression must + * specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must + * be either =, !=, >, or <. + * + *

For example, if you are filtering Compute Engine instances, you can exclude instances + * named example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource + * labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. + * For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By + * default, each expression is an AND expression. However, you can include AND and OR + * expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + public String getFilter() { + return filter; + } + + /** + * A filter expression that filters resources listed in the response. The expression must + * specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must + * be either =, !=, >, or <. + * + *

For example, if you are filtering Compute Engine instances, you can exclude instances + * named example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource + * labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. + * For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By + * default, each expression is an AND expression. However, you can include AND and OR + * expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + public Builder setFilter(String filter) { + this.filter = filter; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Builder setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical + * order based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public String getOrderBy() { + return orderBy; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical + * order based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public Builder setOrderBy(String orderBy) { + this.orderBy = orderBy; + return this; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public String getPageToken() { + return pageToken; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public Builder setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + /** + * The name of the zone where the network endpoint group is located. It should comply with + * RFC1035. It must have the format `{project}/zones/{zone}/networkEndpointGroups`. \`{zone}\` + * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), + * dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or + * percent * signs (\`%\`). It must be between 3 and 255 characters in length, and it * + * must not start with \`"goog"\`. + */ + public String getZone() { + return zone; + } + + /** + * The name of the zone where the network endpoint group is located. It should comply with + * RFC1035. It must have the format `{project}/zones/{zone}/networkEndpointGroups`. \`{zone}\` + * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), + * dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or + * percent * signs (\`%\`). It must be between 3 and 255 characters in length, and it * + * must not start with \`"goog"\`. + */ + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + public ListNetworkEndpointGroupsHttpRequest build() { + String missing = ""; + + if (zone == null) { + missing += " zone"; + } + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new ListNetworkEndpointGroupsHttpRequest( + access_token, + callback, + fields, + filter, + key, + maxResults, + orderBy, + pageToken, + prettyPrint, + quotaUser, + userIp, + zone); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setFilter(this.filter); + newBuilder.setKey(this.key); + newBuilder.setMaxResults(this.maxResults); + newBuilder.setOrderBy(this.orderBy); + newBuilder.setPageToken(this.pageToken); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setUserIp(this.userIp); + newBuilder.setZone(this.zone); + return newBuilder; + } + } + + @Override + public String toString() { + return "ListNetworkEndpointGroupsHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "filter=" + + filter + + ", " + + "key=" + + key + + ", " + + "maxResults=" + + maxResults + + ", " + + "orderBy=" + + orderBy + + ", " + + "pageToken=" + + pageToken + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "userIp=" + + userIp + + ", " + + "zone=" + + zone + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ListNetworkEndpointGroupsHttpRequest) { + ListNetworkEndpointGroupsHttpRequest that = (ListNetworkEndpointGroupsHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.filter, that.getFilter()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.maxResults, that.getMaxResults()) + && Objects.equals(this.orderBy, that.getOrderBy()) + && Objects.equals(this.pageToken, that.getPageToken()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.userIp, that.getUserIp()) + && Objects.equals(this.zone, that.getZone()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + filter, + key, + maxResults, + orderBy, + pageToken, + prettyPrint, + quotaUser, + userIp, + zone); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.java new file mode 100644 index 000000000000..1754ce6be20f --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.java @@ -0,0 +1,736 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.networkEndpointGroups.listNetworkEndpoints. Lists the network + * endpoints in the specified network endpoint group. + */ +public final class ListNetworkEndpointsNetworkEndpointGroupsHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String filter; + private final String key; + private final Integer maxResults; + private final String networkEndpointGroup; + private final NetworkEndpointGroupsListEndpointsRequest + networkEndpointGroupsListEndpointsRequestResource; + private final String orderBy; + private final String pageToken; + private final String prettyPrint; + private final String quotaUser; + private final String userIp; + + private ListNetworkEndpointsNetworkEndpointGroupsHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.filter = null; + this.key = null; + this.maxResults = null; + this.networkEndpointGroup = null; + this.networkEndpointGroupsListEndpointsRequestResource = null; + this.orderBy = null; + this.pageToken = null; + this.prettyPrint = null; + this.quotaUser = null; + this.userIp = null; + } + + private ListNetworkEndpointsNetworkEndpointGroupsHttpRequest( + String access_token, + String callback, + String fields, + String filter, + String key, + Integer maxResults, + String networkEndpointGroup, + NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource, + String orderBy, + String pageToken, + String prettyPrint, + String quotaUser, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.filter = filter; + this.key = key; + this.maxResults = maxResults; + this.networkEndpointGroup = networkEndpointGroup; + this.networkEndpointGroupsListEndpointsRequestResource = + networkEndpointGroupsListEndpointsRequestResource; + this.orderBy = orderBy; + this.pageToken = pageToken; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("filter".equals(fieldName)) { + return filter; + } + if ("key".equals(fieldName)) { + return key; + } + if ("maxResults".equals(fieldName)) { + return maxResults; + } + if ("networkEndpointGroup".equals(fieldName)) { + return networkEndpointGroup; + } + if ("networkEndpointGroupsListEndpointsRequestResource".equals(fieldName)) { + return networkEndpointGroupsListEndpointsRequestResource; + } + if ("orderBy".equals(fieldName)) { + return orderBy; + } + if ("pageToken".equals(fieldName)) { + return pageToken; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public NetworkEndpointGroupsListEndpointsRequest getApiMessageRequestBody() { + return networkEndpointGroupsListEndpointsRequestResource; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** + * A filter expression that filters resources listed in the response. The expression must specify + * the field name, a comparison operator, and the value that you want to use for filtering. The + * value must be a string, a number, or a boolean. The comparison operator must be either =, !=, + * >, or <. + * + *

For example, if you are filtering Compute Engine instances, you can exclude instances named + * example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. For + * example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each + * expression is an AND expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND + * (scheduling.automaticRestart = true). + */ + public String getFilter() { + return filter; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * The name of the network endpoint group from which you want to generate a list of included + * network endpoints. It should comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + public NetworkEndpointGroupsListEndpointsRequest + getNetworkEndpointGroupsListEndpointsRequestResource() { + return networkEndpointGroupsListEndpointsRequestResource; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order + * based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public String getOrderBy() { + return orderBy; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public String getPageToken() { + return pageToken; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ListNetworkEndpointsNetworkEndpointGroupsHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static ListNetworkEndpointsNetworkEndpointGroupsHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final ListNetworkEndpointsNetworkEndpointGroupsHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ListNetworkEndpointsNetworkEndpointGroupsHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String filter; + private String key; + private Integer maxResults; + private String networkEndpointGroup; + private NetworkEndpointGroupsListEndpointsRequest + networkEndpointGroupsListEndpointsRequestResource; + private String orderBy; + private String pageToken; + private String prettyPrint; + private String quotaUser; + private String userIp; + + Builder() {} + + public Builder mergeFrom(ListNetworkEndpointsNetworkEndpointGroupsHttpRequest other) { + if (other == ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.getDefaultInstance()) + return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getFilter() != null) { + this.filter = other.filter; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getMaxResults() != null) { + this.maxResults = other.maxResults; + } + if (other.getNetworkEndpointGroup() != null) { + this.networkEndpointGroup = other.networkEndpointGroup; + } + if (other.getNetworkEndpointGroupsListEndpointsRequestResource() != null) { + this.networkEndpointGroupsListEndpointsRequestResource = + other.networkEndpointGroupsListEndpointsRequestResource; + } + if (other.getOrderBy() != null) { + this.orderBy = other.orderBy; + } + if (other.getPageToken() != null) { + this.pageToken = other.pageToken; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(ListNetworkEndpointsNetworkEndpointGroupsHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.filter = source.filter; + this.key = source.key; + this.maxResults = source.maxResults; + this.networkEndpointGroup = source.networkEndpointGroup; + this.networkEndpointGroupsListEndpointsRequestResource = + source.networkEndpointGroupsListEndpointsRequestResource; + this.orderBy = source.orderBy; + this.pageToken = source.pageToken; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** + * A filter expression that filters resources listed in the response. The expression must + * specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must + * be either =, !=, >, or <. + * + *

For example, if you are filtering Compute Engine instances, you can exclude instances + * named example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource + * labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. + * For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By + * default, each expression is an AND expression. However, you can include AND and OR + * expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + public String getFilter() { + return filter; + } + + /** + * A filter expression that filters resources listed in the response. The expression must + * specify the field name, a comparison operator, and the value that you want to use for + * filtering. The value must be a string, a number, or a boolean. The comparison operator must + * be either =, !=, >, or <. + * + *

For example, if you are filtering Compute Engine instances, you can exclude instances + * named example-instance by specifying name != example-instance. + * + *

You can also filter nested fields. For example, you could specify + * scheduling.automaticRestart = false to include instances only if they are not scheduled for + * automatic restarts. You can use filtering on nested fields to filter based on resource + * labels. + * + *

To filter on multiple expressions, provide each separate expression within parentheses. + * For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By + * default, each expression is an AND expression. However, you can include AND and OR + * expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + public Builder setFilter(String filter) { + this.filter = filter; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Builder setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + + /** + * The name of the network endpoint group from which you want to generate a list of included + * network endpoints. It should comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** + * The name of the network endpoint group from which you want to generate a list of included + * network endpoints. It should comply with RFC1035. It must have the format + * `{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + public NetworkEndpointGroupsListEndpointsRequest + getNetworkEndpointGroupsListEndpointsRequestResource() { + return networkEndpointGroupsListEndpointsRequestResource; + } + + public Builder setNetworkEndpointGroupsListEndpointsRequestResource( + NetworkEndpointGroupsListEndpointsRequest + networkEndpointGroupsListEndpointsRequestResource) { + this.networkEndpointGroupsListEndpointsRequestResource = + networkEndpointGroupsListEndpointsRequestResource; + return this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical + * order based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public String getOrderBy() { + return orderBy; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical + * order based on the resource name. + * + *

You can also sort results in descending order based on the creation timestamp using + * orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in + * reverse chronological order (newest result first). Use this to sort resources like operations + * so that the newest operation is returned first. + * + *

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public Builder setOrderBy(String orderBy) { + this.orderBy = orderBy; + return this; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public String getPageToken() { + return pageToken; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public Builder setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public ListNetworkEndpointsNetworkEndpointGroupsHttpRequest build() { + String missing = ""; + + if (networkEndpointGroup == null) { + missing += " networkEndpointGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new ListNetworkEndpointsNetworkEndpointGroupsHttpRequest( + access_token, + callback, + fields, + filter, + key, + maxResults, + networkEndpointGroup, + networkEndpointGroupsListEndpointsRequestResource, + orderBy, + pageToken, + prettyPrint, + quotaUser, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setFilter(this.filter); + newBuilder.setKey(this.key); + newBuilder.setMaxResults(this.maxResults); + newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup); + newBuilder.setNetworkEndpointGroupsListEndpointsRequestResource( + this.networkEndpointGroupsListEndpointsRequestResource); + newBuilder.setOrderBy(this.orderBy); + newBuilder.setPageToken(this.pageToken); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "ListNetworkEndpointsNetworkEndpointGroupsHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "filter=" + + filter + + ", " + + "key=" + + key + + ", " + + "maxResults=" + + maxResults + + ", " + + "networkEndpointGroup=" + + networkEndpointGroup + + ", " + + "networkEndpointGroupsListEndpointsRequestResource=" + + networkEndpointGroupsListEndpointsRequestResource + + ", " + + "orderBy=" + + orderBy + + ", " + + "pageToken=" + + pageToken + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ListNetworkEndpointsNetworkEndpointGroupsHttpRequest) { + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest that = + (ListNetworkEndpointsNetworkEndpointGroupsHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.filter, that.getFilter()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.maxResults, that.getMaxResults()) + && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals( + this.networkEndpointGroupsListEndpointsRequestResource, + that.getNetworkEndpointGroupsListEndpointsRequestResource()) + && Objects.equals(this.orderBy, that.getOrderBy()) + && Objects.equals(this.pageToken, that.getPageToken()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + filter, + key, + maxResults, + networkEndpointGroup, + networkEndpointGroupsListEndpointsRequestResource, + orderBy, + pageToken, + prettyPrint, + quotaUser, + userIp); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/MachineTypeClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/MachineTypeClient.java index 1aab88b7ea75..af0a215b6b4b 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/MachineTypeClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/MachineTypeClient.java @@ -213,9 +213,9 @@ public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes( * *


    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListMachineTypesHttpRequest request = AggregatedListMachineTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (MachineTypesScopedList element : machineTypeClient.aggregatedListMachineTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -240,9 +240,9 @@ public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes(
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListMachineTypesHttpRequest request = AggregatedListMachineTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListMachineTypesPagedResponse> future = machineTypeClient.aggregatedListMachineTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -267,9 +267,9 @@ public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes(
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListMachineTypesHttpRequest request = AggregatedListMachineTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     MachineTypeAggregatedList response = machineTypeClient.aggregatedListMachineTypesCallable().call(request);
@@ -353,9 +353,9 @@ public final MachineType getMachineType(String machineType) {
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
-   *   ProjectZoneMachineTypeName machineType = ProjectZoneMachineTypeName.of("[PROJECT]", "[ZONE]", "[MACHINE_TYPE]");
+   *   String formattedMachineType = ProjectZoneMachineTypeName.format("[PROJECT]", "[ZONE]", "[MACHINE_TYPE]");
    *   GetMachineTypeHttpRequest request = GetMachineTypeHttpRequest.newBuilder()
-   *     .setMachineType(machineType.toString())
+   *     .setMachineType(formattedMachineType)
    *     .build();
    *   MachineType response = machineTypeClient.getMachineType(request);
    * }
@@ -378,9 +378,9 @@ public final MachineType getMachineType(GetMachineTypeHttpRequest request) {
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
-   *   ProjectZoneMachineTypeName machineType = ProjectZoneMachineTypeName.of("[PROJECT]", "[ZONE]", "[MACHINE_TYPE]");
+   *   String formattedMachineType = ProjectZoneMachineTypeName.format("[PROJECT]", "[ZONE]", "[MACHINE_TYPE]");
    *   GetMachineTypeHttpRequest request = GetMachineTypeHttpRequest.newBuilder()
-   *     .setMachineType(machineType.toString())
+   *     .setMachineType(formattedMachineType)
    *     .build();
    *   ApiFuture<MachineType> future = machineTypeClient.getMachineTypeCallable().futureCall(request);
    *   // Do something
@@ -453,9 +453,9 @@ public final ListMachineTypesPagedResponse listMachineTypes(String zone) {
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListMachineTypesHttpRequest request = ListMachineTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (MachineType element : machineTypeClient.listMachineTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -479,9 +479,9 @@ public final ListMachineTypesPagedResponse listMachineTypes(ListMachineTypesHttp
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListMachineTypesHttpRequest request = ListMachineTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListMachineTypesPagedResponse> future = machineTypeClient.listMachineTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -505,9 +505,9 @@ public final ListMachineTypesPagedResponse listMachineTypes(ListMachineTypesHttp
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListMachineTypesHttpRequest request = ListMachineTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     MachineTypeList response = machineTypeClient.listMachineTypesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkClient.java
index b617ce77de46..30b6b5a72f39 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkClient.java
@@ -221,10 +221,10 @@ public final Operation addPeeringNetwork(
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   NetworksAddPeeringRequest networksAddPeeringRequestResource = NetworksAddPeeringRequest.newBuilder().build();
    *   AddPeeringNetworkHttpRequest request = AddPeeringNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .setNetworksAddPeeringRequestResource(networksAddPeeringRequestResource)
    *     .build();
    *   Operation response = networkClient.addPeeringNetwork(request);
@@ -247,10 +247,10 @@ public final Operation addPeeringNetwork(AddPeeringNetworkHttpRequest request) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   NetworksAddPeeringRequest networksAddPeeringRequestResource = NetworksAddPeeringRequest.newBuilder().build();
    *   AddPeeringNetworkHttpRequest request = AddPeeringNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .setNetworksAddPeeringRequestResource(networksAddPeeringRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = networkClient.addPeeringNetworkCallable().futureCall(request);
@@ -322,9 +322,9 @@ public final Operation deleteNetwork(String network) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   DeleteNetworkHttpRequest request = DeleteNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .build();
    *   Operation response = networkClient.deleteNetwork(request);
    * }
@@ -346,9 +346,9 @@ public final Operation deleteNetwork(DeleteNetworkHttpRequest request) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   DeleteNetworkHttpRequest request = DeleteNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .build();
    *   ApiFuture<Operation> future = networkClient.deleteNetworkCallable().futureCall(request);
    *   // Do something
@@ -418,9 +418,9 @@ public final Network getNetwork(String network) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   GetNetworkHttpRequest request = GetNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .build();
    *   Network response = networkClient.getNetwork(request);
    * }
@@ -442,9 +442,9 @@ public final Network getNetwork(GetNetworkHttpRequest request) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   GetNetworkHttpRequest request = GetNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .build();
    *   ApiFuture<Network> future = networkClient.getNetworkCallable().futureCall(request);
    *   // Do something
@@ -527,10 +527,10 @@ public final Operation insertNetwork(String project, Network networkResource) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Network networkResource = Network.newBuilder().build();
    *   InsertNetworkHttpRequest request = InsertNetworkHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setNetworkResource(networkResource)
    *     .build();
    *   Operation response = networkClient.insertNetwork(request);
@@ -553,10 +553,10 @@ public final Operation insertNetwork(InsertNetworkHttpRequest request) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Network networkResource = Network.newBuilder().build();
    *   InsertNetworkHttpRequest request = InsertNetworkHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setNetworkResource(networkResource)
    *     .build();
    *   ApiFuture<Operation> future = networkClient.insertNetworkCallable().futureCall(request);
@@ -630,9 +630,9 @@ public final ListNetworksPagedResponse listNetworks(String project) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListNetworksHttpRequest request = ListNetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Network element : networkClient.listNetworks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -656,9 +656,9 @@ public final ListNetworksPagedResponse listNetworks(ListNetworksHttpRequest requ
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListNetworksHttpRequest request = ListNetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListNetworksPagedResponse> future = networkClient.listNetworksPagedCallable().futureCall(request);
    *   // Do something
@@ -682,9 +682,9 @@ public final ListNetworksPagedResponse listNetworks(ListNetworksHttpRequest requ
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListNetworksHttpRequest request = ListNetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     NetworkList response = networkClient.listNetworksCallable().call(request);
@@ -793,11 +793,11 @@ public final Operation patchNetwork(
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   Network networkResource = Network.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchNetworkHttpRequest request = PatchNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .setNetworkResource(networkResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -822,11 +822,11 @@ public final Operation patchNetwork(PatchNetworkHttpRequest request) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   Network networkResource = Network.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchNetworkHttpRequest request = PatchNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .setNetworkResource(networkResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -910,10 +910,10 @@ public final Operation removePeeringNetwork(
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   NetworksRemovePeeringRequest networksRemovePeeringRequestResource = NetworksRemovePeeringRequest.newBuilder().build();
    *   RemovePeeringNetworkHttpRequest request = RemovePeeringNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .setNetworksRemovePeeringRequestResource(networksRemovePeeringRequestResource)
    *     .build();
    *   Operation response = networkClient.removePeeringNetwork(request);
@@ -936,10 +936,10 @@ public final Operation removePeeringNetwork(RemovePeeringNetworkHttpRequest requ
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   NetworksRemovePeeringRequest networksRemovePeeringRequestResource = NetworksRemovePeeringRequest.newBuilder().build();
    *   RemovePeeringNetworkHttpRequest request = RemovePeeringNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .setNetworksRemovePeeringRequestResource(networksRemovePeeringRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = networkClient.removePeeringNetworkCallable().futureCall(request);
@@ -1012,9 +1012,9 @@ public final Operation switchToCustomModeNetwork(String network) {
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   SwitchToCustomModeNetworkHttpRequest request = SwitchToCustomModeNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .build();
    *   Operation response = networkClient.switchToCustomModeNetwork(request);
    * }
@@ -1036,9 +1036,9 @@ public final Operation switchToCustomModeNetwork(SwitchToCustomModeNetworkHttpRe
    *
    * 

    * try (NetworkClient networkClient = NetworkClient.create()) {
-   *   ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]");
+   *   String formattedNetwork = ProjectGlobalNetworkName.format("[PROJECT]", "[NETWORK]");
    *   SwitchToCustomModeNetworkHttpRequest request = SwitchToCustomModeNetworkHttpRequest.newBuilder()
-   *     .setNetwork(network.toString())
+   *     .setNetwork(formattedNetwork)
    *     .build();
    *   ApiFuture<Operation> future = networkClient.switchToCustomModeNetworkCallable().futureCall(request);
    *   // Do something
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java
new file mode 100644
index 000000000000..e7228460b1a2
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java
@@ -0,0 +1,265 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/** The network endpoint. */
+public final class NetworkEndpoint implements ApiMessage {
+  private final String instance;
+  private final String ipAddress;
+  private final Integer port;
+
+  private NetworkEndpoint() {
+    this.instance = null;
+    this.ipAddress = null;
+    this.port = null;
+  }
+
+  private NetworkEndpoint(String instance, String ipAddress, Integer port) {
+    this.instance = instance;
+    this.ipAddress = ipAddress;
+    this.port = port;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("instance".equals(fieldName)) {
+      return instance;
+    }
+    if ("ipAddress".equals(fieldName)) {
+      return ipAddress;
+    }
+    if ("port".equals(fieldName)) {
+      return port;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /**
+   * The name for a specific VM instance that the IP address belongs to. This is required for
+   * network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network
+   * endpoint group.
+   *
+   * 

The name must be 1-63 characters long, and comply with RFC1035. + */ + public String getInstance() { + return instance; + } + + /** + * Optional IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either + * the primary IP or as part of an aliased IP range). If the IP address is not specified, then the + * primary IP address for the VM instance in the network that the network endpoint group belongs + * to will be used. + */ + public String getIpAddress() { + return ipAddress; + } + + /** + * Optional port number of network endpoint. If not specified and the + * NetworkEndpointGroup.network_endpoint_type is GCE_IP_PORT, the defaultPort for the network + * endpoint group will be used. + */ + public Integer getPort() { + return port; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpoint(); + } + + public static class Builder { + private String instance; + private String ipAddress; + private Integer port; + + Builder() {} + + public Builder mergeFrom(NetworkEndpoint other) { + if (other == NetworkEndpoint.getDefaultInstance()) return this; + if (other.getInstance() != null) { + this.instance = other.instance; + } + if (other.getIpAddress() != null) { + this.ipAddress = other.ipAddress; + } + if (other.getPort() != null) { + this.port = other.port; + } + return this; + } + + Builder(NetworkEndpoint source) { + this.instance = source.instance; + this.ipAddress = source.ipAddress; + this.port = source.port; + } + + /** + * The name for a specific VM instance that the IP address belongs to. This is required for + * network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network + * endpoint group. + * + *

The name must be 1-63 characters long, and comply with RFC1035. + */ + public String getInstance() { + return instance; + } + + /** + * The name for a specific VM instance that the IP address belongs to. This is required for + * network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network + * endpoint group. + * + *

The name must be 1-63 characters long, and comply with RFC1035. + */ + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + /** + * Optional IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either + * the primary IP or as part of an aliased IP range). If the IP address is not specified, then + * the primary IP address for the VM instance in the network that the network endpoint group + * belongs to will be used. + */ + public String getIpAddress() { + return ipAddress; + } + + /** + * Optional IPv4 address of network endpoint. The IP address must belong to a VM in GCE (either + * the primary IP or as part of an aliased IP range). If the IP address is not specified, then + * the primary IP address for the VM instance in the network that the network endpoint group + * belongs to will be used. + */ + public Builder setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Optional port number of network endpoint. If not specified and the + * NetworkEndpointGroup.network_endpoint_type is GCE_IP_PORT, the defaultPort for the network + * endpoint group will be used. + */ + public Integer getPort() { + return port; + } + + /** + * Optional port number of network endpoint. If not specified and the + * NetworkEndpointGroup.network_endpoint_type is GCE_IP_PORT, the defaultPort for the network + * endpoint group will be used. + */ + public Builder setPort(Integer port) { + this.port = port; + return this; + } + + public NetworkEndpoint build() { + + return new NetworkEndpoint(instance, ipAddress, port); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setInstance(this.instance); + newBuilder.setIpAddress(this.ipAddress); + newBuilder.setPort(this.port); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpoint{" + + "instance=" + + instance + + ", " + + "ipAddress=" + + ipAddress + + ", " + + "port=" + + port + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpoint) { + NetworkEndpoint that = (NetworkEndpoint) o; + return Objects.equals(this.instance, that.getInstance()) + && Objects.equals(this.ipAddress, that.getIpAddress()) + && Objects.equals(this.port, that.getPort()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(instance, ipAddress, port); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java new file mode 100644 index 000000000000..959689b330f3 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java @@ -0,0 +1,603 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** Represents a collection of network endpoints. */ +public final class NetworkEndpointGroup implements ApiMessage { + private final String creationTimestamp; + private final Integer defaultPort; + private final String description; + private final String id; + private final String kind; + private final String name; + private final String network; + private final String networkEndpointType; + private final String selfLink; + private final Integer size; + private final String subnetwork; + private final String zone; + + private NetworkEndpointGroup() { + this.creationTimestamp = null; + this.defaultPort = null; + this.description = null; + this.id = null; + this.kind = null; + this.name = null; + this.network = null; + this.networkEndpointType = null; + this.selfLink = null; + this.size = null; + this.subnetwork = null; + this.zone = null; + } + + private NetworkEndpointGroup( + String creationTimestamp, + Integer defaultPort, + String description, + String id, + String kind, + String name, + String network, + String networkEndpointType, + String selfLink, + Integer size, + String subnetwork, + String zone) { + this.creationTimestamp = creationTimestamp; + this.defaultPort = defaultPort; + this.description = description; + this.id = id; + this.kind = kind; + this.name = name; + this.network = network; + this.networkEndpointType = networkEndpointType; + this.selfLink = selfLink; + this.size = size; + this.subnetwork = subnetwork; + this.zone = zone; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("creationTimestamp".equals(fieldName)) { + return creationTimestamp; + } + if ("defaultPort".equals(fieldName)) { + return defaultPort; + } + if ("description".equals(fieldName)) { + return description; + } + if ("id".equals(fieldName)) { + return id; + } + if ("kind".equals(fieldName)) { + return kind; + } + if ("name".equals(fieldName)) { + return name; + } + if ("network".equals(fieldName)) { + return network; + } + if ("networkEndpointType".equals(fieldName)) { + return networkEndpointType; + } + if ("selfLink".equals(fieldName)) { + return selfLink; + } + if ("size".equals(fieldName)) { + return size; + } + if ("subnetwork".equals(fieldName)) { + return subnetwork; + } + if ("zone".equals(fieldName)) { + return zone; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] Creation timestamp in RFC3339 text format. */ + public String getCreationTimestamp() { + return creationTimestamp; + } + + /** The default port used if the port number is not specified in the network endpoint. */ + public Integer getDefaultPort() { + return defaultPort; + } + + /** + * An optional description of this resource. Provide this property when you create the resource. + */ + public String getDescription() { + return description; + } + + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + */ + public String getId() { + return id; + } + + /** + * [Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint + * group. + */ + public String getKind() { + return kind; + } + + /** + * Name of the resource; provided by the client when the resource is created. The name must be + * 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters + * long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first + * character must be a lowercase letter, and all following characters must be a dash, lowercase + * letter, or digit, except the last character, which cannot be a dash. + */ + public String getName() { + return name; + } + + /** + * The URL of the network to which all network endpoints in the NEG belong. Uses "default" project + * network if unspecified. + */ + public String getNetwork() { + return network; + } + + /** + * Type of network endpoints in this network endpoint group. Currently the only supported value is + * GCE_VM_IP_PORT. + */ + public String getNetworkEndpointType() { + return networkEndpointType; + } + + /** [Output Only] Server-defined URL for the resource. */ + public String getSelfLink() { + return selfLink; + } + + /** [Output only] Number of network endpoints in the network endpoint group. */ + public Integer getSize() { + return size; + } + + /** Optional URL of the subnetwork to which all network endpoints in the NEG belong. */ + public String getSubnetwork() { + return subnetwork; + } + + /** [Output Only] The URL of the zone where the network endpoint group is located. */ + public String getZone() { + return zone; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointGroup(); + } + + public static class Builder { + private String creationTimestamp; + private Integer defaultPort; + private String description; + private String id; + private String kind; + private String name; + private String network; + private String networkEndpointType; + private String selfLink; + private Integer size; + private String subnetwork; + private String zone; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointGroup other) { + if (other == NetworkEndpointGroup.getDefaultInstance()) return this; + if (other.getCreationTimestamp() != null) { + this.creationTimestamp = other.creationTimestamp; + } + if (other.getDefaultPort() != null) { + this.defaultPort = other.defaultPort; + } + if (other.getDescription() != null) { + this.description = other.description; + } + if (other.getId() != null) { + this.id = other.id; + } + if (other.getKind() != null) { + this.kind = other.kind; + } + if (other.getName() != null) { + this.name = other.name; + } + if (other.getNetwork() != null) { + this.network = other.network; + } + if (other.getNetworkEndpointType() != null) { + this.networkEndpointType = other.networkEndpointType; + } + if (other.getSelfLink() != null) { + this.selfLink = other.selfLink; + } + if (other.getSize() != null) { + this.size = other.size; + } + if (other.getSubnetwork() != null) { + this.subnetwork = other.subnetwork; + } + if (other.getZone() != null) { + this.zone = other.zone; + } + return this; + } + + Builder(NetworkEndpointGroup source) { + this.creationTimestamp = source.creationTimestamp; + this.defaultPort = source.defaultPort; + this.description = source.description; + this.id = source.id; + this.kind = source.kind; + this.name = source.name; + this.network = source.network; + this.networkEndpointType = source.networkEndpointType; + this.selfLink = source.selfLink; + this.size = source.size; + this.subnetwork = source.subnetwork; + this.zone = source.zone; + } + + /** [Output Only] Creation timestamp in RFC3339 text format. */ + public String getCreationTimestamp() { + return creationTimestamp; + } + + /** [Output Only] Creation timestamp in RFC3339 text format. */ + public Builder setCreationTimestamp(String creationTimestamp) { + this.creationTimestamp = creationTimestamp; + return this; + } + + /** The default port used if the port number is not specified in the network endpoint. */ + public Integer getDefaultPort() { + return defaultPort; + } + + /** The default port used if the port number is not specified in the network endpoint. */ + public Builder setDefaultPort(Integer defaultPort) { + this.defaultPort = defaultPort; + return this; + } + + /** + * An optional description of this resource. Provide this property when you create the resource. + */ + public String getDescription() { + return description; + } + + /** + * An optional description of this resource. Provide this property when you create the resource. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the + * server. + */ + public String getId() { + return id; + } + + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the + * server. + */ + public Builder setId(String id) { + this.id = id; + return this; + } + + /** + * [Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint + * group. + */ + public String getKind() { + return kind; + } + + /** + * [Output Only] Type of the resource. Always compute#networkEndpointGroup for network endpoint + * group. + */ + public Builder setKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Name of the resource; provided by the client when the resource is created. The name must be + * 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters + * long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first + * character must be a lowercase letter, and all following characters must be a dash, lowercase + * letter, or digit, except the last character, which cannot be a dash. + */ + public String getName() { + return name; + } + + /** + * Name of the resource; provided by the client when the resource is created. The name must be + * 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters + * long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first + * character must be a lowercase letter, and all following characters must be a dash, lowercase + * letter, or digit, except the last character, which cannot be a dash. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * The URL of the network to which all network endpoints in the NEG belong. Uses "default" + * project network if unspecified. + */ + public String getNetwork() { + return network; + } + + /** + * The URL of the network to which all network endpoints in the NEG belong. Uses "default" + * project network if unspecified. + */ + public Builder setNetwork(String network) { + this.network = network; + return this; + } + + /** + * Type of network endpoints in this network endpoint group. Currently the only supported value + * is GCE_VM_IP_PORT. + */ + public String getNetworkEndpointType() { + return networkEndpointType; + } + + /** + * Type of network endpoints in this network endpoint group. Currently the only supported value + * is GCE_VM_IP_PORT. + */ + public Builder setNetworkEndpointType(String networkEndpointType) { + this.networkEndpointType = networkEndpointType; + return this; + } + + /** [Output Only] Server-defined URL for the resource. */ + public String getSelfLink() { + return selfLink; + } + + /** [Output Only] Server-defined URL for the resource. */ + public Builder setSelfLink(String selfLink) { + this.selfLink = selfLink; + return this; + } + + /** [Output only] Number of network endpoints in the network endpoint group. */ + public Integer getSize() { + return size; + } + + /** [Output only] Number of network endpoints in the network endpoint group. */ + public Builder setSize(Integer size) { + this.size = size; + return this; + } + + /** Optional URL of the subnetwork to which all network endpoints in the NEG belong. */ + public String getSubnetwork() { + return subnetwork; + } + + /** Optional URL of the subnetwork to which all network endpoints in the NEG belong. */ + public Builder setSubnetwork(String subnetwork) { + this.subnetwork = subnetwork; + return this; + } + + /** [Output Only] The URL of the zone where the network endpoint group is located. */ + public String getZone() { + return zone; + } + + /** [Output Only] The URL of the zone where the network endpoint group is located. */ + public Builder setZone(String zone) { + this.zone = zone; + return this; + } + + public NetworkEndpointGroup build() { + + return new NetworkEndpointGroup( + creationTimestamp, + defaultPort, + description, + id, + kind, + name, + network, + networkEndpointType, + selfLink, + size, + subnetwork, + zone); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setCreationTimestamp(this.creationTimestamp); + newBuilder.setDefaultPort(this.defaultPort); + newBuilder.setDescription(this.description); + newBuilder.setId(this.id); + newBuilder.setKind(this.kind); + newBuilder.setName(this.name); + newBuilder.setNetwork(this.network); + newBuilder.setNetworkEndpointType(this.networkEndpointType); + newBuilder.setSelfLink(this.selfLink); + newBuilder.setSize(this.size); + newBuilder.setSubnetwork(this.subnetwork); + newBuilder.setZone(this.zone); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointGroup{" + + "creationTimestamp=" + + creationTimestamp + + ", " + + "defaultPort=" + + defaultPort + + ", " + + "description=" + + description + + ", " + + "id=" + + id + + ", " + + "kind=" + + kind + + ", " + + "name=" + + name + + ", " + + "network=" + + network + + ", " + + "networkEndpointType=" + + networkEndpointType + + ", " + + "selfLink=" + + selfLink + + ", " + + "size=" + + size + + ", " + + "subnetwork=" + + subnetwork + + ", " + + "zone=" + + zone + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointGroup) { + NetworkEndpointGroup that = (NetworkEndpointGroup) o; + return Objects.equals(this.creationTimestamp, that.getCreationTimestamp()) + && Objects.equals(this.defaultPort, that.getDefaultPort()) + && Objects.equals(this.description, that.getDescription()) + && Objects.equals(this.id, that.getId()) + && Objects.equals(this.kind, that.getKind()) + && Objects.equals(this.name, that.getName()) + && Objects.equals(this.network, that.getNetwork()) + && Objects.equals(this.networkEndpointType, that.getNetworkEndpointType()) + && Objects.equals(this.selfLink, that.getSelfLink()) + && Objects.equals(this.size, that.getSize()) + && Objects.equals(this.subnetwork, that.getSubnetwork()) + && Objects.equals(this.zone, that.getZone()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + creationTimestamp, + defaultPort, + description, + id, + kind, + name, + network, + networkEndpointType, + selfLink, + size, + subnetwork, + zone); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAggregatedList.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAggregatedList.java new file mode 100644 index 000000000000..90b077e58492 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAggregatedList.java @@ -0,0 +1,356 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class NetworkEndpointGroupAggregatedList implements ApiMessage { + private final String id; + private final Map items; + private final String kind; + private final String nextPageToken; + private final String selfLink; + private final Warning warning; + + private NetworkEndpointGroupAggregatedList() { + this.id = null; + this.items = null; + this.kind = null; + this.nextPageToken = null; + this.selfLink = null; + this.warning = null; + } + + private NetworkEndpointGroupAggregatedList( + String id, + Map items, + String kind, + String nextPageToken, + String selfLink, + Warning warning) { + this.id = id; + this.items = items; + this.kind = kind; + this.nextPageToken = nextPageToken; + this.selfLink = selfLink; + this.warning = warning; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("id".equals(fieldName)) { + return id; + } + if ("items".equals(fieldName)) { + return items; + } + if ("kind".equals(fieldName)) { + return kind; + } + if ("nextPageToken".equals(fieldName)) { + return nextPageToken; + } + if ("selfLink".equals(fieldName)) { + return selfLink; + } + if ("warning".equals(fieldName)) { + return warning; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public String getId() { + return id; + } + + /** + * A list of NetworkEndpointGroupsScopedList resources. The key for the map is: The name of the + * scope that contains this set of network endpoint groups. + */ + public Map getItemsMap() { + return items; + } + + /** + * [Output Only] The resource type, which is always compute#networkEndpointGroupAggregatedList for + * aggregated lists of network endpoint groups. + */ + public String getKind() { + return kind; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + /** [Output Only] Server-defined URL for this resource. */ + public String getSelfLink() { + return selfLink; + } + + /** [Output Only] Informational warning message. */ + public Warning getWarning() { + return warning; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointGroupAggregatedList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointGroupAggregatedList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointGroupAggregatedList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointGroupAggregatedList(); + } + + public static class Builder { + private String id; + private Map items; + private String kind; + private String nextPageToken; + private String selfLink; + private Warning warning; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointGroupAggregatedList other) { + if (other == NetworkEndpointGroupAggregatedList.getDefaultInstance()) return this; + if (other.getId() != null) { + this.id = other.id; + } + if (other.getItemsMap() != null) { + this.items = other.items; + } + if (other.getKind() != null) { + this.kind = other.kind; + } + if (other.getNextPageToken() != null) { + this.nextPageToken = other.nextPageToken; + } + if (other.getSelfLink() != null) { + this.selfLink = other.selfLink; + } + if (other.getWarning() != null) { + this.warning = other.warning; + } + return this; + } + + Builder(NetworkEndpointGroupAggregatedList source) { + this.id = source.id; + this.items = source.items; + this.kind = source.kind; + this.nextPageToken = source.nextPageToken; + this.selfLink = source.selfLink; + this.warning = source.warning; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public String getId() { + return id; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public Builder setId(String id) { + this.id = id; + return this; + } + + /** + * A list of NetworkEndpointGroupsScopedList resources. The key for the map is: The name of the + * scope that contains this set of network endpoint groups. + */ + public Map getItemsMap() { + return items; + } + + /** + * A list of NetworkEndpointGroupsScopedList resources. The key for the map is: The name of the + * scope that contains this set of network endpoint groups. + */ + public Builder putAllItems(Map items) { + this.items = items; + return this; + } + + /** + * [Output Only] The resource type, which is always compute#networkEndpointGroupAggregatedList + * for aggregated lists of network endpoint groups. + */ + public String getKind() { + return kind; + } + + /** + * [Output Only] The resource type, which is always compute#networkEndpointGroupAggregatedList + * for aggregated lists of network endpoint groups. + */ + public Builder setKind(String kind) { + this.kind = kind; + return this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public Builder setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + /** [Output Only] Server-defined URL for this resource. */ + public String getSelfLink() { + return selfLink; + } + + /** [Output Only] Server-defined URL for this resource. */ + public Builder setSelfLink(String selfLink) { + this.selfLink = selfLink; + return this; + } + + /** [Output Only] Informational warning message. */ + public Warning getWarning() { + return warning; + } + + /** [Output Only] Informational warning message. */ + public Builder setWarning(Warning warning) { + this.warning = warning; + return this; + } + + public NetworkEndpointGroupAggregatedList build() { + + return new NetworkEndpointGroupAggregatedList( + id, items, kind, nextPageToken, selfLink, warning); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setId(this.id); + newBuilder.putAllItems(this.items); + newBuilder.setKind(this.kind); + newBuilder.setNextPageToken(this.nextPageToken); + newBuilder.setSelfLink(this.selfLink); + newBuilder.setWarning(this.warning); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointGroupAggregatedList{" + + "id=" + + id + + ", " + + "items=" + + items + + ", " + + "kind=" + + kind + + ", " + + "nextPageToken=" + + nextPageToken + + ", " + + "selfLink=" + + selfLink + + ", " + + "warning=" + + warning + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointGroupAggregatedList) { + NetworkEndpointGroupAggregatedList that = (NetworkEndpointGroupAggregatedList) o; + return Objects.equals(this.id, that.getId()) + && Objects.equals(this.items, that.getItemsMap()) + && Objects.equals(this.kind, that.getKind()) + && Objects.equals(this.nextPageToken, that.getNextPageToken()) + && Objects.equals(this.selfLink, that.getSelfLink()) + && Objects.equals(this.warning, that.getWarning()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(id, items, kind, nextPageToken, selfLink, warning); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupClient.java new file mode 100644 index 000000000000..6f7546c32553 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupClient.java @@ -0,0 +1,1663 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.compute.v1.stub.NetworkEndpointGroupStub; +import com.google.cloud.compute.v1.stub.NetworkEndpointGroupStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Creates and runs virtual machines on Google Cloud Platform. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+ *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+ *   NetworkEndpointGroupsAttachEndpointsRequest networkEndpointGroupsAttachEndpointsRequestResource = NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+ *   Operation response = networkEndpointGroupClient.attachNetworkEndpointsNetworkEndpointGroup(networkEndpointGroup, networkEndpointGroupsAttachEndpointsRequestResource);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the networkEndpointGroupClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of NetworkEndpointGroupSettings + * to create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * NetworkEndpointGroupSettings networkEndpointGroupSettings =
+ *     NetworkEndpointGroupSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * NetworkEndpointGroupClient networkEndpointGroupClient =
+ *     NetworkEndpointGroupClient.create(networkEndpointGroupSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * NetworkEndpointGroupSettings networkEndpointGroupSettings =
+ *     NetworkEndpointGroupSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * NetworkEndpointGroupClient networkEndpointGroupClient =
+ *     NetworkEndpointGroupClient.create(networkEndpointGroupSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class NetworkEndpointGroupClient implements BackgroundResource { + private final NetworkEndpointGroupSettings settings; + private final NetworkEndpointGroupStub stub; + + /** Constructs an instance of NetworkEndpointGroupClient with default settings. */ + public static final NetworkEndpointGroupClient create() throws IOException { + return create(NetworkEndpointGroupSettings.newBuilder().build()); + } + + /** + * Constructs an instance of NetworkEndpointGroupClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final NetworkEndpointGroupClient create(NetworkEndpointGroupSettings settings) + throws IOException { + return new NetworkEndpointGroupClient(settings); + } + + /** + * Constructs an instance of NetworkEndpointGroupClient, using the given stub for making calls. + * This is for advanced usage - prefer to use NetworkEndpointGroupSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final NetworkEndpointGroupClient create(NetworkEndpointGroupStub stub) { + return new NetworkEndpointGroupClient(stub); + } + + /** + * Constructs an instance of NetworkEndpointGroupClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected NetworkEndpointGroupClient(NetworkEndpointGroupSettings settings) throws IOException { + this.settings = settings; + this.stub = ((NetworkEndpointGroupStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected NetworkEndpointGroupClient(NetworkEndpointGroupStub stub) { + this.settings = null; + this.stub = stub; + } + + public final NetworkEndpointGroupSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public NetworkEndpointGroupStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups and sorts them by zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   for (NetworkEndpointGroupsScopedList element : networkEndpointGroupClient.aggregatedListNetworkEndpointGroups(project).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param project Project ID for this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetworkEndpointGroups( + ProjectName project) { + AggregatedListNetworkEndpointGroupsHttpRequest request = + AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder() + .setProject(project == null ? null : project.toString()) + .build(); + return aggregatedListNetworkEndpointGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups and sorts them by zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   for (NetworkEndpointGroupsScopedList element : networkEndpointGroupClient.aggregatedListNetworkEndpointGroups(project.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param project Project ID for this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetworkEndpointGroups( + String project) { + AggregatedListNetworkEndpointGroupsHttpRequest request = + AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder().setProject(project).build(); + return aggregatedListNetworkEndpointGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups and sorts them by zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedProject = ProjectName.format("[PROJECT]");
+   *   AggregatedListNetworkEndpointGroupsHttpRequest request = AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setProject(formattedProject)
+   *     .build();
+   *   for (NetworkEndpointGroupsScopedList element : networkEndpointGroupClient.aggregatedListNetworkEndpointGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @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 + public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetworkEndpointGroups( + AggregatedListNetworkEndpointGroupsHttpRequest request) { + return aggregatedListNetworkEndpointGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups and sorts them by zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedProject = ProjectName.format("[PROJECT]");
+   *   AggregatedListNetworkEndpointGroupsHttpRequest request = AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setProject(formattedProject)
+   *     .build();
+   *   ApiFuture<AggregatedListNetworkEndpointGroupsPagedResponse> future = networkEndpointGroupClient.aggregatedListNetworkEndpointGroupsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (NetworkEndpointGroupsScopedList element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsPagedCallable() { + return stub.aggregatedListNetworkEndpointGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups and sorts them by zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedProject = ProjectName.format("[PROJECT]");
+   *   AggregatedListNetworkEndpointGroupsHttpRequest request = AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setProject(formattedProject)
+   *     .build();
+   *   while (true) {
+   *     NetworkEndpointGroupAggregatedList response = networkEndpointGroupClient.aggregatedListNetworkEndpointGroupsCallable().call(request);
+   *     for (NetworkEndpointGroupsScopedList element : response.getItemsMap()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupAggregatedList> + aggregatedListNetworkEndpointGroupsCallable() { + return stub.aggregatedListNetworkEndpointGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Attach a list of network endpoints to the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsAttachEndpointsRequest networkEndpointGroupsAttachEndpointsRequestResource = NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+   *   Operation response = networkEndpointGroupClient.attachNetworkEndpointsNetworkEndpointGroup(networkEndpointGroup, networkEndpointGroupsAttachEndpointsRequestResource);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group where you are attaching + * network endpoints to. It should comply with RFC1035. + * @param networkEndpointGroupsAttachEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation attachNetworkEndpointsNetworkEndpointGroup( + ProjectZoneNetworkEndpointGroupName networkEndpointGroup, + NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource) { + + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest request = + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup( + networkEndpointGroup == null ? null : networkEndpointGroup.toString()) + .setNetworkEndpointGroupsAttachEndpointsRequestResource( + networkEndpointGroupsAttachEndpointsRequestResource) + .build(); + return attachNetworkEndpointsNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Attach a list of network endpoints to the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsAttachEndpointsRequest networkEndpointGroupsAttachEndpointsRequestResource = NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+   *   Operation response = networkEndpointGroupClient.attachNetworkEndpointsNetworkEndpointGroup(networkEndpointGroup.toString(), networkEndpointGroupsAttachEndpointsRequestResource);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group where you are attaching + * network endpoints to. It should comply with RFC1035. + * @param networkEndpointGroupsAttachEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation attachNetworkEndpointsNetworkEndpointGroup( + String networkEndpointGroup, + NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource) { + + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest request = + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup(networkEndpointGroup) + .setNetworkEndpointGroupsAttachEndpointsRequestResource( + networkEndpointGroupsAttachEndpointsRequestResource) + .build(); + return attachNetworkEndpointsNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Attach a list of network endpoints to the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsAttachEndpointsRequest networkEndpointGroupsAttachEndpointsRequestResource = NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+   *   AttachNetworkEndpointsNetworkEndpointGroupHttpRequest request = AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setNetworkEndpointGroupsAttachEndpointsRequestResource(networkEndpointGroupsAttachEndpointsRequestResource)
+   *     .build();
+   *   Operation response = networkEndpointGroupClient.attachNetworkEndpointsNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @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 + public final Operation attachNetworkEndpointsNetworkEndpointGroup( + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest request) { + return attachNetworkEndpointsNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Attach a list of network endpoints to the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsAttachEndpointsRequest networkEndpointGroupsAttachEndpointsRequestResource = NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+   *   AttachNetworkEndpointsNetworkEndpointGroupHttpRequest request = AttachNetworkEndpointsNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setNetworkEndpointGroupsAttachEndpointsRequestResource(networkEndpointGroupsAttachEndpointsRequestResource)
+   *     .build();
+   *   ApiFuture<Operation> future = networkEndpointGroupClient.attachNetworkEndpointsNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + attachNetworkEndpointsNetworkEndpointGroupCallable() { + return stub.attachNetworkEndpointsNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified network endpoint group. The network endpoints in the NEG and the VM + * instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot + * be deleted if there are backend services referencing it. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   Operation response = networkEndpointGroupClient.deleteNetworkEndpointGroup(networkEndpointGroup);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply + * with RFC1035. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation deleteNetworkEndpointGroup( + ProjectZoneNetworkEndpointGroupName networkEndpointGroup) { + + DeleteNetworkEndpointGroupHttpRequest request = + DeleteNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup( + networkEndpointGroup == null ? null : networkEndpointGroup.toString()) + .build(); + return deleteNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified network endpoint group. The network endpoints in the NEG and the VM + * instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot + * be deleted if there are backend services referencing it. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   Operation response = networkEndpointGroupClient.deleteNetworkEndpointGroup(networkEndpointGroup.toString());
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply + * with RFC1035. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation deleteNetworkEndpointGroup(String networkEndpointGroup) { + + DeleteNetworkEndpointGroupHttpRequest request = + DeleteNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup(networkEndpointGroup) + .build(); + return deleteNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified network endpoint group. The network endpoints in the NEG and the VM + * instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot + * be deleted if there are backend services referencing it. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   DeleteNetworkEndpointGroupHttpRequest request = DeleteNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   Operation response = networkEndpointGroupClient.deleteNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @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 + public final Operation deleteNetworkEndpointGroup(DeleteNetworkEndpointGroupHttpRequest request) { + return deleteNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified network endpoint group. The network endpoints in the NEG and the VM + * instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot + * be deleted if there are backend services referencing it. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   DeleteNetworkEndpointGroupHttpRequest request = DeleteNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   ApiFuture<Operation> future = networkEndpointGroupClient.deleteNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + deleteNetworkEndpointGroupCallable() { + return stub.deleteNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detach a list of network endpoints from the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsDetachEndpointsRequest networkEndpointGroupsDetachEndpointsRequestResource = NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
+   *   Operation response = networkEndpointGroupClient.detachNetworkEndpointsNetworkEndpointGroup(networkEndpointGroup, networkEndpointGroupsDetachEndpointsRequestResource);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group where you are removing + * network endpoints. It should comply with RFC1035. + * @param networkEndpointGroupsDetachEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation detachNetworkEndpointsNetworkEndpointGroup( + ProjectZoneNetworkEndpointGroupName networkEndpointGroup, + NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource) { + + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest request = + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup( + networkEndpointGroup == null ? null : networkEndpointGroup.toString()) + .setNetworkEndpointGroupsDetachEndpointsRequestResource( + networkEndpointGroupsDetachEndpointsRequestResource) + .build(); + return detachNetworkEndpointsNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detach a list of network endpoints from the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsDetachEndpointsRequest networkEndpointGroupsDetachEndpointsRequestResource = NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
+   *   Operation response = networkEndpointGroupClient.detachNetworkEndpointsNetworkEndpointGroup(networkEndpointGroup.toString(), networkEndpointGroupsDetachEndpointsRequestResource);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group where you are removing + * network endpoints. It should comply with RFC1035. + * @param networkEndpointGroupsDetachEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation detachNetworkEndpointsNetworkEndpointGroup( + String networkEndpointGroup, + NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource) { + + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest request = + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup(networkEndpointGroup) + .setNetworkEndpointGroupsDetachEndpointsRequestResource( + networkEndpointGroupsDetachEndpointsRequestResource) + .build(); + return detachNetworkEndpointsNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detach a list of network endpoints from the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsDetachEndpointsRequest networkEndpointGroupsDetachEndpointsRequestResource = NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
+   *   DetachNetworkEndpointsNetworkEndpointGroupHttpRequest request = DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setNetworkEndpointGroupsDetachEndpointsRequestResource(networkEndpointGroupsDetachEndpointsRequestResource)
+   *     .build();
+   *   Operation response = networkEndpointGroupClient.detachNetworkEndpointsNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @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 + public final Operation detachNetworkEndpointsNetworkEndpointGroup( + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest request) { + return detachNetworkEndpointsNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detach a list of network endpoints from the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsDetachEndpointsRequest networkEndpointGroupsDetachEndpointsRequestResource = NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
+   *   DetachNetworkEndpointsNetworkEndpointGroupHttpRequest request = DetachNetworkEndpointsNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setNetworkEndpointGroupsDetachEndpointsRequestResource(networkEndpointGroupsDetachEndpointsRequestResource)
+   *     .build();
+   *   ApiFuture<Operation> future = networkEndpointGroupClient.detachNetworkEndpointsNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + detachNetworkEndpointsNetworkEndpointGroupCallable() { + return stub.detachNetworkEndpointsNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the specified network endpoint group. Gets a list of available network endpoint groups + * by making a list() request. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroup response = networkEndpointGroupClient.getNetworkEndpointGroup(networkEndpointGroup);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group. It should comply with + * RFC1035. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final NetworkEndpointGroup getNetworkEndpointGroup( + ProjectZoneNetworkEndpointGroupName networkEndpointGroup) { + + GetNetworkEndpointGroupHttpRequest request = + GetNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup( + networkEndpointGroup == null ? null : networkEndpointGroup.toString()) + .build(); + return getNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the specified network endpoint group. Gets a list of available network endpoint groups + * by making a list() request. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroup response = networkEndpointGroupClient.getNetworkEndpointGroup(networkEndpointGroup.toString());
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group. It should comply with + * RFC1035. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final NetworkEndpointGroup getNetworkEndpointGroup(String networkEndpointGroup) { + + GetNetworkEndpointGroupHttpRequest request = + GetNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup(networkEndpointGroup) + .build(); + return getNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the specified network endpoint group. Gets a list of available network endpoint groups + * by making a list() request. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GetNetworkEndpointGroupHttpRequest request = GetNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   NetworkEndpointGroup response = networkEndpointGroupClient.getNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @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 + public final NetworkEndpointGroup getNetworkEndpointGroup( + GetNetworkEndpointGroupHttpRequest request) { + return getNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the specified network endpoint group. Gets a list of available network endpoint groups + * by making a list() request. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GetNetworkEndpointGroupHttpRequest request = GetNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   ApiFuture<NetworkEndpointGroup> future = networkEndpointGroupClient.getNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   NetworkEndpointGroup response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + getNetworkEndpointGroupCallable() { + return stub.getNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a network endpoint group in the specified project using the parameters that are + * included in the request. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
+   *   Operation response = networkEndpointGroupClient.insertNetworkEndpointGroup(zone, networkEndpointGroupResource);
+   * }
+   * 
+ * + * @param zone The name of the zone where you want to create the network endpoint group. It should + * comply with RFC1035. + * @param networkEndpointGroupResource Represents a collection of network endpoints. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation insertNetworkEndpointGroup( + ProjectZoneName zone, NetworkEndpointGroup networkEndpointGroupResource) { + + InsertNetworkEndpointGroupHttpRequest request = + InsertNetworkEndpointGroupHttpRequest.newBuilder() + .setZone(zone == null ? null : zone.toString()) + .setNetworkEndpointGroupResource(networkEndpointGroupResource) + .build(); + return insertNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a network endpoint group in the specified project using the parameters that are + * included in the request. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
+   *   Operation response = networkEndpointGroupClient.insertNetworkEndpointGroup(zone.toString(), networkEndpointGroupResource);
+   * }
+   * 
+ * + * @param zone The name of the zone where you want to create the network endpoint group. It should + * comply with RFC1035. + * @param networkEndpointGroupResource Represents a collection of network endpoints. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation insertNetworkEndpointGroup( + String zone, NetworkEndpointGroup networkEndpointGroupResource) { + + InsertNetworkEndpointGroupHttpRequest request = + InsertNetworkEndpointGroupHttpRequest.newBuilder() + .setZone(zone) + .setNetworkEndpointGroupResource(networkEndpointGroupResource) + .build(); + return insertNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a network endpoint group in the specified project using the parameters that are + * included in the request. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
+   *   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
+   *   InsertNetworkEndpointGroupHttpRequest request = InsertNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setZone(formattedZone)
+   *     .setNetworkEndpointGroupResource(networkEndpointGroupResource)
+   *     .build();
+   *   Operation response = networkEndpointGroupClient.insertNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @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 + public final Operation insertNetworkEndpointGroup(InsertNetworkEndpointGroupHttpRequest request) { + return insertNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a network endpoint group in the specified project using the parameters that are + * included in the request. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
+   *   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
+   *   InsertNetworkEndpointGroupHttpRequest request = InsertNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setZone(formattedZone)
+   *     .setNetworkEndpointGroupResource(networkEndpointGroupResource)
+   *     .build();
+   *   ApiFuture<Operation> future = networkEndpointGroupClient.insertNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + insertNetworkEndpointGroupCallable() { + return stub.insertNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project and + * zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   for (NetworkEndpointGroup element : networkEndpointGroupClient.listNetworkEndpointGroups(zone).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param zone The name of the zone where the network endpoint group is located. It should comply + * with RFC1035. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListNetworkEndpointGroupsPagedResponse listNetworkEndpointGroups( + ProjectZoneName zone) { + ListNetworkEndpointGroupsHttpRequest request = + ListNetworkEndpointGroupsHttpRequest.newBuilder() + .setZone(zone == null ? null : zone.toString()) + .build(); + return listNetworkEndpointGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project and + * zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   for (NetworkEndpointGroup element : networkEndpointGroupClient.listNetworkEndpointGroups(zone.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param zone The name of the zone where the network endpoint group is located. It should comply + * with RFC1035. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListNetworkEndpointGroupsPagedResponse listNetworkEndpointGroups(String zone) { + ListNetworkEndpointGroupsHttpRequest request = + ListNetworkEndpointGroupsHttpRequest.newBuilder().setZone(zone).build(); + return listNetworkEndpointGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project and + * zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
+   *   ListNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setZone(formattedZone)
+   *     .build();
+   *   for (NetworkEndpointGroup element : networkEndpointGroupClient.listNetworkEndpointGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @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 + public final ListNetworkEndpointGroupsPagedResponse listNetworkEndpointGroups( + ListNetworkEndpointGroupsHttpRequest request) { + return listNetworkEndpointGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project and + * zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
+   *   ListNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setZone(formattedZone)
+   *     .build();
+   *   ApiFuture<ListNetworkEndpointGroupsPagedResponse> future = networkEndpointGroupClient.listNetworkEndpointGroupsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (NetworkEndpointGroup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListNetworkEndpointGroupsHttpRequest, ListNetworkEndpointGroupsPagedResponse> + listNetworkEndpointGroupsPagedCallable() { + return stub.listNetworkEndpointGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project and + * zone. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
+   *   ListNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setZone(formattedZone)
+   *     .build();
+   *   while (true) {
+   *     NetworkEndpointGroupList response = networkEndpointGroupClient.listNetworkEndpointGroupsCallable().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;
+   *     }
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + listNetworkEndpointGroupsCallable() { + return stub.listNetworkEndpointGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the network endpoints in the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource = NetworkEndpointGroupsListEndpointsRequest.newBuilder().build();
+   *   for (NetworkEndpointWithHealthStatus element : networkEndpointGroupClient.listNetworkEndpointsNetworkEndpointGroups(networkEndpointGroup, networkEndpointGroupsListEndpointsRequestResource).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group from which you want to + * generate a list of included network endpoints. It should comply with RFC1035. + * @param networkEndpointGroupsListEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListNetworkEndpointsNetworkEndpointGroupsPagedResponse + listNetworkEndpointsNetworkEndpointGroups( + ProjectZoneNetworkEndpointGroupName networkEndpointGroup, + NetworkEndpointGroupsListEndpointsRequest + networkEndpointGroupsListEndpointsRequestResource) { + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest request = + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.newBuilder() + .setNetworkEndpointGroup( + networkEndpointGroup == null ? null : networkEndpointGroup.toString()) + .setNetworkEndpointGroupsListEndpointsRequestResource( + networkEndpointGroupsListEndpointsRequestResource) + .build(); + return listNetworkEndpointsNetworkEndpointGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the network endpoints in the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource = NetworkEndpointGroupsListEndpointsRequest.newBuilder().build();
+   *   for (NetworkEndpointWithHealthStatus element : networkEndpointGroupClient.listNetworkEndpointsNetworkEndpointGroups(networkEndpointGroup.toString(), networkEndpointGroupsListEndpointsRequestResource).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group from which you want to + * generate a list of included network endpoints. It should comply with RFC1035. + * @param networkEndpointGroupsListEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListNetworkEndpointsNetworkEndpointGroupsPagedResponse + listNetworkEndpointsNetworkEndpointGroups( + String networkEndpointGroup, + NetworkEndpointGroupsListEndpointsRequest + networkEndpointGroupsListEndpointsRequestResource) { + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest request = + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.newBuilder() + .setNetworkEndpointGroup(networkEndpointGroup) + .setNetworkEndpointGroupsListEndpointsRequestResource( + networkEndpointGroupsListEndpointsRequestResource) + .build(); + return listNetworkEndpointsNetworkEndpointGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the network endpoints in the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource = NetworkEndpointGroupsListEndpointsRequest.newBuilder().build();
+   *   ListNetworkEndpointsNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setNetworkEndpointGroupsListEndpointsRequestResource(networkEndpointGroupsListEndpointsRequestResource)
+   *     .build();
+   *   for (NetworkEndpointWithHealthStatus element : networkEndpointGroupClient.listNetworkEndpointsNetworkEndpointGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @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 + public final ListNetworkEndpointsNetworkEndpointGroupsPagedResponse + listNetworkEndpointsNetworkEndpointGroups( + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest request) { + return listNetworkEndpointsNetworkEndpointGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the network endpoints in the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource = NetworkEndpointGroupsListEndpointsRequest.newBuilder().build();
+   *   ListNetworkEndpointsNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setNetworkEndpointGroupsListEndpointsRequestResource(networkEndpointGroupsListEndpointsRequestResource)
+   *     .build();
+   *   ApiFuture<ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> future = networkEndpointGroupClient.listNetworkEndpointsNetworkEndpointGroupsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (NetworkEndpointWithHealthStatus element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsPagedCallable() { + return stub.listNetworkEndpointsNetworkEndpointGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the network endpoints in the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectZoneNetworkEndpointGroupName.format("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+   *   NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource = NetworkEndpointGroupsListEndpointsRequest.newBuilder().build();
+   *   ListNetworkEndpointsNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setNetworkEndpointGroupsListEndpointsRequestResource(networkEndpointGroupsListEndpointsRequestResource)
+   *     .build();
+   *   while (true) {
+   *     NetworkEndpointGroupsListNetworkEndpoints response = networkEndpointGroupClient.listNetworkEndpointsNetworkEndpointGroupsCallable().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;
+   *     }
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsNetworkEndpointGroupsCallable() { + return stub.listNetworkEndpointsNetworkEndpointGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on the specified resource. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupResourceName resource = ProjectZoneNetworkEndpointGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
+   *   TestPermissionsResponse response = networkEndpointGroupClient.testIamPermissionsNetworkEndpointGroup(resource, testPermissionsRequestResource);
+   * }
+   * 
+ * + * @param resource Name or id of the resource for this request. + * @param testPermissionsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final TestPermissionsResponse testIamPermissionsNetworkEndpointGroup( + ProjectZoneNetworkEndpointGroupResourceName resource, + TestPermissionsRequest testPermissionsRequestResource) { + + TestIamPermissionsNetworkEndpointGroupHttpRequest request = + TestIamPermissionsNetworkEndpointGroupHttpRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .setTestPermissionsRequestResource(testPermissionsRequestResource) + .build(); + return testIamPermissionsNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on the specified resource. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   ProjectZoneNetworkEndpointGroupResourceName resource = ProjectZoneNetworkEndpointGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
+   *   TestPermissionsResponse response = networkEndpointGroupClient.testIamPermissionsNetworkEndpointGroup(resource.toString(), testPermissionsRequestResource);
+   * }
+   * 
+ * + * @param resource Name or id of the resource for this request. + * @param testPermissionsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final TestPermissionsResponse testIamPermissionsNetworkEndpointGroup( + String resource, TestPermissionsRequest testPermissionsRequestResource) { + + TestIamPermissionsNetworkEndpointGroupHttpRequest request = + TestIamPermissionsNetworkEndpointGroupHttpRequest.newBuilder() + .setResource(resource) + .setTestPermissionsRequestResource(testPermissionsRequestResource) + .build(); + return testIamPermissionsNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on the specified resource. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedResource = ProjectZoneNetworkEndpointGroupResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
+   *   TestIamPermissionsNetworkEndpointGroupHttpRequest request = TestIamPermissionsNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setResource(formattedResource)
+   *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
+   *     .build();
+   *   TestPermissionsResponse response = networkEndpointGroupClient.testIamPermissionsNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @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 + public final TestPermissionsResponse testIamPermissionsNetworkEndpointGroup( + TestIamPermissionsNetworkEndpointGroupHttpRequest request) { + return testIamPermissionsNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on the specified resource. + * + *

Sample code: + * + *


+   * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   String formattedResource = ProjectZoneNetworkEndpointGroupResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
+   *   TestIamPermissionsNetworkEndpointGroupHttpRequest request = TestIamPermissionsNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setResource(formattedResource)
+   *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
+   *     .build();
+   *   ApiFuture<TestPermissionsResponse> future = networkEndpointGroupClient.testIamPermissionsNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   TestPermissionsResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupCallable() { + return stub.testIamPermissionsNetworkEndpointGroupCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class AggregatedListNetworkEndpointGroupsPagedResponse + extends AbstractPagedListResponse< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList, + AggregatedListNetworkEndpointGroupsPage, + AggregatedListNetworkEndpointGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + AggregatedListNetworkEndpointGroupsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + AggregatedListNetworkEndpointGroupsPage, + AggregatedListNetworkEndpointGroupsPagedResponse>() { + @Override + public AggregatedListNetworkEndpointGroupsPagedResponse apply( + AggregatedListNetworkEndpointGroupsPage input) { + return new AggregatedListNetworkEndpointGroupsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private AggregatedListNetworkEndpointGroupsPagedResponse( + AggregatedListNetworkEndpointGroupsPage page) { + super(page, AggregatedListNetworkEndpointGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class AggregatedListNetworkEndpointGroupsPage + extends AbstractPage< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList, + AggregatedListNetworkEndpointGroupsPage> { + + private AggregatedListNetworkEndpointGroupsPage( + PageContext< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList> + context, + NetworkEndpointGroupAggregatedList response) { + super(context, response); + } + + private static AggregatedListNetworkEndpointGroupsPage createEmptyPage() { + return new AggregatedListNetworkEndpointGroupsPage(null, null); + } + + @Override + protected AggregatedListNetworkEndpointGroupsPage createPage( + PageContext< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList> + context, + NetworkEndpointGroupAggregatedList response) { + return new AggregatedListNetworkEndpointGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class AggregatedListNetworkEndpointGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList, + AggregatedListNetworkEndpointGroupsPage, + AggregatedListNetworkEndpointGroupsFixedSizeCollection> { + + private AggregatedListNetworkEndpointGroupsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static AggregatedListNetworkEndpointGroupsFixedSizeCollection createEmptyCollection() { + return new AggregatedListNetworkEndpointGroupsFixedSizeCollection(null, 0); + } + + @Override + protected AggregatedListNetworkEndpointGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new AggregatedListNetworkEndpointGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNetworkEndpointGroupsPagedResponse + extends AbstractPagedListResponse< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup, + ListNetworkEndpointGroupsPage, + ListNetworkEndpointGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNetworkEndpointGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListNetworkEndpointGroupsPagedResponse apply( + ListNetworkEndpointGroupsPage input) { + return new ListNetworkEndpointGroupsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListNetworkEndpointGroupsPagedResponse(ListNetworkEndpointGroupsPage page) { + super(page, ListNetworkEndpointGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNetworkEndpointGroupsPage + extends AbstractPage< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup, + ListNetworkEndpointGroupsPage> { + + private ListNetworkEndpointGroupsPage( + PageContext< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + context, + NetworkEndpointGroupList response) { + super(context, response); + } + + private static ListNetworkEndpointGroupsPage createEmptyPage() { + return new ListNetworkEndpointGroupsPage(null, null); + } + + @Override + protected ListNetworkEndpointGroupsPage createPage( + PageContext< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + context, + NetworkEndpointGroupList response) { + return new ListNetworkEndpointGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNetworkEndpointGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup, + ListNetworkEndpointGroupsPage, + ListNetworkEndpointGroupsFixedSizeCollection> { + + private ListNetworkEndpointGroupsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNetworkEndpointGroupsFixedSizeCollection createEmptyCollection() { + return new ListNetworkEndpointGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListNetworkEndpointGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNetworkEndpointGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNetworkEndpointsNetworkEndpointGroupsPagedResponse + extends AbstractPagedListResponse< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus, + ListNetworkEndpointsNetworkEndpointGroupsPage, + ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNetworkEndpointsNetworkEndpointGroupsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListNetworkEndpointsNetworkEndpointGroupsPage, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse>() { + @Override + public ListNetworkEndpointsNetworkEndpointGroupsPagedResponse apply( + ListNetworkEndpointsNetworkEndpointGroupsPage input) { + return new ListNetworkEndpointsNetworkEndpointGroupsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListNetworkEndpointsNetworkEndpointGroupsPagedResponse( + ListNetworkEndpointsNetworkEndpointGroupsPage page) { + super( + page, + ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNetworkEndpointsNetworkEndpointGroupsPage + extends AbstractPage< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus, + ListNetworkEndpointsNetworkEndpointGroupsPage> { + + private ListNetworkEndpointsNetworkEndpointGroupsPage( + PageContext< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + context, + NetworkEndpointGroupsListNetworkEndpoints response) { + super(context, response); + } + + private static ListNetworkEndpointsNetworkEndpointGroupsPage createEmptyPage() { + return new ListNetworkEndpointsNetworkEndpointGroupsPage(null, null); + } + + @Override + protected ListNetworkEndpointsNetworkEndpointGroupsPage createPage( + PageContext< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + context, + NetworkEndpointGroupsListNetworkEndpoints response) { + return new ListNetworkEndpointsNetworkEndpointGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus, + ListNetworkEndpointsNetworkEndpointGroupsPage, + ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection> { + + private ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection + createEmptyCollection() { + return new ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNetworkEndpointsNetworkEndpointGroupsFixedSizeCollection( + pages, collectionSize); + } + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupList.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupList.java new file mode 100644 index 000000000000..35d7db452f8e --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupList.java @@ -0,0 +1,358 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class NetworkEndpointGroupList implements ApiMessage { + private final String id; + private final List items; + private final String kind; + private final String nextPageToken; + private final String selfLink; + private final Warning warning; + + private NetworkEndpointGroupList() { + this.id = null; + this.items = null; + this.kind = null; + this.nextPageToken = null; + this.selfLink = null; + this.warning = null; + } + + private NetworkEndpointGroupList( + String id, + List items, + String kind, + String nextPageToken, + String selfLink, + Warning warning) { + this.id = id; + this.items = items; + this.kind = kind; + this.nextPageToken = nextPageToken; + this.selfLink = selfLink; + this.warning = warning; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("id".equals(fieldName)) { + return id; + } + if ("items".equals(fieldName)) { + return items; + } + if ("kind".equals(fieldName)) { + return kind; + } + if ("nextPageToken".equals(fieldName)) { + return nextPageToken; + } + if ("selfLink".equals(fieldName)) { + return selfLink; + } + if ("warning".equals(fieldName)) { + return warning; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public String getId() { + return id; + } + + /** A list of NetworkEndpointGroup resources. */ + public List getItemsList() { + return items; + } + + /** + * [Output Only] The resource type, which is always compute#networkEndpointGroupList for network + * endpoint group lists. + */ + public String getKind() { + return kind; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + /** [Output Only] Server-defined URL for this resource. */ + public String getSelfLink() { + return selfLink; + } + + /** [Output Only] Informational warning message. */ + public Warning getWarning() { + return warning; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointGroupList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointGroupList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointGroupList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointGroupList(); + } + + public static class Builder { + private String id; + private List items; + private String kind; + private String nextPageToken; + private String selfLink; + private Warning warning; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointGroupList other) { + if (other == NetworkEndpointGroupList.getDefaultInstance()) return this; + if (other.getId() != null) { + this.id = other.id; + } + if (other.getItemsList() != null) { + this.items = other.items; + } + if (other.getKind() != null) { + this.kind = other.kind; + } + if (other.getNextPageToken() != null) { + this.nextPageToken = other.nextPageToken; + } + if (other.getSelfLink() != null) { + this.selfLink = other.selfLink; + } + if (other.getWarning() != null) { + this.warning = other.warning; + } + return this; + } + + Builder(NetworkEndpointGroupList source) { + this.id = source.id; + this.items = source.items; + this.kind = source.kind; + this.nextPageToken = source.nextPageToken; + this.selfLink = source.selfLink; + this.warning = source.warning; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public String getId() { + return id; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public Builder setId(String id) { + this.id = id; + return this; + } + + /** A list of NetworkEndpointGroup resources. */ + public List getItemsList() { + return items; + } + + /** A list of NetworkEndpointGroup resources. */ + public Builder addAllItems(List items) { + if (this.items == null) { + this.items = new LinkedList<>(); + } + this.items.addAll(items); + return this; + } + + /** A list of NetworkEndpointGroup resources. */ + public Builder addItems(NetworkEndpointGroup items) { + if (this.items == null) { + this.items = new LinkedList<>(); + } + this.items.add(items); + return this; + } + + /** + * [Output Only] The resource type, which is always compute#networkEndpointGroupList for network + * endpoint group lists. + */ + public String getKind() { + return kind; + } + + /** + * [Output Only] The resource type, which is always compute#networkEndpointGroupList for network + * endpoint group lists. + */ + public Builder setKind(String kind) { + this.kind = kind; + return this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public Builder setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + /** [Output Only] Server-defined URL for this resource. */ + public String getSelfLink() { + return selfLink; + } + + /** [Output Only] Server-defined URL for this resource. */ + public Builder setSelfLink(String selfLink) { + this.selfLink = selfLink; + return this; + } + + /** [Output Only] Informational warning message. */ + public Warning getWarning() { + return warning; + } + + /** [Output Only] Informational warning message. */ + public Builder setWarning(Warning warning) { + this.warning = warning; + return this; + } + + public NetworkEndpointGroupList build() { + + return new NetworkEndpointGroupList(id, items, kind, nextPageToken, selfLink, warning); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setId(this.id); + newBuilder.addAllItems(this.items); + newBuilder.setKind(this.kind); + newBuilder.setNextPageToken(this.nextPageToken); + newBuilder.setSelfLink(this.selfLink); + newBuilder.setWarning(this.warning); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointGroupList{" + + "id=" + + id + + ", " + + "items=" + + items + + ", " + + "kind=" + + kind + + ", " + + "nextPageToken=" + + nextPageToken + + ", " + + "selfLink=" + + selfLink + + ", " + + "warning=" + + warning + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointGroupList) { + NetworkEndpointGroupList that = (NetworkEndpointGroupList) o; + return Objects.equals(this.id, that.getId()) + && Objects.equals(this.items, that.getItemsList()) + && Objects.equals(this.kind, that.getKind()) + && Objects.equals(this.nextPageToken, that.getNextPageToken()) + && Objects.equals(this.selfLink, that.getSelfLink()) + && Objects.equals(this.warning, that.getWarning()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(id, items, kind, nextPageToken, selfLink, warning); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupSettings.java new file mode 100644 index 000000000000..beadb70df0a4 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupSettings.java @@ -0,0 +1,339 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.AggregatedListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointsNetworkEndpointGroupsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.compute.v1.stub.NetworkEndpointGroupStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link NetworkEndpointGroupClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (https://www.googleapis.com/compute/v1/projects/) and default + * port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of attachNetworkEndpointsNetworkEndpointGroup to 30 seconds: + * + *

+ * 
+ * NetworkEndpointGroupSettings.Builder networkEndpointGroupSettingsBuilder =
+ *     NetworkEndpointGroupSettings.newBuilder();
+ * networkEndpointGroupSettingsBuilder.attachNetworkEndpointsNetworkEndpointGroupSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * NetworkEndpointGroupSettings networkEndpointGroupSettings = networkEndpointGroupSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class NetworkEndpointGroupSettings extends ClientSettings { + /** Returns the object with the settings used for calls to aggregatedListNetworkEndpointGroups. */ + public PagedCallSettings< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()) + .aggregatedListNetworkEndpointGroupsSettings(); + } + + /** + * Returns the object with the settings used for calls to + * attachNetworkEndpointsNetworkEndpointGroup. + */ + public UnaryCallSettings + attachNetworkEndpointsNetworkEndpointGroupSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()) + .attachNetworkEndpointsNetworkEndpointGroupSettings(); + } + + /** Returns the object with the settings used for calls to deleteNetworkEndpointGroup. */ + public UnaryCallSettings + deleteNetworkEndpointGroupSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()) + .deleteNetworkEndpointGroupSettings(); + } + + /** + * Returns the object with the settings used for calls to + * detachNetworkEndpointsNetworkEndpointGroup. + */ + public UnaryCallSettings + detachNetworkEndpointsNetworkEndpointGroupSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()) + .detachNetworkEndpointsNetworkEndpointGroupSettings(); + } + + /** Returns the object with the settings used for calls to getNetworkEndpointGroup. */ + public UnaryCallSettings + getNetworkEndpointGroupSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()).getNetworkEndpointGroupSettings(); + } + + /** Returns the object with the settings used for calls to insertNetworkEndpointGroup. */ + public UnaryCallSettings + insertNetworkEndpointGroupSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()) + .insertNetworkEndpointGroupSettings(); + } + + /** Returns the object with the settings used for calls to listNetworkEndpointGroups. */ + public PagedCallSettings< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListNetworkEndpointGroupsPagedResponse> + listNetworkEndpointGroupsSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()) + .listNetworkEndpointGroupsSettings(); + } + + /** + * Returns the object with the settings used for calls to + * listNetworkEndpointsNetworkEndpointGroups. + */ + public PagedCallSettings< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()) + .listNetworkEndpointsNetworkEndpointGroupsSettings(); + } + + /** + * Returns the object with the settings used for calls to testIamPermissionsNetworkEndpointGroup. + */ + public UnaryCallSettings< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupSettings() { + return ((NetworkEndpointGroupStubSettings) getStubSettings()) + .testIamPermissionsNetworkEndpointGroupSettings(); + } + + public static final NetworkEndpointGroupSettings create(NetworkEndpointGroupStubSettings stub) + throws IOException { + return new NetworkEndpointGroupSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return NetworkEndpointGroupStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return NetworkEndpointGroupStubSettings.getDefaultEndpoint(); + } + /** Returns the default service port. */ + public static int getDefaultServicePort() { + return NetworkEndpointGroupStubSettings.getDefaultServicePort(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return NetworkEndpointGroupStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return NetworkEndpointGroupStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return NetworkEndpointGroupStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return NetworkEndpointGroupStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return NetworkEndpointGroupStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected NetworkEndpointGroupSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for NetworkEndpointGroupSettings. */ + public static class Builder + extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(NetworkEndpointGroupStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(NetworkEndpointGroupStubSettings.newBuilder()); + } + + protected Builder(NetworkEndpointGroupSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(NetworkEndpointGroupStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public NetworkEndpointGroupStubSettings.Builder getStubSettingsBuilder() { + return ((NetworkEndpointGroupStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** + * Returns the builder for the settings used for calls to aggregatedListNetworkEndpointGroups. + */ + public PagedCallSettings.Builder< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsSettings() { + return getStubSettingsBuilder().aggregatedListNetworkEndpointGroupsSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * attachNetworkEndpointsNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().attachNetworkEndpointsNetworkEndpointGroupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + deleteNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().deleteNetworkEndpointGroupSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * detachNetworkEndpointsNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().detachNetworkEndpointsNetworkEndpointGroupSettings(); + } + + /** Returns the builder for the settings used for calls to getNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + getNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().getNetworkEndpointGroupSettings(); + } + + /** Returns the builder for the settings used for calls to insertNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + insertNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().insertNetworkEndpointGroupSettings(); + } + + /** Returns the builder for the settings used for calls to listNetworkEndpointGroups. */ + public PagedCallSettings.Builder< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListNetworkEndpointGroupsPagedResponse> + listNetworkEndpointGroupsSettings() { + return getStubSettingsBuilder().listNetworkEndpointGroupsSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * listNetworkEndpointsNetworkEndpointGroups. + */ + public PagedCallSettings.Builder< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsSettings() { + return getStubSettingsBuilder().listNetworkEndpointsNetworkEndpointGroupsSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * testIamPermissionsNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().testIamPermissionsNetworkEndpointGroupSettings(); + } + + @Override + public NetworkEndpointGroupSettings build() throws IOException { + return new NetworkEndpointGroupSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsAttachEndpointsRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsAttachEndpointsRequest.java new file mode 100644 index 000000000000..a9a3b443cd66 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsAttachEndpointsRequest.java @@ -0,0 +1,168 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class NetworkEndpointGroupsAttachEndpointsRequest implements ApiMessage { + private final List networkEndpoints; + + private NetworkEndpointGroupsAttachEndpointsRequest() { + this.networkEndpoints = null; + } + + private NetworkEndpointGroupsAttachEndpointsRequest(List networkEndpoints) { + this.networkEndpoints = networkEndpoints; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("networkEndpoints".equals(fieldName)) { + return networkEndpoints; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** The list of network endpoints to be attached. */ + public List getNetworkEndpointsList() { + return networkEndpoints; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointGroupsAttachEndpointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointGroupsAttachEndpointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointGroupsAttachEndpointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointGroupsAttachEndpointsRequest(); + } + + public static class Builder { + private List networkEndpoints; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointGroupsAttachEndpointsRequest other) { + if (other == NetworkEndpointGroupsAttachEndpointsRequest.getDefaultInstance()) return this; + if (other.getNetworkEndpointsList() != null) { + this.networkEndpoints = other.networkEndpoints; + } + return this; + } + + Builder(NetworkEndpointGroupsAttachEndpointsRequest source) { + this.networkEndpoints = source.networkEndpoints; + } + + /** The list of network endpoints to be attached. */ + public List getNetworkEndpointsList() { + return networkEndpoints; + } + + /** The list of network endpoints to be attached. */ + public Builder addAllNetworkEndpoints(List networkEndpoints) { + if (this.networkEndpoints == null) { + this.networkEndpoints = new LinkedList<>(); + } + this.networkEndpoints.addAll(networkEndpoints); + return this; + } + + /** The list of network endpoints to be attached. */ + public Builder addNetworkEndpoints(NetworkEndpoint networkEndpoints) { + if (this.networkEndpoints == null) { + this.networkEndpoints = new LinkedList<>(); + } + this.networkEndpoints.add(networkEndpoints); + return this; + } + + public NetworkEndpointGroupsAttachEndpointsRequest build() { + return new NetworkEndpointGroupsAttachEndpointsRequest(networkEndpoints); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllNetworkEndpoints(this.networkEndpoints); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointGroupsAttachEndpointsRequest{" + + "networkEndpoints=" + + networkEndpoints + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointGroupsAttachEndpointsRequest) { + NetworkEndpointGroupsAttachEndpointsRequest that = + (NetworkEndpointGroupsAttachEndpointsRequest) o; + return Objects.equals(this.networkEndpoints, that.getNetworkEndpointsList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(networkEndpoints); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsDetachEndpointsRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsDetachEndpointsRequest.java new file mode 100644 index 000000000000..06c3a71dce1c --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsDetachEndpointsRequest.java @@ -0,0 +1,168 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class NetworkEndpointGroupsDetachEndpointsRequest implements ApiMessage { + private final List networkEndpoints; + + private NetworkEndpointGroupsDetachEndpointsRequest() { + this.networkEndpoints = null; + } + + private NetworkEndpointGroupsDetachEndpointsRequest(List networkEndpoints) { + this.networkEndpoints = networkEndpoints; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("networkEndpoints".equals(fieldName)) { + return networkEndpoints; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** The list of network endpoints to be detached. */ + public List getNetworkEndpointsList() { + return networkEndpoints; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointGroupsDetachEndpointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointGroupsDetachEndpointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointGroupsDetachEndpointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointGroupsDetachEndpointsRequest(); + } + + public static class Builder { + private List networkEndpoints; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointGroupsDetachEndpointsRequest other) { + if (other == NetworkEndpointGroupsDetachEndpointsRequest.getDefaultInstance()) return this; + if (other.getNetworkEndpointsList() != null) { + this.networkEndpoints = other.networkEndpoints; + } + return this; + } + + Builder(NetworkEndpointGroupsDetachEndpointsRequest source) { + this.networkEndpoints = source.networkEndpoints; + } + + /** The list of network endpoints to be detached. */ + public List getNetworkEndpointsList() { + return networkEndpoints; + } + + /** The list of network endpoints to be detached. */ + public Builder addAllNetworkEndpoints(List networkEndpoints) { + if (this.networkEndpoints == null) { + this.networkEndpoints = new LinkedList<>(); + } + this.networkEndpoints.addAll(networkEndpoints); + return this; + } + + /** The list of network endpoints to be detached. */ + public Builder addNetworkEndpoints(NetworkEndpoint networkEndpoints) { + if (this.networkEndpoints == null) { + this.networkEndpoints = new LinkedList<>(); + } + this.networkEndpoints.add(networkEndpoints); + return this; + } + + public NetworkEndpointGroupsDetachEndpointsRequest build() { + return new NetworkEndpointGroupsDetachEndpointsRequest(networkEndpoints); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllNetworkEndpoints(this.networkEndpoints); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointGroupsDetachEndpointsRequest{" + + "networkEndpoints=" + + networkEndpoints + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointGroupsDetachEndpointsRequest) { + NetworkEndpointGroupsDetachEndpointsRequest that = + (NetworkEndpointGroupsDetachEndpointsRequest) o; + return Objects.equals(this.networkEndpoints, that.getNetworkEndpointsList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(networkEndpoints); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListEndpointsRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListEndpointsRequest.java new file mode 100644 index 000000000000..d48b850a4a49 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListEndpointsRequest.java @@ -0,0 +1,164 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class NetworkEndpointGroupsListEndpointsRequest implements ApiMessage { + private final String healthStatus; + + private NetworkEndpointGroupsListEndpointsRequest() { + this.healthStatus = null; + } + + private NetworkEndpointGroupsListEndpointsRequest(String healthStatus) { + this.healthStatus = healthStatus; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("healthStatus".equals(fieldName)) { + return healthStatus; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** + * Optional query parameter for showing the health status of each network endpoint. Valid options + * are SKIP or SHOW. If you don't specifiy this parameter, the health status of network endpoints + * will not be provided. + */ + public String getHealthStatus() { + return healthStatus; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointGroupsListEndpointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointGroupsListEndpointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointGroupsListEndpointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointGroupsListEndpointsRequest(); + } + + public static class Builder { + private String healthStatus; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointGroupsListEndpointsRequest other) { + if (other == NetworkEndpointGroupsListEndpointsRequest.getDefaultInstance()) return this; + if (other.getHealthStatus() != null) { + this.healthStatus = other.healthStatus; + } + return this; + } + + Builder(NetworkEndpointGroupsListEndpointsRequest source) { + this.healthStatus = source.healthStatus; + } + + /** + * Optional query parameter for showing the health status of each network endpoint. Valid + * options are SKIP or SHOW. If you don't specifiy this parameter, the health status of network + * endpoints will not be provided. + */ + public String getHealthStatus() { + return healthStatus; + } + + /** + * Optional query parameter for showing the health status of each network endpoint. Valid + * options are SKIP or SHOW. If you don't specifiy this parameter, the health status of network + * endpoints will not be provided. + */ + public Builder setHealthStatus(String healthStatus) { + this.healthStatus = healthStatus; + return this; + } + + public NetworkEndpointGroupsListEndpointsRequest build() { + return new NetworkEndpointGroupsListEndpointsRequest(healthStatus); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setHealthStatus(this.healthStatus); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointGroupsListEndpointsRequest{" + "healthStatus=" + healthStatus + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointGroupsListEndpointsRequest) { + NetworkEndpointGroupsListEndpointsRequest that = + (NetworkEndpointGroupsListEndpointsRequest) o; + return Objects.equals(this.healthStatus, that.getHealthStatus()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(healthStatus); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListNetworkEndpoints.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListNetworkEndpoints.java new file mode 100644 index 000000000000..4626e2cf44dd --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListNetworkEndpoints.java @@ -0,0 +1,329 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class NetworkEndpointGroupsListNetworkEndpoints implements ApiMessage { + private final String id; + private final List items; + private final String kind; + private final String nextPageToken; + private final Warning warning; + + private NetworkEndpointGroupsListNetworkEndpoints() { + this.id = null; + this.items = null; + this.kind = null; + this.nextPageToken = null; + this.warning = null; + } + + private NetworkEndpointGroupsListNetworkEndpoints( + String id, + List items, + String kind, + String nextPageToken, + Warning warning) { + this.id = id; + this.items = items; + this.kind = kind; + this.nextPageToken = nextPageToken; + this.warning = warning; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("id".equals(fieldName)) { + return id; + } + if ("items".equals(fieldName)) { + return items; + } + if ("kind".equals(fieldName)) { + return kind; + } + if ("nextPageToken".equals(fieldName)) { + return nextPageToken; + } + if ("warning".equals(fieldName)) { + return warning; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public String getId() { + return id; + } + + /** A list of NetworkEndpointWithHealthStatus resources. */ + public List getItemsList() { + return items; + } + + /** + * [Output Only] The resource type, which is always + * compute#networkEndpointGroupsListNetworkEndpoints for the list of network endpoints in the + * specified network endpoint group. + */ + public String getKind() { + return kind; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + /** [Output Only] Informational warning message. */ + public Warning getWarning() { + return warning; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointGroupsListNetworkEndpoints prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointGroupsListNetworkEndpoints getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointGroupsListNetworkEndpoints DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointGroupsListNetworkEndpoints(); + } + + public static class Builder { + private String id; + private List items; + private String kind; + private String nextPageToken; + private Warning warning; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointGroupsListNetworkEndpoints other) { + if (other == NetworkEndpointGroupsListNetworkEndpoints.getDefaultInstance()) return this; + if (other.getId() != null) { + this.id = other.id; + } + if (other.getItemsList() != null) { + this.items = other.items; + } + if (other.getKind() != null) { + this.kind = other.kind; + } + if (other.getNextPageToken() != null) { + this.nextPageToken = other.nextPageToken; + } + if (other.getWarning() != null) { + this.warning = other.warning; + } + return this; + } + + Builder(NetworkEndpointGroupsListNetworkEndpoints source) { + this.id = source.id; + this.items = source.items; + this.kind = source.kind; + this.nextPageToken = source.nextPageToken; + this.warning = source.warning; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public String getId() { + return id; + } + + /** [Output Only] Unique identifier for the resource; defined by the server. */ + public Builder setId(String id) { + this.id = id; + return this; + } + + /** A list of NetworkEndpointWithHealthStatus resources. */ + public List getItemsList() { + return items; + } + + /** A list of NetworkEndpointWithHealthStatus resources. */ + public Builder addAllItems(List items) { + if (this.items == null) { + this.items = new LinkedList<>(); + } + this.items.addAll(items); + return this; + } + + /** A list of NetworkEndpointWithHealthStatus resources. */ + public Builder addItems(NetworkEndpointWithHealthStatus items) { + if (this.items == null) { + this.items = new LinkedList<>(); + } + this.items.add(items); + return this; + } + + /** + * [Output Only] The resource type, which is always + * compute#networkEndpointGroupsListNetworkEndpoints for the list of network endpoints in the + * specified network endpoint group. + */ + public String getKind() { + return kind; + } + + /** + * [Output Only] The resource type, which is always + * compute#networkEndpointGroupsListNetworkEndpoints for the list of network endpoints in the + * specified network endpoint group. + */ + public Builder setKind(String kind) { + this.kind = kind; + return this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public Builder setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + /** [Output Only] Informational warning message. */ + public Warning getWarning() { + return warning; + } + + /** [Output Only] Informational warning message. */ + public Builder setWarning(Warning warning) { + this.warning = warning; + return this; + } + + public NetworkEndpointGroupsListNetworkEndpoints build() { + + return new NetworkEndpointGroupsListNetworkEndpoints(id, items, kind, nextPageToken, warning); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setId(this.id); + newBuilder.addAllItems(this.items); + newBuilder.setKind(this.kind); + newBuilder.setNextPageToken(this.nextPageToken); + newBuilder.setWarning(this.warning); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointGroupsListNetworkEndpoints{" + + "id=" + + id + + ", " + + "items=" + + items + + ", " + + "kind=" + + kind + + ", " + + "nextPageToken=" + + nextPageToken + + ", " + + "warning=" + + warning + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointGroupsListNetworkEndpoints) { + NetworkEndpointGroupsListNetworkEndpoints that = + (NetworkEndpointGroupsListNetworkEndpoints) o; + return Objects.equals(this.id, that.getId()) + && Objects.equals(this.items, that.getItemsList()) + && Objects.equals(this.kind, that.getKind()) + && Objects.equals(this.nextPageToken, that.getNextPageToken()) + && Objects.equals(this.warning, that.getWarning()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(id, items, kind, nextPageToken, warning); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsScopedList.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsScopedList.java new file mode 100644 index 000000000000..dc53fef9a3a5 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsScopedList.java @@ -0,0 +1,210 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class NetworkEndpointGroupsScopedList implements ApiMessage { + private final List networkEndpointGroups; + private final Warning warning; + + private NetworkEndpointGroupsScopedList() { + this.networkEndpointGroups = null; + this.warning = null; + } + + private NetworkEndpointGroupsScopedList( + List networkEndpointGroups, Warning warning) { + this.networkEndpointGroups = networkEndpointGroups; + this.warning = warning; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("networkEndpointGroups".equals(fieldName)) { + return networkEndpointGroups; + } + if ("warning".equals(fieldName)) { + return warning; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] The list of network endpoint groups that are contained in this scope. */ + public List getNetworkEndpointGroupsList() { + return networkEndpointGroups; + } + + /** + * [Output Only] An informational warning that replaces the list of network endpoint groups when + * the list is empty. + */ + public Warning getWarning() { + return warning; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointGroupsScopedList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointGroupsScopedList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointGroupsScopedList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointGroupsScopedList(); + } + + public static class Builder { + private List networkEndpointGroups; + private Warning warning; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointGroupsScopedList other) { + if (other == NetworkEndpointGroupsScopedList.getDefaultInstance()) return this; + if (other.getNetworkEndpointGroupsList() != null) { + this.networkEndpointGroups = other.networkEndpointGroups; + } + if (other.getWarning() != null) { + this.warning = other.warning; + } + return this; + } + + Builder(NetworkEndpointGroupsScopedList source) { + this.networkEndpointGroups = source.networkEndpointGroups; + this.warning = source.warning; + } + + /** [Output Only] The list of network endpoint groups that are contained in this scope. */ + public List getNetworkEndpointGroupsList() { + return networkEndpointGroups; + } + + /** [Output Only] The list of network endpoint groups that are contained in this scope. */ + public Builder addAllNetworkEndpointGroups(List networkEndpointGroups) { + if (this.networkEndpointGroups == null) { + this.networkEndpointGroups = new LinkedList<>(); + } + this.networkEndpointGroups.addAll(networkEndpointGroups); + return this; + } + + /** [Output Only] The list of network endpoint groups that are contained in this scope. */ + public Builder addNetworkEndpointGroups(NetworkEndpointGroup networkEndpointGroups) { + if (this.networkEndpointGroups == null) { + this.networkEndpointGroups = new LinkedList<>(); + } + this.networkEndpointGroups.add(networkEndpointGroups); + return this; + } + + /** + * [Output Only] An informational warning that replaces the list of network endpoint groups when + * the list is empty. + */ + public Warning getWarning() { + return warning; + } + + /** + * [Output Only] An informational warning that replaces the list of network endpoint groups when + * the list is empty. + */ + public Builder setWarning(Warning warning) { + this.warning = warning; + return this; + } + + public NetworkEndpointGroupsScopedList build() { + + return new NetworkEndpointGroupsScopedList(networkEndpointGroups, warning); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllNetworkEndpointGroups(this.networkEndpointGroups); + newBuilder.setWarning(this.warning); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointGroupsScopedList{" + + "networkEndpointGroups=" + + networkEndpointGroups + + ", " + + "warning=" + + warning + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointGroupsScopedList) { + NetworkEndpointGroupsScopedList that = (NetworkEndpointGroupsScopedList) o; + return Objects.equals(this.networkEndpointGroups, that.getNetworkEndpointGroupsList()) + && Objects.equals(this.warning, that.getWarning()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(networkEndpointGroups, warning); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointWithHealthStatus.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointWithHealthStatus.java new file mode 100644 index 000000000000..07b245ed00c0 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NetworkEndpointWithHealthStatus.java @@ -0,0 +1,201 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +public final class NetworkEndpointWithHealthStatus implements ApiMessage { + private final List healths; + private final NetworkEndpoint networkEndpoint; + + private NetworkEndpointWithHealthStatus() { + this.healths = null; + this.networkEndpoint = null; + } + + private NetworkEndpointWithHealthStatus( + List healths, NetworkEndpoint networkEndpoint) { + this.healths = healths; + this.networkEndpoint = networkEndpoint; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("healths".equals(fieldName)) { + return healths; + } + if ("networkEndpoint".equals(fieldName)) { + return networkEndpoint; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output only] The health status of network endpoint; */ + public List getHealthsList() { + return healths; + } + + /** [Output only] The network endpoint; */ + public NetworkEndpoint getNetworkEndpoint() { + return networkEndpoint; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NetworkEndpointWithHealthStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NetworkEndpointWithHealthStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NetworkEndpointWithHealthStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NetworkEndpointWithHealthStatus(); + } + + public static class Builder { + private List healths; + private NetworkEndpoint networkEndpoint; + + Builder() {} + + public Builder mergeFrom(NetworkEndpointWithHealthStatus other) { + if (other == NetworkEndpointWithHealthStatus.getDefaultInstance()) return this; + if (other.getHealthsList() != null) { + this.healths = other.healths; + } + if (other.getNetworkEndpoint() != null) { + this.networkEndpoint = other.networkEndpoint; + } + return this; + } + + Builder(NetworkEndpointWithHealthStatus source) { + this.healths = source.healths; + this.networkEndpoint = source.networkEndpoint; + } + + /** [Output only] The health status of network endpoint; */ + public List getHealthsList() { + return healths; + } + + /** [Output only] The health status of network endpoint; */ + public Builder addAllHealths(List healths) { + if (this.healths == null) { + this.healths = new LinkedList<>(); + } + this.healths.addAll(healths); + return this; + } + + /** [Output only] The health status of network endpoint; */ + public Builder addHealths(HealthStatusForNetworkEndpoint healths) { + if (this.healths == null) { + this.healths = new LinkedList<>(); + } + this.healths.add(healths); + return this; + } + + /** [Output only] The network endpoint; */ + public NetworkEndpoint getNetworkEndpoint() { + return networkEndpoint; + } + + /** [Output only] The network endpoint; */ + public Builder setNetworkEndpoint(NetworkEndpoint networkEndpoint) { + this.networkEndpoint = networkEndpoint; + return this; + } + + public NetworkEndpointWithHealthStatus build() { + + return new NetworkEndpointWithHealthStatus(healths, networkEndpoint); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllHealths(this.healths); + newBuilder.setNetworkEndpoint(this.networkEndpoint); + return newBuilder; + } + } + + @Override + public String toString() { + return "NetworkEndpointWithHealthStatus{" + + "healths=" + + healths + + ", " + + "networkEndpoint=" + + networkEndpoint + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NetworkEndpointWithHealthStatus) { + NetworkEndpointWithHealthStatus that = (NetworkEndpointWithHealthStatus) o; + return Objects.equals(this.healths, that.getHealthsList()) + && Objects.equals(this.networkEndpoint, that.getNetworkEndpoint()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(healths, networkEndpoint); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroup.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroup.java index 2b2d67c0dda1..4517e0a3bfb8 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroup.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroup.java @@ -24,7 +24,7 @@ @Generated("by GAPIC") @BetaApi -/** A NodeGroup resource. */ +/** A NodeGroup resource. (== resource_for beta.nodeGroups ==) (== resource_for v1.nodeGroups ==) */ public final class NodeGroup implements ApiMessage { private final String creationTimestamp; private final String description; diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java index 209d05f2442b..29d1d4f098fa 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java @@ -221,10 +221,10 @@ public final Operation addNodesNodeGroup( * *


    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   NodeGroupsAddNodesRequest nodeGroupsAddNodesRequestResource = NodeGroupsAddNodesRequest.newBuilder().build();
    *   AddNodesNodeGroupHttpRequest request = AddNodesNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .setNodeGroupsAddNodesRequestResource(nodeGroupsAddNodesRequestResource)
    *     .build();
    *   Operation response = nodeGroupClient.addNodesNodeGroup(request);
@@ -247,10 +247,10 @@ public final Operation addNodesNodeGroup(AddNodesNodeGroupHttpRequest request) {
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   NodeGroupsAddNodesRequest nodeGroupsAddNodesRequestResource = NodeGroupsAddNodesRequest.newBuilder().build();
    *   AddNodesNodeGroupHttpRequest request = AddNodesNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .setNodeGroupsAddNodesRequestResource(nodeGroupsAddNodesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = nodeGroupClient.addNodesNodeGroupCallable().futureCall(request);
@@ -327,9 +327,9 @@ public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(Stri
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeGroupsHttpRequest request = AggregatedListNodeGroupsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (NodeGroupsScopedList element : nodeGroupClient.aggregatedListNodeGroups(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -355,9 +355,9 @@ public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeGroupsHttpRequest request = AggregatedListNodeGroupsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListNodeGroupsPagedResponse> future = nodeGroupClient.aggregatedListNodeGroupsPagedCallable().futureCall(request);
    *   // Do something
@@ -383,9 +383,9 @@ public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeGroupsHttpRequest request = AggregatedListNodeGroupsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     NodeGroupAggregatedList response = nodeGroupClient.aggregatedListNodeGroupsCallable().call(request);
@@ -466,9 +466,9 @@ public final Operation deleteNodeGroup(String nodeGroup) {
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   DeleteNodeGroupHttpRequest request = DeleteNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .build();
    *   Operation response = nodeGroupClient.deleteNodeGroup(request);
    * }
@@ -490,9 +490,9 @@ public final Operation deleteNodeGroup(DeleteNodeGroupHttpRequest request) {
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   DeleteNodeGroupHttpRequest request = DeleteNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .build();
    *   ApiFuture<Operation> future = nodeGroupClient.deleteNodeGroupCallable().futureCall(request);
    *   // Do something
@@ -574,10 +574,10 @@ public final Operation deleteNodesNodeGroup(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   NodeGroupsDeleteNodesRequest nodeGroupsDeleteNodesRequestResource = NodeGroupsDeleteNodesRequest.newBuilder().build();
    *   DeleteNodesNodeGroupHttpRequest request = DeleteNodesNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .setNodeGroupsDeleteNodesRequestResource(nodeGroupsDeleteNodesRequestResource)
    *     .build();
    *   Operation response = nodeGroupClient.deleteNodesNodeGroup(request);
@@ -600,10 +600,10 @@ public final Operation deleteNodesNodeGroup(DeleteNodesNodeGroupHttpRequest requ
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   NodeGroupsDeleteNodesRequest nodeGroupsDeleteNodesRequestResource = NodeGroupsDeleteNodesRequest.newBuilder().build();
    *   DeleteNodesNodeGroupHttpRequest request = DeleteNodesNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .setNodeGroupsDeleteNodesRequestResource(nodeGroupsDeleteNodesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = nodeGroupClient.deleteNodesNodeGroupCallable().futureCall(request);
@@ -679,9 +679,9 @@ public final NodeGroup getNodeGroup(String nodeGroup) {
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   GetNodeGroupHttpRequest request = GetNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .build();
    *   NodeGroup response = nodeGroupClient.getNodeGroup(request);
    * }
@@ -704,9 +704,9 @@ public final NodeGroup getNodeGroup(GetNodeGroupHttpRequest request) {
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   GetNodeGroupHttpRequest request = GetNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .build();
    *   ApiFuture<NodeGroup> future = nodeGroupClient.getNodeGroupCallable().futureCall(request);
    *   // Do something
@@ -780,9 +780,9 @@ public final Policy getIamPolicyNodeGroup(String resource) {
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupResourceName resource = ProjectZoneNodeGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneNodeGroupResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   GetIamPolicyNodeGroupHttpRequest request = GetIamPolicyNodeGroupHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = nodeGroupClient.getIamPolicyNodeGroup(request);
    * }
@@ -805,9 +805,9 @@ public final Policy getIamPolicyNodeGroup(GetIamPolicyNodeGroupHttpRequest reque
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupResourceName resource = ProjectZoneNodeGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneNodeGroupResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   GetIamPolicyNodeGroupHttpRequest request = GetIamPolicyNodeGroupHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = nodeGroupClient.getIamPolicyNodeGroupCallable().futureCall(request);
    *   // Do something
@@ -838,7 +838,8 @@ public final Policy getIamPolicyNodeGroup(GetIamPolicyNodeGroupHttpRequest reque
    *
    * @param initialNodeCount Initial count of nodes in the node group.
    * @param zone The name of the zone for this request.
-   * @param nodeGroupResource A NodeGroup resource.
+   * @param nodeGroupResource A NodeGroup resource. (== resource_for beta.nodeGroups ==) (==
+   *     resource_for v1.nodeGroups ==)
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   @BetaApi
@@ -871,7 +872,8 @@ public final Operation insertNodeGroup(
    *
    * @param initialNodeCount Initial count of nodes in the node group.
    * @param zone The name of the zone for this request.
-   * @param nodeGroupResource A NodeGroup resource.
+   * @param nodeGroupResource A NodeGroup resource. (== resource_for beta.nodeGroups ==) (==
+   *     resource_for v1.nodeGroups ==)
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   @BetaApi
@@ -896,11 +898,11 @@ public final Operation insertNodeGroup(
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
    *   Integer initialNodeCount = 0;
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   NodeGroup nodeGroupResource = NodeGroup.newBuilder().build();
    *   InsertNodeGroupHttpRequest request = InsertNodeGroupHttpRequest.newBuilder()
    *     .setInitialNodeCount(initialNodeCount)
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setNodeGroupResource(nodeGroupResource)
    *     .build();
    *   Operation response = nodeGroupClient.insertNodeGroup(request);
@@ -924,11 +926,11 @@ public final Operation insertNodeGroup(InsertNodeGroupHttpRequest request) {
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
    *   Integer initialNodeCount = 0;
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   NodeGroup nodeGroupResource = NodeGroup.newBuilder().build();
    *   InsertNodeGroupHttpRequest request = InsertNodeGroupHttpRequest.newBuilder()
    *     .setInitialNodeCount(initialNodeCount)
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setNodeGroupResource(nodeGroupResource)
    *     .build();
    *   ApiFuture<Operation> future = nodeGroupClient.insertNodeGroupCallable().futureCall(request);
@@ -1005,9 +1007,9 @@ public final ListNodeGroupsPagedResponse listNodeGroups(String zone) {
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListNodeGroupsHttpRequest request = ListNodeGroupsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (NodeGroup element : nodeGroupClient.listNodeGroups(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -1032,9 +1034,9 @@ public final ListNodeGroupsPagedResponse listNodeGroups(ListNodeGroupsHttpReques
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListNodeGroupsHttpRequest request = ListNodeGroupsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListNodeGroupsPagedResponse> future = nodeGroupClient.listNodeGroupsPagedCallable().futureCall(request);
    *   // Do something
@@ -1059,9 +1061,9 @@ public final ListNodeGroupsPagedResponse listNodeGroups(ListNodeGroupsHttpReques
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListNodeGroupsHttpRequest request = ListNodeGroupsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     NodeGroupList response = nodeGroupClient.listNodeGroupsCallable().call(request);
@@ -1144,9 +1146,9 @@ public final ListNodesNodeGroupsPagedResponse listNodesNodeGroups(String nodeGro
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   ListNodesNodeGroupsHttpRequest request = ListNodesNodeGroupsHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .build();
    *   for (NodeGroupNode element : nodeGroupClient.listNodesNodeGroups(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -1171,9 +1173,9 @@ public final ListNodesNodeGroupsPagedResponse listNodesNodeGroups(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   ListNodesNodeGroupsHttpRequest request = ListNodesNodeGroupsHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .build();
    *   ApiFuture<ListNodesNodeGroupsPagedResponse> future = nodeGroupClient.listNodesNodeGroupsPagedCallable().futureCall(request);
    *   // Do something
@@ -1197,9 +1199,9 @@ public final ListNodesNodeGroupsPagedResponse listNodesNodeGroups(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   ListNodesNodeGroupsHttpRequest request = ListNodesNodeGroupsHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .build();
    *   while (true) {
    *     NodeGroupsListNodes response = nodeGroupClient.listNodesNodeGroupsCallable().call(request);
@@ -1291,10 +1293,10 @@ public final Policy setIamPolicyNodeGroup(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupResourceName resource = ProjectZoneNodeGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneNodeGroupResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyNodeGroupHttpRequest request = SetIamPolicyNodeGroupHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setZoneSetPolicyRequestResource(zoneSetPolicyRequestResource)
    *     .build();
    *   Policy response = nodeGroupClient.setIamPolicyNodeGroup(request);
@@ -1317,10 +1319,10 @@ public final Policy setIamPolicyNodeGroup(SetIamPolicyNodeGroupHttpRequest reque
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupResourceName resource = ProjectZoneNodeGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneNodeGroupResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   ZoneSetPolicyRequest zoneSetPolicyRequestResource = ZoneSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyNodeGroupHttpRequest request = SetIamPolicyNodeGroupHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setZoneSetPolicyRequestResource(zoneSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = nodeGroupClient.setIamPolicyNodeGroupCallable().futureCall(request);
@@ -1404,10 +1406,10 @@ public final Operation setNodeTemplateNodeGroup(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   NodeGroupsSetNodeTemplateRequest nodeGroupsSetNodeTemplateRequestResource = NodeGroupsSetNodeTemplateRequest.newBuilder().build();
    *   SetNodeTemplateNodeGroupHttpRequest request = SetNodeTemplateNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .setNodeGroupsSetNodeTemplateRequestResource(nodeGroupsSetNodeTemplateRequestResource)
    *     .build();
    *   Operation response = nodeGroupClient.setNodeTemplateNodeGroup(request);
@@ -1430,10 +1432,10 @@ public final Operation setNodeTemplateNodeGroup(SetNodeTemplateNodeGroupHttpRequ
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
    *   NodeGroupsSetNodeTemplateRequest nodeGroupsSetNodeTemplateRequestResource = NodeGroupsSetNodeTemplateRequest.newBuilder().build();
    *   SetNodeTemplateNodeGroupHttpRequest request = SetNodeTemplateNodeGroupHttpRequest.newBuilder()
-   *     .setNodeGroup(nodeGroup.toString())
+   *     .setNodeGroup(formattedNodeGroup)
    *     .setNodeGroupsSetNodeTemplateRequestResource(nodeGroupsSetNodeTemplateRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = nodeGroupClient.setNodeTemplateNodeGroupCallable().futureCall(request);
@@ -1517,10 +1519,10 @@ public final TestPermissionsResponse testIamPermissionsNodeGroup(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupResourceName resource = ProjectZoneNodeGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneNodeGroupResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsNodeGroupHttpRequest request = TestIamPermissionsNodeGroupHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = nodeGroupClient.testIamPermissionsNodeGroup(request);
@@ -1544,10 +1546,10 @@ public final TestPermissionsResponse testIamPermissionsNodeGroup(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
-   *   ProjectZoneNodeGroupResourceName resource = ProjectZoneNodeGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]");
+   *   String formattedResource = ProjectZoneNodeGroupResourceName.format("[PROJECT]", "[ZONE]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsNodeGroupHttpRequest request = TestIamPermissionsNodeGroupHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = nodeGroupClient.testIamPermissionsNodeGroupCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeTemplateClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeTemplateClient.java
index 88a3a7ec20d5..1cd225ece0bb 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeTemplateClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeTemplateClient.java
@@ -214,9 +214,9 @@ public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplate
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTemplatesHttpRequest request = AggregatedListNodeTemplatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (NodeTemplatesScopedList element : nodeTemplateClient.aggregatedListNodeTemplates(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -241,9 +241,9 @@ public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplate
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTemplatesHttpRequest request = AggregatedListNodeTemplatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListNodeTemplatesPagedResponse> future = nodeTemplateClient.aggregatedListNodeTemplatesPagedCallable().futureCall(request);
    *   // Do something
@@ -268,9 +268,9 @@ public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplate
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTemplatesHttpRequest request = AggregatedListNodeTemplatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     NodeTemplateAggregatedList response = nodeTemplateClient.aggregatedListNodeTemplatesCallable().call(request);
@@ -351,9 +351,9 @@ public final Operation deleteNodeTemplate(String nodeTemplate) {
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateName nodeTemplate = ProjectRegionNodeTemplateName.of("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]");
+   *   String formattedNodeTemplate = ProjectRegionNodeTemplateName.format("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]");
    *   DeleteNodeTemplateHttpRequest request = DeleteNodeTemplateHttpRequest.newBuilder()
-   *     .setNodeTemplate(nodeTemplate.toString())
+   *     .setNodeTemplate(formattedNodeTemplate)
    *     .build();
    *   Operation response = nodeTemplateClient.deleteNodeTemplate(request);
    * }
@@ -375,9 +375,9 @@ public final Operation deleteNodeTemplate(DeleteNodeTemplateHttpRequest request)
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateName nodeTemplate = ProjectRegionNodeTemplateName.of("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]");
+   *   String formattedNodeTemplate = ProjectRegionNodeTemplateName.format("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]");
    *   DeleteNodeTemplateHttpRequest request = DeleteNodeTemplateHttpRequest.newBuilder()
-   *     .setNodeTemplate(nodeTemplate.toString())
+   *     .setNodeTemplate(formattedNodeTemplate)
    *     .build();
    *   ApiFuture<Operation> future = nodeTemplateClient.deleteNodeTemplateCallable().futureCall(request);
    *   // Do something
@@ -452,9 +452,9 @@ public final NodeTemplate getNodeTemplate(String nodeTemplate) {
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateName nodeTemplate = ProjectRegionNodeTemplateName.of("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]");
+   *   String formattedNodeTemplate = ProjectRegionNodeTemplateName.format("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]");
    *   GetNodeTemplateHttpRequest request = GetNodeTemplateHttpRequest.newBuilder()
-   *     .setNodeTemplate(nodeTemplate.toString())
+   *     .setNodeTemplate(formattedNodeTemplate)
    *     .build();
    *   NodeTemplate response = nodeTemplateClient.getNodeTemplate(request);
    * }
@@ -477,9 +477,9 @@ public final NodeTemplate getNodeTemplate(GetNodeTemplateHttpRequest request) {
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateName nodeTemplate = ProjectRegionNodeTemplateName.of("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]");
+   *   String formattedNodeTemplate = ProjectRegionNodeTemplateName.format("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]");
    *   GetNodeTemplateHttpRequest request = GetNodeTemplateHttpRequest.newBuilder()
-   *     .setNodeTemplate(nodeTemplate.toString())
+   *     .setNodeTemplate(formattedNodeTemplate)
    *     .build();
    *   ApiFuture<NodeTemplate> future = nodeTemplateClient.getNodeTemplateCallable().futureCall(request);
    *   // Do something
@@ -553,9 +553,9 @@ public final Policy getIamPolicyNodeTemplate(String resource) {
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateResourceName resource = ProjectRegionNodeTemplateResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionNodeTemplateResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   GetIamPolicyNodeTemplateHttpRequest request = GetIamPolicyNodeTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = nodeTemplateClient.getIamPolicyNodeTemplate(request);
    * }
@@ -578,9 +578,9 @@ public final Policy getIamPolicyNodeTemplate(GetIamPolicyNodeTemplateHttpRequest
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateResourceName resource = ProjectRegionNodeTemplateResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionNodeTemplateResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   GetIamPolicyNodeTemplateHttpRequest request = GetIamPolicyNodeTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = nodeTemplateClient.getIamPolicyNodeTemplateCallable().futureCall(request);
    *   // Do something
@@ -664,10 +664,10 @@ public final Operation insertNodeTemplate(String region, NodeTemplate nodeTempla
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   NodeTemplate nodeTemplateResource = NodeTemplate.newBuilder().build();
    *   InsertNodeTemplateHttpRequest request = InsertNodeTemplateHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setNodeTemplateResource(nodeTemplateResource)
    *     .build();
    *   Operation response = nodeTemplateClient.insertNodeTemplate(request);
@@ -691,10 +691,10 @@ public final Operation insertNodeTemplate(InsertNodeTemplateHttpRequest request)
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   NodeTemplate nodeTemplateResource = NodeTemplate.newBuilder().build();
    *   InsertNodeTemplateHttpRequest request = InsertNodeTemplateHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setNodeTemplateResource(nodeTemplateResource)
    *     .build();
    *   ApiFuture<Operation> future = nodeTemplateClient.insertNodeTemplateCallable().futureCall(request);
@@ -769,9 +769,9 @@ public final ListNodeTemplatesPagedResponse listNodeTemplates(String region) {
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListNodeTemplatesHttpRequest request = ListNodeTemplatesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (NodeTemplate element : nodeTemplateClient.listNodeTemplates(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -796,9 +796,9 @@ public final ListNodeTemplatesPagedResponse listNodeTemplates(
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListNodeTemplatesHttpRequest request = ListNodeTemplatesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListNodeTemplatesPagedResponse> future = nodeTemplateClient.listNodeTemplatesPagedCallable().futureCall(request);
    *   // Do something
@@ -822,9 +822,9 @@ public final ListNodeTemplatesPagedResponse listNodeTemplates(
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListNodeTemplatesHttpRequest request = ListNodeTemplatesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     NodeTemplateList response = nodeTemplateClient.listNodeTemplatesCallable().call(request);
@@ -916,10 +916,10 @@ public final Policy setIamPolicyNodeTemplate(
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateResourceName resource = ProjectRegionNodeTemplateResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionNodeTemplateResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   RegionSetPolicyRequest regionSetPolicyRequestResource = RegionSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyNodeTemplateHttpRequest request = SetIamPolicyNodeTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
    *     .build();
    *   Policy response = nodeTemplateClient.setIamPolicyNodeTemplate(request);
@@ -942,10 +942,10 @@ public final Policy setIamPolicyNodeTemplate(SetIamPolicyNodeTemplateHttpRequest
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateResourceName resource = ProjectRegionNodeTemplateResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionNodeTemplateResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   RegionSetPolicyRequest regionSetPolicyRequestResource = RegionSetPolicyRequest.newBuilder().build();
    *   SetIamPolicyNodeTemplateHttpRequest request = SetIamPolicyNodeTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = nodeTemplateClient.setIamPolicyNodeTemplateCallable().futureCall(request);
@@ -1029,10 +1029,10 @@ public final TestPermissionsResponse testIamPermissionsNodeTemplate(
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateResourceName resource = ProjectRegionNodeTemplateResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionNodeTemplateResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsNodeTemplateHttpRequest request = TestIamPermissionsNodeTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = nodeTemplateClient.testIamPermissionsNodeTemplate(request);
@@ -1056,10 +1056,10 @@ public final TestPermissionsResponse testIamPermissionsNodeTemplate(
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
-   *   ProjectRegionNodeTemplateResourceName resource = ProjectRegionNodeTemplateResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionNodeTemplateResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsNodeTemplateHttpRequest request = TestIamPermissionsNodeTemplateHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = nodeTemplateClient.testIamPermissionsNodeTemplateCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeTypeClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeTypeClient.java
index 47c0fca39745..89fc1be352b1 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeTypeClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeTypeClient.java
@@ -211,9 +211,9 @@ public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(String
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTypesHttpRequest request = AggregatedListNodeTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (NodeTypesScopedList element : nodeTypeClient.aggregatedListNodeTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -238,9 +238,9 @@ public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTypesHttpRequest request = AggregatedListNodeTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListNodeTypesPagedResponse> future = nodeTypeClient.aggregatedListNodeTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -265,9 +265,9 @@ public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTypesHttpRequest request = AggregatedListNodeTypesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     NodeTypeAggregatedList response = nodeTypeClient.aggregatedListNodeTypesCallable().call(request);
@@ -351,9 +351,9 @@ public final NodeType getNodeType(String nodeType) {
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
-   *   ProjectZoneNodeTypeName nodeType = ProjectZoneNodeTypeName.of("[PROJECT]", "[ZONE]", "[NODE_TYPE]");
+   *   String formattedNodeType = ProjectZoneNodeTypeName.format("[PROJECT]", "[ZONE]", "[NODE_TYPE]");
    *   GetNodeTypeHttpRequest request = GetNodeTypeHttpRequest.newBuilder()
-   *     .setNodeType(nodeType.toString())
+   *     .setNodeType(formattedNodeType)
    *     .build();
    *   NodeType response = nodeTypeClient.getNodeType(request);
    * }
@@ -376,9 +376,9 @@ public final NodeType getNodeType(GetNodeTypeHttpRequest request) {
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
-   *   ProjectZoneNodeTypeName nodeType = ProjectZoneNodeTypeName.of("[PROJECT]", "[ZONE]", "[NODE_TYPE]");
+   *   String formattedNodeType = ProjectZoneNodeTypeName.format("[PROJECT]", "[ZONE]", "[NODE_TYPE]");
    *   GetNodeTypeHttpRequest request = GetNodeTypeHttpRequest.newBuilder()
-   *     .setNodeType(nodeType.toString())
+   *     .setNodeType(formattedNodeType)
    *     .build();
    *   ApiFuture<NodeType> future = nodeTypeClient.getNodeTypeCallable().futureCall(request);
    *   // Do something
@@ -450,9 +450,9 @@ public final ListNodeTypesPagedResponse listNodeTypes(String zone) {
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListNodeTypesHttpRequest request = ListNodeTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (NodeType element : nodeTypeClient.listNodeTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -476,9 +476,9 @@ public final ListNodeTypesPagedResponse listNodeTypes(ListNodeTypesHttpRequest r
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListNodeTypesHttpRequest request = ListNodeTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListNodeTypesPagedResponse> future = nodeTypeClient.listNodeTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -502,9 +502,9 @@ public final ListNodeTypesPagedResponse listNodeTypes(ListNodeTypesHttpRequest r
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListNodeTypesHttpRequest request = ListNodeTypesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     NodeTypeList response = nodeTypeClient.listNodeTypesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectClient.java
index ca220297e908..164bebd504bb 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectClient.java
@@ -209,9 +209,9 @@ public final Operation disableXpnHostProject(String project) {
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   DisableXpnHostProjectHttpRequest request = DisableXpnHostProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   Operation response = projectClient.disableXpnHostProject(request);
    * }
@@ -233,9 +233,9 @@ public final Operation disableXpnHostProject(DisableXpnHostProjectHttpRequest re
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   DisableXpnHostProjectHttpRequest request = DisableXpnHostProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.disableXpnHostProjectCallable().futureCall(request);
    *   // Do something
@@ -318,10 +318,10 @@ public final Operation disableXpnResourceProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = ProjectsDisableXpnResourceRequest.newBuilder().build();
    *   DisableXpnResourceProjectHttpRequest request = DisableXpnResourceProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsDisableXpnResourceRequestResource(projectsDisableXpnResourceRequestResource)
    *     .build();
    *   Operation response = projectClient.disableXpnResourceProject(request);
@@ -344,10 +344,10 @@ public final Operation disableXpnResourceProject(DisableXpnResourceProjectHttpRe
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = ProjectsDisableXpnResourceRequest.newBuilder().build();
    *   DisableXpnResourceProjectHttpRequest request = DisableXpnResourceProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsDisableXpnResourceRequestResource(projectsDisableXpnResourceRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.disableXpnResourceProjectCallable().futureCall(request);
@@ -420,9 +420,9 @@ public final Operation enableXpnHostProject(String project) {
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   EnableXpnHostProjectHttpRequest request = EnableXpnHostProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   Operation response = projectClient.enableXpnHostProject(request);
    * }
@@ -444,9 +444,9 @@ public final Operation enableXpnHostProject(EnableXpnHostProjectHttpRequest requ
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   EnableXpnHostProjectHttpRequest request = EnableXpnHostProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.enableXpnHostProjectCallable().futureCall(request);
    *   // Do something
@@ -532,10 +532,10 @@ public final Operation enableXpnResourceProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = ProjectsEnableXpnResourceRequest.newBuilder().build();
    *   EnableXpnResourceProjectHttpRequest request = EnableXpnResourceProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsEnableXpnResourceRequestResource(projectsEnableXpnResourceRequestResource)
    *     .build();
    *   Operation response = projectClient.enableXpnResourceProject(request);
@@ -559,10 +559,10 @@ public final Operation enableXpnResourceProject(EnableXpnResourceProjectHttpRequ
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = ProjectsEnableXpnResourceRequest.newBuilder().build();
    *   EnableXpnResourceProjectHttpRequest request = EnableXpnResourceProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsEnableXpnResourceRequestResource(projectsEnableXpnResourceRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.enableXpnResourceProjectCallable().futureCall(request);
@@ -634,9 +634,9 @@ public final Project getProject(String project) {
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   GetProjectHttpRequest request = GetProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   Project response = projectClient.getProject(request);
    * }
@@ -658,9 +658,9 @@ public final Project getProject(GetProjectHttpRequest request) {
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   GetProjectHttpRequest request = GetProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<Project> future = projectClient.getProjectCallable().futureCall(request);
    *   // Do something
@@ -731,9 +731,9 @@ public final Project getXpnHostProject(String project) {
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   GetXpnHostProjectHttpRequest request = GetXpnHostProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   Project response = projectClient.getXpnHostProject(request);
    * }
@@ -755,9 +755,9 @@ public final Project getXpnHostProject(GetXpnHostProjectHttpRequest request) {
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   GetXpnHostProjectHttpRequest request = GetXpnHostProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<Project> future = projectClient.getXpnHostProjectCallable().futureCall(request);
    *   // Do something
@@ -830,9 +830,9 @@ public final GetXpnResourcesProjectsPagedResponse getXpnResourcesProjects(String
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   GetXpnResourcesProjectsHttpRequest request = GetXpnResourcesProjectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (XpnResourceId element : projectClient.getXpnResourcesProjects(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -857,9 +857,9 @@ public final GetXpnResourcesProjectsPagedResponse getXpnResourcesProjects(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   GetXpnResourcesProjectsHttpRequest request = GetXpnResourcesProjectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<GetXpnResourcesProjectsPagedResponse> future = projectClient.getXpnResourcesProjectsPagedCallable().futureCall(request);
    *   // Do something
@@ -884,9 +884,9 @@ public final GetXpnResourcesProjectsPagedResponse getXpnResourcesProjects(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   GetXpnResourcesProjectsHttpRequest request = GetXpnResourcesProjectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     ProjectsGetXpnResources response = projectClient.getXpnResourcesProjectsCallable().call(request);
@@ -979,10 +979,10 @@ public final ListXpnHostsProjectsPagedResponse listXpnHostsProjects(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource = ProjectsListXpnHostsRequest.newBuilder().build();
    *   ListXpnHostsProjectsHttpRequest request = ListXpnHostsProjectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsListXpnHostsRequestResource(projectsListXpnHostsRequestResource)
    *     .build();
    *   for (Project element : projectClient.listXpnHostsProjects(request).iterateAll()) {
@@ -1008,10 +1008,10 @@ public final ListXpnHostsProjectsPagedResponse listXpnHostsProjects(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource = ProjectsListXpnHostsRequest.newBuilder().build();
    *   ListXpnHostsProjectsHttpRequest request = ListXpnHostsProjectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsListXpnHostsRequestResource(projectsListXpnHostsRequestResource)
    *     .build();
    *   ApiFuture<ListXpnHostsProjectsPagedResponse> future = projectClient.listXpnHostsProjectsPagedCallable().futureCall(request);
@@ -1036,10 +1036,10 @@ public final ListXpnHostsProjectsPagedResponse listXpnHostsProjects(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource = ProjectsListXpnHostsRequest.newBuilder().build();
    *   ListXpnHostsProjectsHttpRequest request = ListXpnHostsProjectsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsListXpnHostsRequestResource(projectsListXpnHostsRequestResource)
    *     .build();
    *   while (true) {
@@ -1130,10 +1130,10 @@ public final Operation moveDiskProject(String project, DiskMoveRequest diskMoveR
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   DiskMoveRequest diskMoveRequestResource = DiskMoveRequest.newBuilder().build();
    *   MoveDiskProjectHttpRequest request = MoveDiskProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setDiskMoveRequestResource(diskMoveRequestResource)
    *     .build();
    *   Operation response = projectClient.moveDiskProject(request);
@@ -1156,10 +1156,10 @@ public final Operation moveDiskProject(MoveDiskProjectHttpRequest request) {
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   DiskMoveRequest diskMoveRequestResource = DiskMoveRequest.newBuilder().build();
    *   MoveDiskProjectHttpRequest request = MoveDiskProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setDiskMoveRequestResource(diskMoveRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.moveDiskProjectCallable().futureCall(request);
@@ -1241,10 +1241,10 @@ public final Operation moveInstanceProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   InstanceMoveRequest instanceMoveRequestResource = InstanceMoveRequest.newBuilder().build();
    *   MoveInstanceProjectHttpRequest request = MoveInstanceProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setInstanceMoveRequestResource(instanceMoveRequestResource)
    *     .build();
    *   Operation response = projectClient.moveInstanceProject(request);
@@ -1267,10 +1267,10 @@ public final Operation moveInstanceProject(MoveInstanceProjectHttpRequest reques
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   InstanceMoveRequest instanceMoveRequestResource = InstanceMoveRequest.newBuilder().build();
    *   MoveInstanceProjectHttpRequest request = MoveInstanceProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setInstanceMoveRequestResource(instanceMoveRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.moveInstanceProjectCallable().futureCall(request);
@@ -1356,10 +1356,10 @@ public final Operation setCommonInstanceMetadataProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Metadata metadataResource = Metadata.newBuilder().build();
    *   SetCommonInstanceMetadataProjectHttpRequest request = SetCommonInstanceMetadataProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setMetadataResource(metadataResource)
    *     .build();
    *   Operation response = projectClient.setCommonInstanceMetadataProject(request);
@@ -1384,10 +1384,10 @@ public final Operation setCommonInstanceMetadataProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Metadata metadataResource = Metadata.newBuilder().build();
    *   SetCommonInstanceMetadataProjectHttpRequest request = SetCommonInstanceMetadataProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setMetadataResource(metadataResource)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.setCommonInstanceMetadataProjectCallable().futureCall(request);
@@ -1477,10 +1477,10 @@ public final Operation setDefaultNetworkTierProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = ProjectsSetDefaultNetworkTierRequest.newBuilder().build();
    *   SetDefaultNetworkTierProjectHttpRequest request = SetDefaultNetworkTierProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsSetDefaultNetworkTierRequestResource(projectsSetDefaultNetworkTierRequestResource)
    *     .build();
    *   Operation response = projectClient.setDefaultNetworkTierProject(request);
@@ -1505,10 +1505,10 @@ public final Operation setDefaultNetworkTierProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = ProjectsSetDefaultNetworkTierRequest.newBuilder().build();
    *   SetDefaultNetworkTierProjectHttpRequest request = SetDefaultNetworkTierProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setProjectsSetDefaultNetworkTierRequestResource(projectsSetDefaultNetworkTierRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.setDefaultNetworkTierProjectCallable().futureCall(request);
@@ -1596,10 +1596,10 @@ public final Operation setUsageExportBucketProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   UsageExportLocation usageExportLocationResource = UsageExportLocation.newBuilder().build();
    *   SetUsageExportBucketProjectHttpRequest request = SetUsageExportBucketProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setUsageExportLocationResource(usageExportLocationResource)
    *     .build();
    *   Operation response = projectClient.setUsageExportBucketProject(request);
@@ -1624,10 +1624,10 @@ public final Operation setUsageExportBucketProject(
    *
    * 

    * try (ProjectClient projectClient = ProjectClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   UsageExportLocation usageExportLocationResource = UsageExportLocation.newBuilder().build();
    *   SetUsageExportBucketProjectHttpRequest request = SetUsageExportBucketProjectHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setUsageExportLocationResource(usageExportLocationResource)
    *     .build();
    *   ApiFuture<Operation> future = projectClient.setUsageExportBucketProjectCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectZoneNetworkEndpointGroupName.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectZoneNetworkEndpointGroupName.java
new file mode 100644
index 000000000000..06bedd52aa4f
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectZoneNetworkEndpointGroupName.java
@@ -0,0 +1,201 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.api.resourcenames.ResourceNameFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import java.util.Objects;
+import javax.annotation.Generated;
+
+@Generated("by GAPIC")
+@BetaApi
+public final class ProjectZoneNetworkEndpointGroupName implements ResourceName {
+  private final String networkEndpointGroup;
+  private final String project;
+  private final String zone;
+  private static final PathTemplate PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding(
+          "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}");
+
+  public static final String SERVICE_ADDRESS = "https://www.googleapis.com/compute/v1/projects/";
+
+  private volatile Map fieldValuesMap;
+
+  public static Builder newBuilder() {
+    return new Builder();
+  }
+
+  public Builder toBuilder() {
+    return new Builder(this);
+  }
+
+  private ProjectZoneNetworkEndpointGroupName(Builder builder) {
+    networkEndpointGroup = Preconditions.checkNotNull(builder.getNetworkEndpointGroup());
+    project = Preconditions.checkNotNull(builder.getProject());
+    zone = Preconditions.checkNotNull(builder.getZone());
+  }
+
+  public static ProjectZoneNetworkEndpointGroupName of(
+      String networkEndpointGroup, String project, String zone) {
+    return newBuilder()
+        .setNetworkEndpointGroup(networkEndpointGroup)
+        .setProject(project)
+        .setZone(zone)
+        .build();
+  }
+
+  public static String format(String networkEndpointGroup, String project, String zone) {
+    return of(networkEndpointGroup, project, zone).toString();
+  }
+
+  public String getNetworkEndpointGroup() {
+    return networkEndpointGroup;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  public String getZone() {
+    return zone;
+  }
+
+  @Override
+  public Map getFieldValuesMap() {
+    if (fieldValuesMap == null) {
+      synchronized (this) {
+        if (fieldValuesMap == null) {
+          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
+          fieldMapBuilder.put("networkEndpointGroup", networkEndpointGroup);
+          fieldMapBuilder.put("project", project);
+          fieldMapBuilder.put("zone", zone);
+          fieldValuesMap = fieldMapBuilder.build();
+        }
+      }
+    }
+    return fieldValuesMap;
+  }
+
+  public String getFieldValue(String fieldName) {
+    return getFieldValuesMap().get(fieldName);
+  }
+
+  public static ResourceNameFactory newFactory() {
+    return new ResourceNameFactory() {
+      public ProjectZoneNetworkEndpointGroupName parse(String formattedString) {
+        return ProjectZoneNetworkEndpointGroupName.parse(formattedString);
+      }
+    };
+  }
+
+  public static ProjectZoneNetworkEndpointGroupName parse(String formattedString) {
+    String resourcePath = formattedString;
+    if (formattedString.startsWith(SERVICE_ADDRESS)) {
+      resourcePath = formattedString.substring(SERVICE_ADDRESS.length());
+    }
+    Map matchMap =
+        PATH_TEMPLATE.validatedMatch(
+            resourcePath,
+            "ProjectZoneNetworkEndpointGroupName.parse: formattedString not in valid format");
+    return of(matchMap.get("networkEndpointGroup"), matchMap.get("project"), matchMap.get("zone"));
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    String resourcePath = formattedString;
+    if (formattedString.startsWith(SERVICE_ADDRESS)) {
+      resourcePath = formattedString.substring(SERVICE_ADDRESS.length());
+    }
+    return PATH_TEMPLATE.matches(resourcePath);
+  }
+
+  public static class Builder {
+    private String networkEndpointGroup;
+    private String project;
+    private String zone;
+
+    public String getNetworkEndpointGroup() {
+      return networkEndpointGroup;
+    }
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getZone() {
+      return zone;
+    }
+
+    public Builder setNetworkEndpointGroup(String networkEndpointGroup) {
+      this.networkEndpointGroup = networkEndpointGroup;
+      return this;
+    }
+
+    public Builder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public Builder setZone(String zone) {
+      this.zone = zone;
+      return this;
+    }
+
+    private Builder() {}
+
+    public Builder(ProjectZoneNetworkEndpointGroupName projectZoneNetworkEndpointGroupName) {
+      networkEndpointGroup = projectZoneNetworkEndpointGroupName.networkEndpointGroup;
+      project = projectZoneNetworkEndpointGroupName.project;
+      zone = projectZoneNetworkEndpointGroupName.zone;
+    }
+
+    public ProjectZoneNetworkEndpointGroupName build() {
+      return new ProjectZoneNetworkEndpointGroupName(this);
+    }
+  }
+
+  @Override
+  public String toString() {
+    return SERVICE_ADDRESS
+        + PATH_TEMPLATE.instantiate(
+            "networkEndpointGroup", networkEndpointGroup,
+            "project", project,
+            "zone", zone);
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof ProjectZoneNetworkEndpointGroupName) {
+      ProjectZoneNetworkEndpointGroupName that = (ProjectZoneNetworkEndpointGroupName) o;
+      return Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup())
+          && Objects.equals(this.project, that.getProject())
+          && Objects.equals(this.zone, that.getZone());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(networkEndpointGroup, project, zone);
+  }
+}
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectZoneNetworkEndpointGroupResourceName.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectZoneNetworkEndpointGroupResourceName.java
new file mode 100644
index 000000000000..e373f0a82b64
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectZoneNetworkEndpointGroupResourceName.java
@@ -0,0 +1,199 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.api.resourcenames.ResourceNameFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import java.util.Objects;
+import javax.annotation.Generated;
+
+@Generated("by GAPIC")
+@BetaApi
+public final class ProjectZoneNetworkEndpointGroupResourceName implements ResourceName {
+  private final String project;
+  private final String resource;
+  private final String zone;
+  private static final PathTemplate PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding(
+          "{project}/zones/{zone}/networkEndpointGroups/{resource}");
+
+  public static final String SERVICE_ADDRESS = "https://www.googleapis.com/compute/v1/projects/";
+
+  private volatile Map fieldValuesMap;
+
+  public static Builder newBuilder() {
+    return new Builder();
+  }
+
+  public Builder toBuilder() {
+    return new Builder(this);
+  }
+
+  private ProjectZoneNetworkEndpointGroupResourceName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    resource = Preconditions.checkNotNull(builder.getResource());
+    zone = Preconditions.checkNotNull(builder.getZone());
+  }
+
+  public static ProjectZoneNetworkEndpointGroupResourceName of(
+      String project, String resource, String zone) {
+    return newBuilder().setProject(project).setResource(resource).setZone(zone).build();
+  }
+
+  public static String format(String project, String resource, String zone) {
+    return of(project, resource, zone).toString();
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  public String getResource() {
+    return resource;
+  }
+
+  public String getZone() {
+    return zone;
+  }
+
+  @Override
+  public Map getFieldValuesMap() {
+    if (fieldValuesMap == null) {
+      synchronized (this) {
+        if (fieldValuesMap == null) {
+          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
+          fieldMapBuilder.put("project", project);
+          fieldMapBuilder.put("resource", resource);
+          fieldMapBuilder.put("zone", zone);
+          fieldValuesMap = fieldMapBuilder.build();
+        }
+      }
+    }
+    return fieldValuesMap;
+  }
+
+  public String getFieldValue(String fieldName) {
+    return getFieldValuesMap().get(fieldName);
+  }
+
+  public static ResourceNameFactory newFactory() {
+    return new ResourceNameFactory() {
+      public ProjectZoneNetworkEndpointGroupResourceName parse(String formattedString) {
+        return ProjectZoneNetworkEndpointGroupResourceName.parse(formattedString);
+      }
+    };
+  }
+
+  public static ProjectZoneNetworkEndpointGroupResourceName parse(String formattedString) {
+    String resourcePath = formattedString;
+    if (formattedString.startsWith(SERVICE_ADDRESS)) {
+      resourcePath = formattedString.substring(SERVICE_ADDRESS.length());
+    }
+    Map matchMap =
+        PATH_TEMPLATE.validatedMatch(
+            resourcePath,
+            "ProjectZoneNetworkEndpointGroupResourceName.parse: formattedString not in valid format");
+    return of(matchMap.get("project"), matchMap.get("resource"), matchMap.get("zone"));
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    String resourcePath = formattedString;
+    if (formattedString.startsWith(SERVICE_ADDRESS)) {
+      resourcePath = formattedString.substring(SERVICE_ADDRESS.length());
+    }
+    return PATH_TEMPLATE.matches(resourcePath);
+  }
+
+  public static class Builder {
+    private String project;
+    private String resource;
+    private String zone;
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getResource() {
+      return resource;
+    }
+
+    public String getZone() {
+      return zone;
+    }
+
+    public Builder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public Builder setResource(String resource) {
+      this.resource = resource;
+      return this;
+    }
+
+    public Builder setZone(String zone) {
+      this.zone = zone;
+      return this;
+    }
+
+    private Builder() {}
+
+    public Builder(
+        ProjectZoneNetworkEndpointGroupResourceName projectZoneNetworkEndpointGroupResourceName) {
+      project = projectZoneNetworkEndpointGroupResourceName.project;
+      resource = projectZoneNetworkEndpointGroupResourceName.resource;
+      zone = projectZoneNetworkEndpointGroupResourceName.zone;
+    }
+
+    public ProjectZoneNetworkEndpointGroupResourceName build() {
+      return new ProjectZoneNetworkEndpointGroupResourceName(this);
+    }
+  }
+
+  @Override
+  public String toString() {
+    return SERVICE_ADDRESS
+        + PATH_TEMPLATE.instantiate(
+            "project", project,
+            "resource", resource,
+            "zone", zone);
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof ProjectZoneNetworkEndpointGroupResourceName) {
+      ProjectZoneNetworkEndpointGroupResourceName that =
+          (ProjectZoneNetworkEndpointGroupResourceName) o;
+      return Objects.equals(this.project, that.getProject())
+          && Objects.equals(this.resource, that.getResource())
+          && Objects.equals(this.zone, that.getZone());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(project, resource, zone);
+  }
+}
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerClient.java
index 8d1a1e8437b4..63685b16e26f 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerClient.java
@@ -212,9 +212,9 @@ public final Operation deleteRegionAutoscaler(String autoscaler) {
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionAutoscalerName autoscaler = ProjectRegionAutoscalerName.of("[PROJECT]", "[REGION]", "[AUTOSCALER]");
+   *   String formattedAutoscaler = ProjectRegionAutoscalerName.format("[PROJECT]", "[REGION]", "[AUTOSCALER]");
    *   DeleteRegionAutoscalerHttpRequest request = DeleteRegionAutoscalerHttpRequest.newBuilder()
-   *     .setAutoscaler(autoscaler.toString())
+   *     .setAutoscaler(formattedAutoscaler)
    *     .build();
    *   Operation response = regionAutoscalerClient.deleteRegionAutoscaler(request);
    * }
@@ -236,9 +236,9 @@ public final Operation deleteRegionAutoscaler(DeleteRegionAutoscalerHttpRequest
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionAutoscalerName autoscaler = ProjectRegionAutoscalerName.of("[PROJECT]", "[REGION]", "[AUTOSCALER]");
+   *   String formattedAutoscaler = ProjectRegionAutoscalerName.format("[PROJECT]", "[REGION]", "[AUTOSCALER]");
    *   DeleteRegionAutoscalerHttpRequest request = DeleteRegionAutoscalerHttpRequest.newBuilder()
-   *     .setAutoscaler(autoscaler.toString())
+   *     .setAutoscaler(formattedAutoscaler)
    *     .build();
    *   ApiFuture<Operation> future = regionAutoscalerClient.deleteRegionAutoscalerCallable().futureCall(request);
    *   // Do something
@@ -310,9 +310,9 @@ public final Autoscaler getRegionAutoscaler(String autoscaler) {
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionAutoscalerName autoscaler = ProjectRegionAutoscalerName.of("[PROJECT]", "[REGION]", "[AUTOSCALER]");
+   *   String formattedAutoscaler = ProjectRegionAutoscalerName.format("[PROJECT]", "[REGION]", "[AUTOSCALER]");
    *   GetRegionAutoscalerHttpRequest request = GetRegionAutoscalerHttpRequest.newBuilder()
-   *     .setAutoscaler(autoscaler.toString())
+   *     .setAutoscaler(formattedAutoscaler)
    *     .build();
    *   Autoscaler response = regionAutoscalerClient.getRegionAutoscaler(request);
    * }
@@ -334,9 +334,9 @@ public final Autoscaler getRegionAutoscaler(GetRegionAutoscalerHttpRequest reque
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionAutoscalerName autoscaler = ProjectRegionAutoscalerName.of("[PROJECT]", "[REGION]", "[AUTOSCALER]");
+   *   String formattedAutoscaler = ProjectRegionAutoscalerName.format("[PROJECT]", "[REGION]", "[AUTOSCALER]");
    *   GetRegionAutoscalerHttpRequest request = GetRegionAutoscalerHttpRequest.newBuilder()
-   *     .setAutoscaler(autoscaler.toString())
+   *     .setAutoscaler(formattedAutoscaler)
    *     .build();
    *   ApiFuture<Autoscaler> future = regionAutoscalerClient.getRegionAutoscalerCallable().futureCall(request);
    *   // Do something
@@ -425,10 +425,10 @@ public final Operation insertRegionAutoscaler(String region, Autoscaler autoscal
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   InsertRegionAutoscalerHttpRequest request = InsertRegionAutoscalerHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setAutoscalerResource(autoscalerResource)
    *     .build();
    *   Operation response = regionAutoscalerClient.insertRegionAutoscaler(request);
@@ -451,10 +451,10 @@ public final Operation insertRegionAutoscaler(InsertRegionAutoscalerHttpRequest
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   InsertRegionAutoscalerHttpRequest request = InsertRegionAutoscalerHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setAutoscalerResource(autoscalerResource)
    *     .build();
    *   ApiFuture<Operation> future = regionAutoscalerClient.insertRegionAutoscalerCallable().futureCall(request);
@@ -529,9 +529,9 @@ public final ListRegionAutoscalersPagedResponse listRegionAutoscalers(String reg
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionAutoscalersHttpRequest request = ListRegionAutoscalersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (Autoscaler element : regionAutoscalerClient.listRegionAutoscalers(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -556,9 +556,9 @@ public final ListRegionAutoscalersPagedResponse listRegionAutoscalers(
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionAutoscalersHttpRequest request = ListRegionAutoscalersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRegionAutoscalersPagedResponse> future = regionAutoscalerClient.listRegionAutoscalersPagedCallable().futureCall(request);
    *   // Do something
@@ -582,9 +582,9 @@ public final ListRegionAutoscalersPagedResponse listRegionAutoscalers(
    *
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionAutoscalersHttpRequest request = ListRegionAutoscalersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     RegionAutoscalerList response = regionAutoscalerClient.listRegionAutoscalersCallable().call(request);
@@ -708,12 +708,12 @@ public final Operation patchRegionAutoscaler(
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
    *   String autoscaler = "";
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchRegionAutoscalerHttpRequest request = PatchRegionAutoscalerHttpRequest.newBuilder()
    *     .setAutoscaler(autoscaler)
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setAutoscalerResource(autoscalerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -739,12 +739,12 @@ public final Operation patchRegionAutoscaler(PatchRegionAutoscalerHttpRequest re
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
    *   String autoscaler = "";
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchRegionAutoscalerHttpRequest request = PatchRegionAutoscalerHttpRequest.newBuilder()
    *     .setAutoscaler(autoscaler)
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setAutoscalerResource(autoscalerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -858,12 +858,12 @@ public final Operation updateRegionAutoscaler(
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
    *   String autoscaler = "";
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateRegionAutoscalerHttpRequest request = UpdateRegionAutoscalerHttpRequest.newBuilder()
    *     .setAutoscaler(autoscaler)
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setAutoscalerResource(autoscalerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -888,12 +888,12 @@ public final Operation updateRegionAutoscaler(UpdateRegionAutoscalerHttpRequest
    * 

    * try (RegionAutoscalerClient regionAutoscalerClient = RegionAutoscalerClient.create()) {
    *   String autoscaler = "";
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Autoscaler autoscalerResource = Autoscaler.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateRegionAutoscalerHttpRequest request = UpdateRegionAutoscalerHttpRequest.newBuilder()
    *     .setAutoscaler(autoscaler)
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setAutoscalerResource(autoscalerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionBackendServiceClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionBackendServiceClient.java
index d793ab2ef4d3..1405442bf891 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionBackendServiceClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionBackendServiceClient.java
@@ -215,9 +215,9 @@ public final Operation deleteRegionBackendService(String backendService) {
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   DeleteRegionBackendServiceHttpRequest request = DeleteRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .build();
    *   Operation response = regionBackendServiceClient.deleteRegionBackendService(request);
    * }
@@ -239,9 +239,9 @@ public final Operation deleteRegionBackendService(DeleteRegionBackendServiceHttp
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   DeleteRegionBackendServiceHttpRequest request = DeleteRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .build();
    *   ApiFuture<Operation> future = regionBackendServiceClient.deleteRegionBackendServiceCallable().futureCall(request);
    *   // Do something
@@ -314,9 +314,9 @@ public final BackendService getRegionBackendService(String backendService) {
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   GetRegionBackendServiceHttpRequest request = GetRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .build();
    *   BackendService response = regionBackendServiceClient.getRegionBackendService(request);
    * }
@@ -338,9 +338,9 @@ public final BackendService getRegionBackendService(GetRegionBackendServiceHttpR
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   GetRegionBackendServiceHttpRequest request = GetRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .build();
    *   ApiFuture<BackendService> future = regionBackendServiceClient.getRegionBackendServiceCallable().futureCall(request);
    *   // Do something
@@ -423,10 +423,10 @@ public final BackendServiceGroupHealth getHealthRegionBackendService(
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   ResourceGroupReference resourceGroupReferenceResource = ResourceGroupReference.newBuilder().build();
    *   GetHealthRegionBackendServiceHttpRequest request = GetHealthRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setResourceGroupReferenceResource(resourceGroupReferenceResource)
    *     .build();
    *   BackendServiceGroupHealth response = regionBackendServiceClient.getHealthRegionBackendService(request);
@@ -450,10 +450,10 @@ public final BackendServiceGroupHealth getHealthRegionBackendService(
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   ResourceGroupReference resourceGroupReferenceResource = ResourceGroupReference.newBuilder().build();
    *   GetHealthRegionBackendServiceHttpRequest request = GetHealthRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setResourceGroupReferenceResource(resourceGroupReferenceResource)
    *     .build();
    *   ApiFuture<BackendServiceGroupHealth> future = regionBackendServiceClient.getHealthRegionBackendServiceCallable().futureCall(request);
@@ -546,10 +546,10 @@ public final Operation insertRegionBackendService(
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   InsertRegionBackendServiceHttpRequest request = InsertRegionBackendServiceHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setBackendServiceResource(backendServiceResource)
    *     .build();
    *   Operation response = regionBackendServiceClient.insertRegionBackendService(request);
@@ -574,10 +574,10 @@ public final Operation insertRegionBackendService(InsertRegionBackendServiceHttp
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   InsertRegionBackendServiceHttpRequest request = InsertRegionBackendServiceHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setBackendServiceResource(backendServiceResource)
    *     .build();
    *   ApiFuture<Operation> future = regionBackendServiceClient.insertRegionBackendServiceCallable().futureCall(request);
@@ -656,9 +656,9 @@ public final ListRegionBackendServicesPagedResponse listRegionBackendServices(St
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionBackendServicesHttpRequest request = ListRegionBackendServicesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (BackendService element : regionBackendServiceClient.listRegionBackendServices(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -684,9 +684,9 @@ public final ListRegionBackendServicesPagedResponse listRegionBackendServices(
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionBackendServicesHttpRequest request = ListRegionBackendServicesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRegionBackendServicesPagedResponse> future = regionBackendServiceClient.listRegionBackendServicesPagedCallable().futureCall(request);
    *   // Do something
@@ -712,9 +712,9 @@ public final ListRegionBackendServicesPagedResponse listRegionBackendServices(
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionBackendServicesHttpRequest request = ListRegionBackendServicesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     BackendServiceList response = regionBackendServiceClient.listRegionBackendServicesCallable().call(request);
@@ -832,11 +832,11 @@ public final Operation patchRegionBackendService(
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchRegionBackendServiceHttpRequest request = PatchRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setBackendServiceResource(backendServiceResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -863,11 +863,11 @@ public final Operation patchRegionBackendService(PatchRegionBackendServiceHttpRe
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchRegionBackendServiceHttpRequest request = PatchRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setBackendServiceResource(backendServiceResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -975,11 +975,11 @@ public final Operation updateRegionBackendService(
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateRegionBackendServiceHttpRequest request = UpdateRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setBackendServiceResource(backendServiceResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1005,11 +1005,11 @@ public final Operation updateRegionBackendService(UpdateRegionBackendServiceHttp
    *
    * 

    * try (RegionBackendServiceClient regionBackendServiceClient = RegionBackendServiceClient.create()) {
-   *   ProjectRegionBackendServiceName backendService = ProjectRegionBackendServiceName.of("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
+   *   String formattedBackendService = ProjectRegionBackendServiceName.format("[PROJECT]", "[REGION]", "[BACKEND_SERVICE]");
    *   BackendService backendServiceResource = BackendService.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateRegionBackendServiceHttpRequest request = UpdateRegionBackendServiceHttpRequest.newBuilder()
-   *     .setBackendService(backendService.toString())
+   *     .setBackendService(formattedBackendService)
    *     .setBackendServiceResource(backendServiceResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionClient.java
index d46c29730e8c..ce62712d5436 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionClient.java
@@ -211,9 +211,9 @@ public final Region getRegion(String region) {
    *
    * 

    * try (RegionClient regionClient = RegionClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   GetRegionHttpRequest request = GetRegionHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   Region response = regionClient.getRegion(request);
    * }
@@ -236,9 +236,9 @@ public final Region getRegion(GetRegionHttpRequest request) {
    *
    * 

    * try (RegionClient regionClient = RegionClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   GetRegionHttpRequest request = GetRegionHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<Region> future = regionClient.getRegionCallable().futureCall(request);
    *   // Do something
@@ -311,9 +311,9 @@ public final ListRegionsPagedResponse listRegions(String project) {
    *
    * 

    * try (RegionClient regionClient = RegionClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListRegionsHttpRequest request = ListRegionsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Region element : regionClient.listRegions(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -337,9 +337,9 @@ public final ListRegionsPagedResponse listRegions(ListRegionsHttpRequest request
    *
    * 

    * try (RegionClient regionClient = RegionClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListRegionsHttpRequest request = ListRegionsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListRegionsPagedResponse> future = regionClient.listRegionsPagedCallable().futureCall(request);
    *   // Do something
@@ -363,9 +363,9 @@ public final ListRegionsPagedResponse listRegions(ListRegionsHttpRequest request
    *
    * 

    * try (RegionClient regionClient = RegionClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListRegionsHttpRequest request = ListRegionsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     RegionList response = regionClient.listRegionsCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionCommitmentClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionCommitmentClient.java
index ccb1e5aca3f7..a42b168564b4 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionCommitmentClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionCommitmentClient.java
@@ -216,9 +216,9 @@ public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCo
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRegionCommitmentsHttpRequest request = AggregatedListRegionCommitmentsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (CommitmentsScopedList element : regionCommitmentClient.aggregatedListRegionCommitments(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -243,9 +243,9 @@ public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCo
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRegionCommitmentsHttpRequest request = AggregatedListRegionCommitmentsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListRegionCommitmentsPagedResponse> future = regionCommitmentClient.aggregatedListRegionCommitmentsPagedCallable().futureCall(request);
    *   // Do something
@@ -270,9 +270,9 @@ public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCo
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRegionCommitmentsHttpRequest request = AggregatedListRegionCommitmentsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     CommitmentAggregatedList response = regionCommitmentClient.aggregatedListRegionCommitmentsCallable().call(request);
@@ -356,9 +356,9 @@ public final Commitment getRegionCommitment(String commitment) {
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectRegionCommitmentName commitment = ProjectRegionCommitmentName.of("[PROJECT]", "[REGION]", "[COMMITMENT]");
+   *   String formattedCommitment = ProjectRegionCommitmentName.format("[PROJECT]", "[REGION]", "[COMMITMENT]");
    *   GetRegionCommitmentHttpRequest request = GetRegionCommitmentHttpRequest.newBuilder()
-   *     .setCommitment(commitment.toString())
+   *     .setCommitment(formattedCommitment)
    *     .build();
    *   Commitment response = regionCommitmentClient.getRegionCommitment(request);
    * }
@@ -381,9 +381,9 @@ public final Commitment getRegionCommitment(GetRegionCommitmentHttpRequest reque
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectRegionCommitmentName commitment = ProjectRegionCommitmentName.of("[PROJECT]", "[REGION]", "[COMMITMENT]");
+   *   String formattedCommitment = ProjectRegionCommitmentName.format("[PROJECT]", "[REGION]", "[COMMITMENT]");
    *   GetRegionCommitmentHttpRequest request = GetRegionCommitmentHttpRequest.newBuilder()
-   *     .setCommitment(commitment.toString())
+   *     .setCommitment(formattedCommitment)
    *     .build();
    *   ApiFuture<Commitment> future = regionCommitmentClient.getRegionCommitmentCallable().futureCall(request);
    *   // Do something
@@ -478,10 +478,10 @@ public final Operation insertRegionCommitment(String region, Commitment commitme
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Commitment commitmentResource = Commitment.newBuilder().build();
    *   InsertRegionCommitmentHttpRequest request = InsertRegionCommitmentHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setCommitmentResource(commitmentResource)
    *     .build();
    *   Operation response = regionCommitmentClient.insertRegionCommitment(request);
@@ -504,10 +504,10 @@ public final Operation insertRegionCommitment(InsertRegionCommitmentHttpRequest
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Commitment commitmentResource = Commitment.newBuilder().build();
    *   InsertRegionCommitmentHttpRequest request = InsertRegionCommitmentHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setCommitmentResource(commitmentResource)
    *     .build();
    *   ApiFuture<Operation> future = regionCommitmentClient.insertRegionCommitmentCallable().futureCall(request);
@@ -582,9 +582,9 @@ public final ListRegionCommitmentsPagedResponse listRegionCommitments(String reg
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionCommitmentsHttpRequest request = ListRegionCommitmentsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (Commitment element : regionCommitmentClient.listRegionCommitments(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -609,9 +609,9 @@ public final ListRegionCommitmentsPagedResponse listRegionCommitments(
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionCommitmentsHttpRequest request = ListRegionCommitmentsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRegionCommitmentsPagedResponse> future = regionCommitmentClient.listRegionCommitmentsPagedCallable().futureCall(request);
    *   // Do something
@@ -635,9 +635,9 @@ public final ListRegionCommitmentsPagedResponse listRegionCommitments(
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionCommitmentsHttpRequest request = ListRegionCommitmentsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     CommitmentList response = regionCommitmentClient.listRegionCommitmentsCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java
index 25d3d40272ab..34d8030d44e2 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java
@@ -221,10 +221,10 @@ public final Operation createSnapshotRegionDisk(String disk, Snapshot snapshotRe
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]");
+   *   String formattedDisk = ProjectRegionDiskName.format("[PROJECT]", "[REGION]", "[DISK]");
    *   Snapshot snapshotResource = Snapshot.newBuilder().build();
    *   CreateSnapshotRegionDiskHttpRequest request = CreateSnapshotRegionDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .setSnapshotResource(snapshotResource)
    *     .build();
    *   Operation response = regionDiskClient.createSnapshotRegionDisk(request);
@@ -247,10 +247,10 @@ public final Operation createSnapshotRegionDisk(CreateSnapshotRegionDiskHttpRequ
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]");
+   *   String formattedDisk = ProjectRegionDiskName.format("[PROJECT]", "[REGION]", "[DISK]");
    *   Snapshot snapshotResource = Snapshot.newBuilder().build();
    *   CreateSnapshotRegionDiskHttpRequest request = CreateSnapshotRegionDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .setSnapshotResource(snapshotResource)
    *     .build();
    *   ApiFuture<Operation> future = regionDiskClient.createSnapshotRegionDiskCallable().futureCall(request);
@@ -329,9 +329,9 @@ public final Operation deleteRegionDisk(String disk) {
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]");
+   *   String formattedDisk = ProjectRegionDiskName.format("[PROJECT]", "[REGION]", "[DISK]");
    *   DeleteRegionDiskHttpRequest request = DeleteRegionDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .build();
    *   Operation response = regionDiskClient.deleteRegionDisk(request);
    * }
@@ -355,9 +355,9 @@ public final Operation deleteRegionDisk(DeleteRegionDiskHttpRequest request) {
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]");
+   *   String formattedDisk = ProjectRegionDiskName.format("[PROJECT]", "[REGION]", "[DISK]");
    *   DeleteRegionDiskHttpRequest request = DeleteRegionDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .build();
    *   ApiFuture<Operation> future = regionDiskClient.deleteRegionDiskCallable().futureCall(request);
    *   // Do something
@@ -427,9 +427,9 @@ public final Disk getRegionDisk(String disk) {
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]");
+   *   String formattedDisk = ProjectRegionDiskName.format("[PROJECT]", "[REGION]", "[DISK]");
    *   GetRegionDiskHttpRequest request = GetRegionDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .build();
    *   Disk response = regionDiskClient.getRegionDisk(request);
    * }
@@ -451,9 +451,9 @@ public final Disk getRegionDisk(GetRegionDiskHttpRequest request) {
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]");
+   *   String formattedDisk = ProjectRegionDiskName.format("[PROJECT]", "[REGION]", "[DISK]");
    *   GetRegionDiskHttpRequest request = GetRegionDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .build();
    *   ApiFuture<Disk> future = regionDiskClient.getRegionDiskCallable().futureCall(request);
    *   // Do something
@@ -537,10 +537,10 @@ public final Operation insertRegionDisk(String region, Disk diskResource) {
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Disk diskResource = Disk.newBuilder().build();
    *   InsertRegionDiskHttpRequest request = InsertRegionDiskHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setDiskResource(diskResource)
    *     .build();
    *   Operation response = regionDiskClient.insertRegionDisk(request);
@@ -564,10 +564,10 @@ public final Operation insertRegionDisk(InsertRegionDiskHttpRequest request) {
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Disk diskResource = Disk.newBuilder().build();
    *   InsertRegionDiskHttpRequest request = InsertRegionDiskHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setDiskResource(diskResource)
    *     .build();
    *   ApiFuture<Operation> future = regionDiskClient.insertRegionDiskCallable().futureCall(request);
@@ -641,9 +641,9 @@ public final ListRegionDisksPagedResponse listRegionDisks(String region) {
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionDisksHttpRequest request = ListRegionDisksHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (Disk element : regionDiskClient.listRegionDisks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -667,9 +667,9 @@ public final ListRegionDisksPagedResponse listRegionDisks(ListRegionDisksHttpReq
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionDisksHttpRequest request = ListRegionDisksHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRegionDisksPagedResponse> future = regionDiskClient.listRegionDisksPagedCallable().futureCall(request);
    *   // Do something
@@ -693,9 +693,9 @@ public final ListRegionDisksPagedResponse listRegionDisks(ListRegionDisksHttpReq
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionDisksHttpRequest request = ListRegionDisksHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     DiskList response = regionDiskClient.listRegionDisksCallable().call(request);
@@ -785,10 +785,10 @@ public final Operation resizeRegionDisk(
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]");
+   *   String formattedDisk = ProjectRegionDiskName.format("[PROJECT]", "[REGION]", "[DISK]");
    *   RegionDisksResizeRequest regionDisksResizeRequestResource = RegionDisksResizeRequest.newBuilder().build();
    *   ResizeRegionDiskHttpRequest request = ResizeRegionDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .setRegionDisksResizeRequestResource(regionDisksResizeRequestResource)
    *     .build();
    *   Operation response = regionDiskClient.resizeRegionDisk(request);
@@ -811,10 +811,10 @@ public final Operation resizeRegionDisk(ResizeRegionDiskHttpRequest request) {
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]");
+   *   String formattedDisk = ProjectRegionDiskName.format("[PROJECT]", "[REGION]", "[DISK]");
    *   RegionDisksResizeRequest regionDisksResizeRequestResource = RegionDisksResizeRequest.newBuilder().build();
    *   ResizeRegionDiskHttpRequest request = ResizeRegionDiskHttpRequest.newBuilder()
-   *     .setDisk(disk.toString())
+   *     .setDisk(formattedDisk)
    *     .setRegionDisksResizeRequestResource(regionDisksResizeRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = regionDiskClient.resizeRegionDiskCallable().futureCall(request);
@@ -897,10 +897,10 @@ public final Operation setLabelsRegionDisk(
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskResourceName resource = ProjectRegionDiskResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionDiskResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   RegionSetLabelsRequest regionSetLabelsRequestResource = RegionSetLabelsRequest.newBuilder().build();
    *   SetLabelsRegionDiskHttpRequest request = SetLabelsRegionDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setRegionSetLabelsRequestResource(regionSetLabelsRequestResource)
    *     .build();
    *   Operation response = regionDiskClient.setLabelsRegionDisk(request);
@@ -923,10 +923,10 @@ public final Operation setLabelsRegionDisk(SetLabelsRegionDiskHttpRequest reques
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskResourceName resource = ProjectRegionDiskResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionDiskResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   RegionSetLabelsRequest regionSetLabelsRequestResource = RegionSetLabelsRequest.newBuilder().build();
    *   SetLabelsRegionDiskHttpRequest request = SetLabelsRegionDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setRegionSetLabelsRequestResource(regionSetLabelsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = regionDiskClient.setLabelsRegionDiskCallable().futureCall(request);
@@ -1010,10 +1010,10 @@ public final TestPermissionsResponse testIamPermissionsRegionDisk(
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskResourceName resource = ProjectRegionDiskResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionDiskResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsRegionDiskHttpRequest request = TestIamPermissionsRegionDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = regionDiskClient.testIamPermissionsRegionDisk(request);
@@ -1037,10 +1037,10 @@ public final TestPermissionsResponse testIamPermissionsRegionDisk(
    *
    * 

    * try (RegionDiskClient regionDiskClient = RegionDiskClient.create()) {
-   *   ProjectRegionDiskResourceName resource = ProjectRegionDiskResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionDiskResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsRegionDiskHttpRequest request = TestIamPermissionsRegionDiskHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = regionDiskClient.testIamPermissionsRegionDiskCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskTypeClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskTypeClient.java
index 360e590621bc..963dec08d79e 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskTypeClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionDiskTypeClient.java
@@ -214,9 +214,9 @@ public final DiskType getRegionDiskType(String diskType) {
    *
    * 

    * try (RegionDiskTypeClient regionDiskTypeClient = RegionDiskTypeClient.create()) {
-   *   ProjectRegionDiskTypeName diskType = ProjectRegionDiskTypeName.of("[PROJECT]", "[REGION]", "[DISK_TYPE]");
+   *   String formattedDiskType = ProjectRegionDiskTypeName.format("[PROJECT]", "[REGION]", "[DISK_TYPE]");
    *   GetRegionDiskTypeHttpRequest request = GetRegionDiskTypeHttpRequest.newBuilder()
-   *     .setDiskType(diskType.toString())
+   *     .setDiskType(formattedDiskType)
    *     .build();
    *   DiskType response = regionDiskTypeClient.getRegionDiskType(request);
    * }
@@ -239,9 +239,9 @@ public final DiskType getRegionDiskType(GetRegionDiskTypeHttpRequest request) {
    *
    * 

    * try (RegionDiskTypeClient regionDiskTypeClient = RegionDiskTypeClient.create()) {
-   *   ProjectRegionDiskTypeName diskType = ProjectRegionDiskTypeName.of("[PROJECT]", "[REGION]", "[DISK_TYPE]");
+   *   String formattedDiskType = ProjectRegionDiskTypeName.format("[PROJECT]", "[REGION]", "[DISK_TYPE]");
    *   GetRegionDiskTypeHttpRequest request = GetRegionDiskTypeHttpRequest.newBuilder()
-   *     .setDiskType(diskType.toString())
+   *     .setDiskType(formattedDiskType)
    *     .build();
    *   ApiFuture<DiskType> future = regionDiskTypeClient.getRegionDiskTypeCallable().futureCall(request);
    *   // Do something
@@ -314,9 +314,9 @@ public final ListRegionDiskTypesPagedResponse listRegionDiskTypes(String region)
    *
    * 

    * try (RegionDiskTypeClient regionDiskTypeClient = RegionDiskTypeClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionDiskTypesHttpRequest request = ListRegionDiskTypesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (DiskType element : regionDiskTypeClient.listRegionDiskTypes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -341,9 +341,9 @@ public final ListRegionDiskTypesPagedResponse listRegionDiskTypes(
    *
    * 

    * try (RegionDiskTypeClient regionDiskTypeClient = RegionDiskTypeClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionDiskTypesHttpRequest request = ListRegionDiskTypesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRegionDiskTypesPagedResponse> future = regionDiskTypeClient.listRegionDiskTypesPagedCallable().futureCall(request);
    *   // Do something
@@ -367,9 +367,9 @@ public final ListRegionDiskTypesPagedResponse listRegionDiskTypes(
    *
    * 

    * try (RegionDiskTypeClient regionDiskTypeClient = RegionDiskTypeClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionDiskTypesHttpRequest request = ListRegionDiskTypesHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     RegionDiskTypeList response = regionDiskTypeClient.listRegionDiskTypesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupClient.java
index 7531f101bd6a..318f5a7fdc50 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupClient.java
@@ -212,9 +212,9 @@ public final InstanceGroup getRegionInstanceGroup(String instanceGroup) {
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionInstanceGroupName instanceGroup = ProjectRegionInstanceGroupName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectRegionInstanceGroupName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
    *   GetRegionInstanceGroupHttpRequest request = GetRegionInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .build();
    *   InstanceGroup response = regionInstanceGroupClient.getRegionInstanceGroup(request);
    * }
@@ -236,9 +236,9 @@ public final InstanceGroup getRegionInstanceGroup(GetRegionInstanceGroupHttpRequ
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionInstanceGroupName instanceGroup = ProjectRegionInstanceGroupName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectRegionInstanceGroupName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
    *   GetRegionInstanceGroupHttpRequest request = GetRegionInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .build();
    *   ApiFuture<InstanceGroup> future = regionInstanceGroupClient.getRegionInstanceGroupCallable().futureCall(request);
    *   // Do something
@@ -313,9 +313,9 @@ public final ListRegionInstanceGroupsPagedResponse listRegionInstanceGroups(Stri
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionInstanceGroupsHttpRequest request = ListRegionInstanceGroupsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (InstanceGroup element : regionInstanceGroupClient.listRegionInstanceGroups(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -340,9 +340,9 @@ public final ListRegionInstanceGroupsPagedResponse listRegionInstanceGroups(
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionInstanceGroupsHttpRequest request = ListRegionInstanceGroupsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRegionInstanceGroupsPagedResponse> future = regionInstanceGroupClient.listRegionInstanceGroupsPagedCallable().futureCall(request);
    *   // Do something
@@ -367,9 +367,9 @@ public final ListRegionInstanceGroupsPagedResponse listRegionInstanceGroups(
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionInstanceGroupsHttpRequest request = ListRegionInstanceGroupsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     RegionInstanceGroupList response = regionInstanceGroupClient.listRegionInstanceGroupsCallable().call(request);
@@ -474,10 +474,10 @@ public final ListInstancesRegionInstanceGroupsPagedResponse listInstancesRegionI
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionInstanceGroupName instanceGroup = ProjectRegionInstanceGroupName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectRegionInstanceGroupName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
    *   RegionInstanceGroupsListInstancesRequest regionInstanceGroupsListInstancesRequestResource = RegionInstanceGroupsListInstancesRequest.newBuilder().build();
    *   ListInstancesRegionInstanceGroupsHttpRequest request = ListInstancesRegionInstanceGroupsHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setRegionInstanceGroupsListInstancesRequestResource(regionInstanceGroupsListInstancesRequestResource)
    *     .build();
    *   for (InstanceWithNamedPorts element : regionInstanceGroupClient.listInstancesRegionInstanceGroups(request).iterateAll()) {
@@ -505,10 +505,10 @@ public final ListInstancesRegionInstanceGroupsPagedResponse listInstancesRegionI
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionInstanceGroupName instanceGroup = ProjectRegionInstanceGroupName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectRegionInstanceGroupName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
    *   RegionInstanceGroupsListInstancesRequest regionInstanceGroupsListInstancesRequestResource = RegionInstanceGroupsListInstancesRequest.newBuilder().build();
    *   ListInstancesRegionInstanceGroupsHttpRequest request = ListInstancesRegionInstanceGroupsHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setRegionInstanceGroupsListInstancesRequestResource(regionInstanceGroupsListInstancesRequestResource)
    *     .build();
    *   ApiFuture<ListInstancesRegionInstanceGroupsPagedResponse> future = regionInstanceGroupClient.listInstancesRegionInstanceGroupsPagedCallable().futureCall(request);
@@ -537,10 +537,10 @@ public final ListInstancesRegionInstanceGroupsPagedResponse listInstancesRegionI
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionInstanceGroupName instanceGroup = ProjectRegionInstanceGroupName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectRegionInstanceGroupName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
    *   RegionInstanceGroupsListInstancesRequest regionInstanceGroupsListInstancesRequestResource = RegionInstanceGroupsListInstancesRequest.newBuilder().build();
    *   ListInstancesRegionInstanceGroupsHttpRequest request = ListInstancesRegionInstanceGroupsHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setRegionInstanceGroupsListInstancesRequestResource(regionInstanceGroupsListInstancesRequestResource)
    *     .build();
    *   while (true) {
@@ -637,10 +637,10 @@ public final Operation setNamedPortsRegionInstanceGroup(
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionInstanceGroupName instanceGroup = ProjectRegionInstanceGroupName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectRegionInstanceGroupName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
    *   RegionInstanceGroupsSetNamedPortsRequest regionInstanceGroupsSetNamedPortsRequestResource = RegionInstanceGroupsSetNamedPortsRequest.newBuilder().build();
    *   SetNamedPortsRegionInstanceGroupHttpRequest request = SetNamedPortsRegionInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setRegionInstanceGroupsSetNamedPortsRequestResource(regionInstanceGroupsSetNamedPortsRequestResource)
    *     .build();
    *   Operation response = regionInstanceGroupClient.setNamedPortsRegionInstanceGroup(request);
@@ -664,10 +664,10 @@ public final Operation setNamedPortsRegionInstanceGroup(
    *
    * 

    * try (RegionInstanceGroupClient regionInstanceGroupClient = RegionInstanceGroupClient.create()) {
-   *   ProjectRegionInstanceGroupName instanceGroup = ProjectRegionInstanceGroupName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
+   *   String formattedInstanceGroup = ProjectRegionInstanceGroupName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP]");
    *   RegionInstanceGroupsSetNamedPortsRequest regionInstanceGroupsSetNamedPortsRequestResource = RegionInstanceGroupsSetNamedPortsRequest.newBuilder().build();
    *   SetNamedPortsRegionInstanceGroupHttpRequest request = SetNamedPortsRegionInstanceGroupHttpRequest.newBuilder()
-   *     .setInstanceGroup(instanceGroup.toString())
+   *     .setInstanceGroup(formattedInstanceGroup)
    *     .setRegionInstanceGroupsSetNamedPortsRequestResource(regionInstanceGroupsSetNamedPortsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupClient.setNamedPortsRegionInstanceGroupCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java
index 2511a1d27b26..25cc00500b61 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java
@@ -268,10 +268,10 @@ public final Operation abandonInstancesRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersAbandonInstancesRequest regionInstanceGroupManagersAbandonInstancesRequestResource = RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build();
    *   AbandonInstancesRegionInstanceGroupManagerHttpRequest request = AbandonInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersAbandonInstancesRequestResource(regionInstanceGroupManagersAbandonInstancesRequestResource)
    *     .build();
    *   Operation response = regionInstanceGroupManagerClient.abandonInstancesRegionInstanceGroupManager(request);
@@ -307,10 +307,10 @@ public final Operation abandonInstancesRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersAbandonInstancesRequest regionInstanceGroupManagersAbandonInstancesRequestResource = RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build();
    *   AbandonInstancesRegionInstanceGroupManagerHttpRequest request = AbandonInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersAbandonInstancesRequestResource(regionInstanceGroupManagersAbandonInstancesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.abandonInstancesRegionInstanceGroupManagerCallable().futureCall(request);
@@ -387,9 +387,9 @@ public final Operation deleteRegionInstanceGroupManager(String instanceGroupMana
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   DeleteRegionInstanceGroupManagerHttpRequest request = DeleteRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   Operation response = regionInstanceGroupManagerClient.deleteRegionInstanceGroupManager(request);
    * }
@@ -412,9 +412,9 @@ public final Operation deleteRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   DeleteRegionInstanceGroupManagerHttpRequest request = DeleteRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.deleteRegionInstanceGroupManagerCallable().futureCall(request);
    *   // Do something
@@ -536,10 +536,10 @@ public final Operation deleteInstancesRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersDeleteInstancesRequest regionInstanceGroupManagersDeleteInstancesRequestResource = RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build();
    *   DeleteInstancesRegionInstanceGroupManagerHttpRequest request = DeleteInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersDeleteInstancesRequestResource(regionInstanceGroupManagersDeleteInstancesRequestResource)
    *     .build();
    *   Operation response = regionInstanceGroupManagerClient.deleteInstancesRegionInstanceGroupManager(request);
@@ -574,10 +574,10 @@ public final Operation deleteInstancesRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersDeleteInstancesRequest regionInstanceGroupManagersDeleteInstancesRequestResource = RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build();
    *   DeleteInstancesRegionInstanceGroupManagerHttpRequest request = DeleteInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersDeleteInstancesRequestResource(regionInstanceGroupManagersDeleteInstancesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.deleteInstancesRegionInstanceGroupManagerCallable().futureCall(request);
@@ -654,9 +654,9 @@ public final InstanceGroupManager getRegionInstanceGroupManager(String instanceG
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   GetRegionInstanceGroupManagerHttpRequest request = GetRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   InstanceGroupManager response = regionInstanceGroupManagerClient.getRegionInstanceGroupManager(request);
    * }
@@ -679,9 +679,9 @@ public final InstanceGroupManager getRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   GetRegionInstanceGroupManagerHttpRequest request = GetRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   ApiFuture<InstanceGroupManager> future = regionInstanceGroupManagerClient.getRegionInstanceGroupManagerCallable().futureCall(request);
    *   // Do something
@@ -787,10 +787,10 @@ public final Operation insertRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
    *   InsertRegionInstanceGroupManagerHttpRequest request = InsertRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setInstanceGroupManagerResource(instanceGroupManagerResource)
    *     .build();
    *   Operation response = regionInstanceGroupManagerClient.insertRegionInstanceGroupManager(request);
@@ -820,10 +820,10 @@ public final Operation insertRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
    *   InsertRegionInstanceGroupManagerHttpRequest request = InsertRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setInstanceGroupManagerResource(instanceGroupManagerResource)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.insertRegionInstanceGroupManagerCallable().futureCall(request);
@@ -900,9 +900,9 @@ public final ListRegionInstanceGroupManagersPagedResponse listRegionInstanceGrou
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionInstanceGroupManagersHttpRequest request = ListRegionInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (InstanceGroupManager element : regionInstanceGroupManagerClient.listRegionInstanceGroupManagers(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -927,9 +927,9 @@ public final ListRegionInstanceGroupManagersPagedResponse listRegionInstanceGrou
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionInstanceGroupManagersHttpRequest request = ListRegionInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRegionInstanceGroupManagersPagedResponse> future = regionInstanceGroupManagerClient.listRegionInstanceGroupManagersPagedCallable().futureCall(request);
    *   // Do something
@@ -954,9 +954,9 @@ public final ListRegionInstanceGroupManagersPagedResponse listRegionInstanceGrou
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionInstanceGroupManagersHttpRequest request = ListRegionInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     RegionInstanceGroupManagerList response = regionInstanceGroupManagerClient.listRegionInstanceGroupManagersCallable().call(request);
@@ -1047,9 +1047,9 @@ public final ListRegionInstanceGroupManagersPagedResponse listRegionInstanceGrou
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   ListManagedInstancesRegionInstanceGroupManagersHttpRequest request = ListManagedInstancesRegionInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   RegionInstanceGroupManagersListInstancesResponse response = regionInstanceGroupManagerClient.listManagedInstancesRegionInstanceGroupManagers(request);
    * }
@@ -1074,9 +1074,9 @@ public final ListRegionInstanceGroupManagersPagedResponse listRegionInstanceGrou
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   ListManagedInstancesRegionInstanceGroupManagersHttpRequest request = ListManagedInstancesRegionInstanceGroupManagersHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   ApiFuture<RegionInstanceGroupManagersListInstancesResponse> future = regionInstanceGroupManagerClient.listManagedInstancesRegionInstanceGroupManagersCallable().futureCall(request);
    *   // Do something
@@ -1195,11 +1195,11 @@ public final Operation patchRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchRegionInstanceGroupManagerHttpRequest request = PatchRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagerResource(instanceGroupManagerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1228,11 +1228,11 @@ public final Operation patchRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchRegionInstanceGroupManagerHttpRequest request = PatchRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setInstanceGroupManagerResource(instanceGroupManagerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1353,10 +1353,10 @@ public final Operation recreateInstancesRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersRecreateRequest regionInstanceGroupManagersRecreateRequestResource = RegionInstanceGroupManagersRecreateRequest.newBuilder().build();
    *   RecreateInstancesRegionInstanceGroupManagerHttpRequest request = RecreateInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersRecreateRequestResource(regionInstanceGroupManagersRecreateRequestResource)
    *     .build();
    *   Operation response = regionInstanceGroupManagerClient.recreateInstancesRegionInstanceGroupManager(request);
@@ -1390,10 +1390,10 @@ public final Operation recreateInstancesRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersRecreateRequest regionInstanceGroupManagersRecreateRequestResource = RegionInstanceGroupManagersRecreateRequest.newBuilder().build();
    *   RecreateInstancesRegionInstanceGroupManagerHttpRequest request = RecreateInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersRecreateRequestResource(regionInstanceGroupManagersRecreateRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.recreateInstancesRegionInstanceGroupManagerCallable().futureCall(request);
@@ -1508,10 +1508,10 @@ public final Operation resizeRegionInstanceGroupManager(
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
    *   Integer size = 0;
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   ResizeRegionInstanceGroupManagerHttpRequest request = ResizeRegionInstanceGroupManagerHttpRequest.newBuilder()
    *     .setSize(size)
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   Operation response = regionInstanceGroupManagerClient.resizeRegionInstanceGroupManager(request);
    * }
@@ -1545,10 +1545,10 @@ public final Operation resizeRegionInstanceGroupManager(
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
    *   Integer size = 0;
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   ResizeRegionInstanceGroupManagerHttpRequest request = ResizeRegionInstanceGroupManagerHttpRequest.newBuilder()
    *     .setSize(size)
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.resizeRegionInstanceGroupManagerCallable().futureCall(request);
    *   // Do something
@@ -1640,10 +1640,10 @@ public final Operation setInstanceTemplateRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersSetTemplateRequest regionInstanceGroupManagersSetTemplateRequestResource = RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build();
    *   SetInstanceTemplateRegionInstanceGroupManagerHttpRequest request = SetInstanceTemplateRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersSetTemplateRequestResource(regionInstanceGroupManagersSetTemplateRequestResource)
    *     .build();
    *   Operation response = regionInstanceGroupManagerClient.setInstanceTemplateRegionInstanceGroupManager(request);
@@ -1668,10 +1668,10 @@ public final Operation setInstanceTemplateRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersSetTemplateRequest regionInstanceGroupManagersSetTemplateRequestResource = RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build();
    *   SetInstanceTemplateRegionInstanceGroupManagerHttpRequest request = SetInstanceTemplateRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersSetTemplateRequestResource(regionInstanceGroupManagersSetTemplateRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.setInstanceTemplateRegionInstanceGroupManagerCallable().futureCall(request);
@@ -1764,10 +1764,10 @@ public final Operation setTargetPoolsRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersSetTargetPoolsRequest regionInstanceGroupManagersSetTargetPoolsRequestResource = RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build();
    *   SetTargetPoolsRegionInstanceGroupManagerHttpRequest request = SetTargetPoolsRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersSetTargetPoolsRequestResource(regionInstanceGroupManagersSetTargetPoolsRequestResource)
    *     .build();
    *   Operation response = regionInstanceGroupManagerClient.setTargetPoolsRegionInstanceGroupManager(request);
@@ -1792,10 +1792,10 @@ public final Operation setTargetPoolsRegionInstanceGroupManager(
    *
    * 

    * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
-   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
    *   RegionInstanceGroupManagersSetTargetPoolsRequest regionInstanceGroupManagersSetTargetPoolsRequestResource = RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build();
    *   SetTargetPoolsRegionInstanceGroupManagerHttpRequest request = SetTargetPoolsRegionInstanceGroupManagerHttpRequest.newBuilder()
-   *     .setInstanceGroupManager(instanceGroupManager.toString())
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
    *     .setRegionInstanceGroupManagersSetTargetPoolsRequestResource(regionInstanceGroupManagersSetTargetPoolsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.setTargetPoolsRegionInstanceGroupManagerCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionOperationClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionOperationClient.java
index ebfd8f0a24f1..83a55f3f8319 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionOperationClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RegionOperationClient.java
@@ -212,9 +212,9 @@ public final void deleteRegionOperation(String operation) {
    *
    * 

    * try (RegionOperationClient regionOperationClient = RegionOperationClient.create()) {
-   *   ProjectRegionOperationName operation = ProjectRegionOperationName.of("[PROJECT]", "[REGION]", "[OPERATION]");
+   *   String formattedOperation = ProjectRegionOperationName.format("[PROJECT]", "[REGION]", "[OPERATION]");
    *   DeleteRegionOperationHttpRequest request = DeleteRegionOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   regionOperationClient.deleteRegionOperation(request);
    * }
@@ -236,9 +236,9 @@ public final void deleteRegionOperation(DeleteRegionOperationHttpRequest request
    *
    * 

    * try (RegionOperationClient regionOperationClient = RegionOperationClient.create()) {
-   *   ProjectRegionOperationName operation = ProjectRegionOperationName.of("[PROJECT]", "[REGION]", "[OPERATION]");
+   *   String formattedOperation = ProjectRegionOperationName.format("[PROJECT]", "[REGION]", "[OPERATION]");
    *   DeleteRegionOperationHttpRequest request = DeleteRegionOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   ApiFuture<Void> future = regionOperationClient.deleteRegionOperationCallable().futureCall(request);
    *   // Do something
@@ -310,9 +310,9 @@ public final Operation getRegionOperation(String operation) {
    *
    * 

    * try (RegionOperationClient regionOperationClient = RegionOperationClient.create()) {
-   *   ProjectRegionOperationName operation = ProjectRegionOperationName.of("[PROJECT]", "[REGION]", "[OPERATION]");
+   *   String formattedOperation = ProjectRegionOperationName.format("[PROJECT]", "[REGION]", "[OPERATION]");
    *   GetRegionOperationHttpRequest request = GetRegionOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   Operation response = regionOperationClient.getRegionOperation(request);
    * }
@@ -334,9 +334,9 @@ public final Operation getRegionOperation(GetRegionOperationHttpRequest request)
    *
    * 

    * try (RegionOperationClient regionOperationClient = RegionOperationClient.create()) {
-   *   ProjectRegionOperationName operation = ProjectRegionOperationName.of("[PROJECT]", "[REGION]", "[OPERATION]");
+   *   String formattedOperation = ProjectRegionOperationName.format("[PROJECT]", "[REGION]", "[OPERATION]");
    *   GetRegionOperationHttpRequest request = GetRegionOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   ApiFuture<Operation> future = regionOperationClient.getRegionOperationCallable().futureCall(request);
    *   // Do something
@@ -410,9 +410,9 @@ public final ListRegionOperationsPagedResponse listRegionOperations(String regio
    *
    * 

    * try (RegionOperationClient regionOperationClient = RegionOperationClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionOperationsHttpRequest request = ListRegionOperationsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (Operation element : regionOperationClient.listRegionOperations(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -437,9 +437,9 @@ public final ListRegionOperationsPagedResponse listRegionOperations(
    *
    * 

    * try (RegionOperationClient regionOperationClient = RegionOperationClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionOperationsHttpRequest request = ListRegionOperationsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRegionOperationsPagedResponse> future = regionOperationClient.listRegionOperationsPagedCallable().futureCall(request);
    *   // Do something
@@ -463,9 +463,9 @@ public final ListRegionOperationsPagedResponse listRegionOperations(
    *
    * 

    * try (RegionOperationClient regionOperationClient = RegionOperationClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRegionOperationsHttpRequest request = ListRegionOperationsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     OperationList response = regionOperationClient.listRegionOperationsCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouteClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouteClient.java
index 98a552173875..92f055ad30d4 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouteClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouteClient.java
@@ -208,9 +208,9 @@ public final Operation deleteRoute(String route) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectGlobalRouteName route = ProjectGlobalRouteName.of("[PROJECT]", "[ROUTE]");
+   *   String formattedRoute = ProjectGlobalRouteName.format("[PROJECT]", "[ROUTE]");
    *   DeleteRouteHttpRequest request = DeleteRouteHttpRequest.newBuilder()
-   *     .setRoute(route.toString())
+   *     .setRoute(formattedRoute)
    *     .build();
    *   Operation response = routeClient.deleteRoute(request);
    * }
@@ -232,9 +232,9 @@ public final Operation deleteRoute(DeleteRouteHttpRequest request) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectGlobalRouteName route = ProjectGlobalRouteName.of("[PROJECT]", "[ROUTE]");
+   *   String formattedRoute = ProjectGlobalRouteName.format("[PROJECT]", "[ROUTE]");
    *   DeleteRouteHttpRequest request = DeleteRouteHttpRequest.newBuilder()
-   *     .setRoute(route.toString())
+   *     .setRoute(formattedRoute)
    *     .build();
    *   ApiFuture<Operation> future = routeClient.deleteRouteCallable().futureCall(request);
    *   // Do something
@@ -305,9 +305,9 @@ public final Route getRoute(String route) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectGlobalRouteName route = ProjectGlobalRouteName.of("[PROJECT]", "[ROUTE]");
+   *   String formattedRoute = ProjectGlobalRouteName.format("[PROJECT]", "[ROUTE]");
    *   GetRouteHttpRequest request = GetRouteHttpRequest.newBuilder()
-   *     .setRoute(route.toString())
+   *     .setRoute(formattedRoute)
    *     .build();
    *   Route response = routeClient.getRoute(request);
    * }
@@ -330,9 +330,9 @@ public final Route getRoute(GetRouteHttpRequest request) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectGlobalRouteName route = ProjectGlobalRouteName.of("[PROJECT]", "[ROUTE]");
+   *   String formattedRoute = ProjectGlobalRouteName.format("[PROJECT]", "[ROUTE]");
    *   GetRouteHttpRequest request = GetRouteHttpRequest.newBuilder()
-   *     .setRoute(route.toString())
+   *     .setRoute(formattedRoute)
    *     .build();
    *   ApiFuture<Route> future = routeClient.getRouteCallable().futureCall(request);
    *   // Do something
@@ -435,10 +435,10 @@ public final Operation insertRoute(String project, Route routeResource) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Route routeResource = Route.newBuilder().build();
    *   InsertRouteHttpRequest request = InsertRouteHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setRouteResource(routeResource)
    *     .build();
    *   Operation response = routeClient.insertRoute(request);
@@ -461,10 +461,10 @@ public final Operation insertRoute(InsertRouteHttpRequest request) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   Route routeResource = Route.newBuilder().build();
    *   InsertRouteHttpRequest request = InsertRouteHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setRouteResource(routeResource)
    *     .build();
    *   ApiFuture<Operation> future = routeClient.insertRouteCallable().futureCall(request);
@@ -537,9 +537,9 @@ public final ListRoutesPagedResponse listRoutes(String project) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListRoutesHttpRequest request = ListRoutesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Route element : routeClient.listRoutes(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -563,9 +563,9 @@ public final ListRoutesPagedResponse listRoutes(ListRoutesHttpRequest request) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListRoutesHttpRequest request = ListRoutesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListRoutesPagedResponse> future = routeClient.listRoutesPagedCallable().futureCall(request);
    *   // Do something
@@ -589,9 +589,9 @@ public final ListRoutesPagedResponse listRoutes(ListRoutesHttpRequest request) {
    *
    * 

    * try (RouteClient routeClient = RouteClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListRoutesHttpRequest request = ListRoutesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     RouteList response = routeClient.listRoutesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterClient.java
index 933d9468b4bb..221e37556c27 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterClient.java
@@ -211,9 +211,9 @@ public final AggregatedListRoutersPagedResponse aggregatedListRouters(String pro
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRoutersHttpRequest request = AggregatedListRoutersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (RoutersScopedList element : routerClient.aggregatedListRouters(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -238,9 +238,9 @@ public final AggregatedListRoutersPagedResponse aggregatedListRouters(
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRoutersHttpRequest request = AggregatedListRoutersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListRoutersPagedResponse> future = routerClient.aggregatedListRoutersPagedCallable().futureCall(request);
    *   // Do something
@@ -264,9 +264,9 @@ public final AggregatedListRoutersPagedResponse aggregatedListRouters(
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRoutersHttpRequest request = AggregatedListRoutersHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     RouterAggregatedList response = routerClient.aggregatedListRoutersCallable().call(request);
@@ -347,9 +347,9 @@ public final Operation deleteRouter(String router) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   DeleteRouterHttpRequest request = DeleteRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   Operation response = routerClient.deleteRouter(request);
    * }
@@ -371,9 +371,9 @@ public final Operation deleteRouter(DeleteRouterHttpRequest request) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   DeleteRouterHttpRequest request = DeleteRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   ApiFuture<Operation> future = routerClient.deleteRouterCallable().futureCall(request);
    *   // Do something
@@ -446,9 +446,9 @@ public final Router getRouter(String router) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   GetRouterHttpRequest request = GetRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   Router response = routerClient.getRouter(request);
    * }
@@ -471,9 +471,9 @@ public final Router getRouter(GetRouterHttpRequest request) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   GetRouterHttpRequest request = GetRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   ApiFuture<Router> future = routerClient.getRouterCallable().futureCall(request);
    *   // Do something
@@ -547,9 +547,9 @@ public final GetNatMappingInfoRoutersPagedResponse getNatMappingInfoRouters(Stri
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   GetNatMappingInfoRoutersHttpRequest request = GetNatMappingInfoRoutersHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   for (VmEndpointNatMappings element : routerClient.getNatMappingInfoRouters(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -574,9 +574,9 @@ public final GetNatMappingInfoRoutersPagedResponse getNatMappingInfoRouters(
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   GetNatMappingInfoRoutersHttpRequest request = GetNatMappingInfoRoutersHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   ApiFuture<GetNatMappingInfoRoutersPagedResponse> future = routerClient.getNatMappingInfoRoutersPagedCallable().futureCall(request);
    *   // Do something
@@ -601,9 +601,9 @@ public final GetNatMappingInfoRoutersPagedResponse getNatMappingInfoRouters(
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   GetNatMappingInfoRoutersHttpRequest request = GetNatMappingInfoRoutersHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   while (true) {
    *     VmEndpointNatMappingsList response = routerClient.getNatMappingInfoRoutersCallable().call(request);
@@ -684,9 +684,9 @@ public final RouterStatusResponse getRouterStatusRouter(String router) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   GetRouterStatusRouterHttpRequest request = GetRouterStatusRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   RouterStatusResponse response = routerClient.getRouterStatusRouter(request);
    * }
@@ -709,9 +709,9 @@ public final RouterStatusResponse getRouterStatusRouter(
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   GetRouterStatusRouterHttpRequest request = GetRouterStatusRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .build();
    *   ApiFuture<RouterStatusResponse> future = routerClient.getRouterStatusRouterCallable().futureCall(request);
    *   // Do something
@@ -794,10 +794,10 @@ public final Operation insertRouter(String region, Router routerResource) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Router routerResource = Router.newBuilder().build();
    *   InsertRouterHttpRequest request = InsertRouterHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setRouterResource(routerResource)
    *     .build();
    *   Operation response = routerClient.insertRouter(request);
@@ -821,10 +821,10 @@ public final Operation insertRouter(InsertRouterHttpRequest request) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Router routerResource = Router.newBuilder().build();
    *   InsertRouterHttpRequest request = InsertRouterHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setRouterResource(routerResource)
    *     .build();
    *   ApiFuture<Operation> future = routerClient.insertRouterCallable().futureCall(request);
@@ -897,9 +897,9 @@ public final ListRoutersPagedResponse listRouters(String region) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRoutersHttpRequest request = ListRoutersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (Router element : routerClient.listRouters(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -923,9 +923,9 @@ public final ListRoutersPagedResponse listRouters(ListRoutersHttpRequest request
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRoutersHttpRequest request = ListRoutersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListRoutersPagedResponse> future = routerClient.listRoutersPagedCallable().futureCall(request);
    *   // Do something
@@ -949,9 +949,9 @@ public final ListRoutersPagedResponse listRouters(ListRoutersHttpRequest request
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListRoutersHttpRequest request = ListRoutersHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     RouterList response = routerClient.listRoutersCallable().call(request);
@@ -1055,11 +1055,11 @@ public final Operation patchRouter(String router, Router routerResource, List
    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   Router routerResource = Router.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchRouterHttpRequest request = PatchRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .setRouterResource(routerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1084,11 +1084,11 @@ public final Operation patchRouter(PatchRouterHttpRequest request) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   Router routerResource = Router.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchRouterHttpRequest request = PatchRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .setRouterResource(routerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1173,10 +1173,10 @@ public final RoutersPreviewResponse previewRouter(String router, Router routerRe
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   Router routerResource = Router.newBuilder().build();
    *   PreviewRouterHttpRequest request = PreviewRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .setRouterResource(routerResource)
    *     .build();
    *   RoutersPreviewResponse response = routerClient.previewRouter(request);
@@ -1200,10 +1200,10 @@ public final RoutersPreviewResponse previewRouter(PreviewRouterHttpRequest reque
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   Router routerResource = Router.newBuilder().build();
    *   PreviewRouterHttpRequest request = PreviewRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .setRouterResource(routerResource)
    *     .build();
    *   ApiFuture<RoutersPreviewResponse> future = routerClient.previewRouterCallable().futureCall(request);
@@ -1298,11 +1298,11 @@ public final Operation updateRouter(
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   Router routerResource = Router.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateRouterHttpRequest request = UpdateRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .setRouterResource(routerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1326,11 +1326,11 @@ public final Operation updateRouter(UpdateRouterHttpRequest request) {
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
-   *   ProjectRegionRouterName router = ProjectRegionRouterName.of("[PROJECT]", "[REGION]", "[ROUTER]");
+   *   String formattedRouter = ProjectRegionRouterName.format("[PROJECT]", "[REGION]", "[ROUTER]");
    *   Router routerResource = Router.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateRouterHttpRequest request = UpdateRouterHttpRequest.newBuilder()
-   *     .setRouter(router.toString())
+   *     .setRouter(formattedRouter)
    *     .setRouterResource(routerResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SSLHealthCheck.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SSLHealthCheck.java
index 4e4a767ffa6a..a0cd695d56d0 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SSLHealthCheck.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SSLHealthCheck.java
@@ -27,6 +27,7 @@
 public final class SSLHealthCheck implements ApiMessage {
   private final Integer port;
   private final String portName;
+  private final String portSpecification;
   private final String proxyHeader;
   private final String request;
   private final String response;
@@ -34,15 +35,22 @@ public final class SSLHealthCheck implements ApiMessage {
   private SSLHealthCheck() {
     this.port = null;
     this.portName = null;
+    this.portSpecification = null;
     this.proxyHeader = null;
     this.request = null;
     this.response = null;
   }
 
   private SSLHealthCheck(
-      Integer port, String portName, String proxyHeader, String request, String response) {
+      Integer port,
+      String portName,
+      String portSpecification,
+      String proxyHeader,
+      String request,
+      String response) {
     this.port = port;
     this.portName = portName;
+    this.portSpecification = portSpecification;
     this.proxyHeader = proxyHeader;
     this.request = request;
     this.response = response;
@@ -56,6 +64,9 @@ public Object getFieldValue(String fieldName) {
     if ("portName".equals(fieldName)) {
       return portName;
     }
+    if ("portSpecification".equals(fieldName)) {
+      return portSpecification;
+    }
     if ("proxyHeader".equals(fieldName)) {
       return proxyHeader;
     }
@@ -102,6 +113,19 @@ public String getPortName() {
     return portName;
   }
 
+  /**
+   * Specifies how port is selected for health checking, can be one of following values:
+   * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The
+   * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port
+   * specified for each network endpoint is used for health checking. For other backends, the port
+   * or named port specified in the Backend Service is used for health checking.
+   *
+   * 

If not specified, SSL health check follows behavior specified in port and portName fields. + */ + public String getPortSpecification() { + return portSpecification; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE or * PROXY_V1. The default is NONE. @@ -152,6 +176,7 @@ public static SSLHealthCheck getDefaultInstance() { public static class Builder { private Integer port; private String portName; + private String portSpecification; private String proxyHeader; private String request; private String response; @@ -166,6 +191,9 @@ public Builder mergeFrom(SSLHealthCheck other) { if (other.getPortName() != null) { this.portName = other.portName; } + if (other.getPortSpecification() != null) { + this.portSpecification = other.portSpecification; + } if (other.getProxyHeader() != null) { this.proxyHeader = other.proxyHeader; } @@ -181,6 +209,7 @@ public Builder mergeFrom(SSLHealthCheck other) { Builder(SSLHealthCheck source) { this.port = source.port; this.portName = source.portName; + this.portSpecification = source.portSpecification; this.proxyHeader = source.proxyHeader; this.request = source.request; this.response = source.response; @@ -220,6 +249,33 @@ public Builder setPortName(String portName) { return this; } + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, SSL health check follows behavior specified in port and portName fields. + */ + public String getPortSpecification() { + return portSpecification; + } + + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, SSL health check follows behavior specified in port and portName fields. + */ + public Builder setPortSpecification(String portSpecification) { + this.portSpecification = portSpecification; + return this; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE * or PROXY_V1. The default is NONE. @@ -275,13 +331,14 @@ public Builder setResponse(String response) { public SSLHealthCheck build() { - return new SSLHealthCheck(port, portName, proxyHeader, request, response); + return new SSLHealthCheck(port, portName, portSpecification, proxyHeader, request, response); } public Builder clone() { Builder newBuilder = new Builder(); newBuilder.setPort(this.port); newBuilder.setPortName(this.portName); + newBuilder.setPortSpecification(this.portSpecification); newBuilder.setProxyHeader(this.proxyHeader); newBuilder.setRequest(this.request); newBuilder.setResponse(this.response); @@ -298,6 +355,9 @@ public String toString() { + "portName=" + portName + ", " + + "portSpecification=" + + portSpecification + + ", " + "proxyHeader=" + proxyHeader + ", " @@ -318,6 +378,7 @@ public boolean equals(Object o) { SSLHealthCheck that = (SSLHealthCheck) o; return Objects.equals(this.port, that.getPort()) && Objects.equals(this.portName, that.getPortName()) + && Objects.equals(this.portSpecification, that.getPortSpecification()) && Objects.equals(this.proxyHeader, that.getProxyHeader()) && Objects.equals(this.request, that.getRequest()) && Objects.equals(this.response, that.getResponse()); @@ -327,6 +388,6 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(port, portName, proxyHeader, request, response); + return Objects.hash(port, portName, portSpecification, proxyHeader, request, response); } } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SecurityPolicyClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SecurityPolicyClient.java index 49e2f830fb61..3b448ff953f8 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SecurityPolicyClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SecurityPolicyClient.java @@ -225,10 +225,10 @@ public final Operation addRuleSecurityPolicy( * *


    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   SecurityPolicyRule securityPolicyRuleResource = SecurityPolicyRule.newBuilder().build();
    *   AddRuleSecurityPolicyHttpRequest request = AddRuleSecurityPolicyHttpRequest.newBuilder()
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .setSecurityPolicyRuleResource(securityPolicyRuleResource)
    *     .build();
    *   Operation response = securityPolicyClient.addRuleSecurityPolicy(request);
@@ -251,10 +251,10 @@ public final Operation addRuleSecurityPolicy(AddRuleSecurityPolicyHttpRequest re
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   SecurityPolicyRule securityPolicyRuleResource = SecurityPolicyRule.newBuilder().build();
    *   AddRuleSecurityPolicyHttpRequest request = AddRuleSecurityPolicyHttpRequest.newBuilder()
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .setSecurityPolicyRuleResource(securityPolicyRuleResource)
    *     .build();
    *   ApiFuture<Operation> future = securityPolicyClient.addRuleSecurityPolicyCallable().futureCall(request);
@@ -327,9 +327,9 @@ public final Operation deleteSecurityPolicy(String securityPolicy) {
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   DeleteSecurityPolicyHttpRequest request = DeleteSecurityPolicyHttpRequest.newBuilder()
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .build();
    *   Operation response = securityPolicyClient.deleteSecurityPolicy(request);
    * }
@@ -351,9 +351,9 @@ public final Operation deleteSecurityPolicy(DeleteSecurityPolicyHttpRequest requ
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   DeleteSecurityPolicyHttpRequest request = DeleteSecurityPolicyHttpRequest.newBuilder()
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .build();
    *   ApiFuture<Operation> future = securityPolicyClient.deleteSecurityPolicyCallable().futureCall(request);
    *   // Do something
@@ -425,9 +425,9 @@ public final SecurityPolicy getSecurityPolicy(String securityPolicy) {
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   GetSecurityPolicyHttpRequest request = GetSecurityPolicyHttpRequest.newBuilder()
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .build();
    *   SecurityPolicy response = securityPolicyClient.getSecurityPolicy(request);
    * }
@@ -449,9 +449,9 @@ public final SecurityPolicy getSecurityPolicy(GetSecurityPolicyHttpRequest reque
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   GetSecurityPolicyHttpRequest request = GetSecurityPolicyHttpRequest.newBuilder()
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .build();
    *   ApiFuture<SecurityPolicy> future = securityPolicyClient.getSecurityPolicyCallable().futureCall(request);
    *   // Do something
@@ -533,10 +533,10 @@ public final SecurityPolicyRule getRuleSecurityPolicy(Integer priority, String s
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
    *   Integer priority = 0;
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   GetRuleSecurityPolicyHttpRequest request = GetRuleSecurityPolicyHttpRequest.newBuilder()
    *     .setPriority(priority)
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .build();
    *   SecurityPolicyRule response = securityPolicyClient.getRuleSecurityPolicy(request);
    * }
@@ -559,10 +559,10 @@ public final SecurityPolicyRule getRuleSecurityPolicy(GetRuleSecurityPolicyHttpR
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
    *   Integer priority = 0;
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   GetRuleSecurityPolicyHttpRequest request = GetRuleSecurityPolicyHttpRequest.newBuilder()
    *     .setPriority(priority)
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .build();
    *   ApiFuture<SecurityPolicyRule> future = securityPolicyClient.getRuleSecurityPolicyCallable().futureCall(request);
    *   // Do something
@@ -648,10 +648,10 @@ public final Operation insertSecurityPolicy(
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   SecurityPolicy securityPolicyResource = SecurityPolicy.newBuilder().build();
    *   InsertSecurityPolicyHttpRequest request = InsertSecurityPolicyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setSecurityPolicyResource(securityPolicyResource)
    *     .build();
    *   Operation response = securityPolicyClient.insertSecurityPolicy(request);
@@ -674,10 +674,10 @@ public final Operation insertSecurityPolicy(InsertSecurityPolicyHttpRequest requ
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   SecurityPolicy securityPolicyResource = SecurityPolicy.newBuilder().build();
    *   InsertSecurityPolicyHttpRequest request = InsertSecurityPolicyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setSecurityPolicyResource(securityPolicyResource)
    *     .build();
    *   ApiFuture<Operation> future = securityPolicyClient.insertSecurityPolicyCallable().futureCall(request);
@@ -752,9 +752,9 @@ public final ListSecurityPoliciesPagedResponse listSecurityPolicies(String proje
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSecurityPoliciesHttpRequest request = ListSecurityPoliciesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (SecurityPolicy element : securityPolicyClient.listSecurityPolicies(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -779,9 +779,9 @@ public final ListSecurityPoliciesPagedResponse listSecurityPolicies(
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSecurityPoliciesHttpRequest request = ListSecurityPoliciesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListSecurityPoliciesPagedResponse> future = securityPolicyClient.listSecurityPoliciesPagedCallable().futureCall(request);
    *   // Do something
@@ -805,9 +805,9 @@ public final ListSecurityPoliciesPagedResponse listSecurityPolicies(
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSecurityPoliciesHttpRequest request = ListSecurityPoliciesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     SecurityPolicyList response = securityPolicyClient.listSecurityPoliciesCallable().call(request);
@@ -916,11 +916,11 @@ public final Operation patchSecurityPolicy(
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   SecurityPolicy securityPolicyResource = SecurityPolicy.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchSecurityPolicyHttpRequest request = PatchSecurityPolicyHttpRequest.newBuilder()
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .setSecurityPolicyResource(securityPolicyResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -944,11 +944,11 @@ public final Operation patchSecurityPolicy(PatchSecurityPolicyHttpRequest reques
    *
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   SecurityPolicy securityPolicyResource = SecurityPolicy.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchSecurityPolicyHttpRequest request = PatchSecurityPolicyHttpRequest.newBuilder()
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .setSecurityPolicyResource(securityPolicyResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1043,11 +1043,11 @@ public final Operation patchRuleSecurityPolicy(
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
    *   Integer priority = 0;
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   SecurityPolicyRule securityPolicyRuleResource = SecurityPolicyRule.newBuilder().build();
    *   PatchRuleSecurityPolicyHttpRequest request = PatchRuleSecurityPolicyHttpRequest.newBuilder()
    *     .setPriority(priority)
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .setSecurityPolicyRuleResource(securityPolicyRuleResource)
    *     .build();
    *   Operation response = securityPolicyClient.patchRuleSecurityPolicy(request);
@@ -1071,11 +1071,11 @@ public final Operation patchRuleSecurityPolicy(PatchRuleSecurityPolicyHttpReques
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
    *   Integer priority = 0;
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   SecurityPolicyRule securityPolicyRuleResource = SecurityPolicyRule.newBuilder().build();
    *   PatchRuleSecurityPolicyHttpRequest request = PatchRuleSecurityPolicyHttpRequest.newBuilder()
    *     .setPriority(priority)
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .setSecurityPolicyRuleResource(securityPolicyRuleResource)
    *     .build();
    *   ApiFuture<Operation> future = securityPolicyClient.patchRuleSecurityPolicyCallable().futureCall(request);
@@ -1158,10 +1158,10 @@ public final Operation removeRuleSecurityPolicy(Integer priority, String securit
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
    *   Integer priority = 0;
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   RemoveRuleSecurityPolicyHttpRequest request = RemoveRuleSecurityPolicyHttpRequest.newBuilder()
    *     .setPriority(priority)
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .build();
    *   Operation response = securityPolicyClient.removeRuleSecurityPolicy(request);
    * }
@@ -1184,10 +1184,10 @@ public final Operation removeRuleSecurityPolicy(RemoveRuleSecurityPolicyHttpRequ
    * 

    * try (SecurityPolicyClient securityPolicyClient = SecurityPolicyClient.create()) {
    *   Integer priority = 0;
-   *   ProjectGlobalSecurityPolicyName securityPolicy = ProjectGlobalSecurityPolicyName.of("[PROJECT]", "[SECURITY_POLICY]");
+   *   String formattedSecurityPolicy = ProjectGlobalSecurityPolicyName.format("[PROJECT]", "[SECURITY_POLICY]");
    *   RemoveRuleSecurityPolicyHttpRequest request = RemoveRuleSecurityPolicyHttpRequest.newBuilder()
    *     .setPriority(priority)
-   *     .setSecurityPolicy(securityPolicy.toString())
+   *     .setSecurityPolicy(formattedSecurityPolicy)
    *     .build();
    *   ApiFuture<Operation> future = securityPolicyClient.removeRuleSecurityPolicyCallable().futureCall(request);
    *   // Do something
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.java
new file mode 100644
index 000000000000..2fe3ad0f0c6b
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.java
@@ -0,0 +1,611 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.instances.setShieldedInstanceIntegrityPolicy. Sets the Shielded
+ * Instance integrity policy for an instance. You can only use this method on a running instance.
+ * This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ */
+public final class SetShieldedInstanceIntegrityPolicyInstanceHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final List fieldMask;
+  private final String fields;
+  private final String instance;
+  private final String key;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String requestId;
+  private final ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource;
+  private final String userIp;
+
+  private SetShieldedInstanceIntegrityPolicyInstanceHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fieldMask = null;
+    this.fields = null;
+    this.instance = null;
+    this.key = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.requestId = null;
+    this.shieldedInstanceIntegrityPolicyResource = null;
+    this.userIp = null;
+  }
+
+  private SetShieldedInstanceIntegrityPolicyInstanceHttpRequest(
+      String access_token,
+      String callback,
+      List fieldMask,
+      String fields,
+      String instance,
+      String key,
+      String prettyPrint,
+      String quotaUser,
+      String requestId,
+      ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fieldMask = fieldMask;
+    this.fields = fields;
+    this.instance = instance;
+    this.key = key;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.requestId = requestId;
+    this.shieldedInstanceIntegrityPolicyResource = shieldedInstanceIntegrityPolicyResource;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fieldMask".equals(fieldName)) {
+      return fieldMask;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("instance".equals(fieldName)) {
+      return instance;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("requestId".equals(fieldName)) {
+      return requestId;
+    }
+    if ("shieldedInstanceIntegrityPolicyResource".equals(fieldName)) {
+      return shieldedInstanceIntegrityPolicyResource;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ShieldedInstanceIntegrityPolicy getApiMessageRequestBody() {
+    return shieldedInstanceIntegrityPolicyResource;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return fieldMask;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /**
+   * Name or id of the instance scoping this request. It must have the format
+   * `{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy`.
+   * \`{instance}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers
+   * (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus
+   * (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters in length, and
+   * it * must not start with \`"goog"\`.
+   */
+  public String getInstance() {
+    return instance;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /**
+   * 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). + */ + public String getRequestId() { + return requestId; + } + + /** The policy describes the baseline against which Instance boot integrity is measured. */ + public ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicyResource() { + return shieldedInstanceIntegrityPolicyResource; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static SetShieldedInstanceIntegrityPolicyInstanceHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final SetShieldedInstanceIntegrityPolicyInstanceHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new SetShieldedInstanceIntegrityPolicyInstanceHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private List fieldMask; + private String fields; + private String instance; + private String key; + private String prettyPrint; + private String quotaUser; + private String requestId; + private ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource; + private String userIp; + + Builder() {} + + public Builder mergeFrom(SetShieldedInstanceIntegrityPolicyInstanceHttpRequest other) { + if (other == SetShieldedInstanceIntegrityPolicyInstanceHttpRequest.getDefaultInstance()) + return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFieldMask() != null) { + this.fieldMask = other.fieldMask; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getInstance() != null) { + this.instance = other.instance; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getShieldedInstanceIntegrityPolicyResource() != null) { + this.shieldedInstanceIntegrityPolicyResource = + other.shieldedInstanceIntegrityPolicyResource; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(SetShieldedInstanceIntegrityPolicyInstanceHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fieldMask = source.fieldMask; + this.fields = source.fields; + this.instance = source.instance; + this.key = source.key; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.shieldedInstanceIntegrityPolicyResource = source.shieldedInstanceIntegrityPolicyResource; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return fieldMask; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public Builder addAllFieldMask(List fieldMask) { + if (this.fieldMask == null) { + this.fieldMask = new LinkedList<>(); + } + this.fieldMask.addAll(fieldMask); + return this; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public Builder addFieldMask(String fieldMask) { + if (this.fieldMask == null) { + this.fieldMask = new LinkedList<>(); + } + this.fieldMask.add(fieldMask); + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** + * Name or id of the instance scoping this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy`. + * \`{instance}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers + * (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus + * (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters in length, + * and it * must not start with \`"goog"\`. + */ + public String getInstance() { + return instance; + } + + /** + * Name or id of the instance scoping this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy`. + * \`{instance}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers + * (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus + * (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters in length, + * and it * must not start with \`"goog"\`. + */ + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + 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). + */ + public String getRequestId() { + return 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). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** The policy describes the baseline against which Instance boot integrity is measured. */ + public ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicyResource() { + return shieldedInstanceIntegrityPolicyResource; + } + + /** The policy describes the baseline against which Instance boot integrity is measured. */ + public Builder setShieldedInstanceIntegrityPolicyResource( + ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource) { + this.shieldedInstanceIntegrityPolicyResource = shieldedInstanceIntegrityPolicyResource; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public SetShieldedInstanceIntegrityPolicyInstanceHttpRequest build() { + String missing = ""; + + if (fieldMask == null) { + missing += " fieldMask"; + } + + if (instance == null) { + missing += " instance"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new SetShieldedInstanceIntegrityPolicyInstanceHttpRequest( + access_token, + callback, + fieldMask, + fields, + instance, + key, + prettyPrint, + quotaUser, + requestId, + shieldedInstanceIntegrityPolicyResource, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.addAllFieldMask(this.fieldMask); + newBuilder.setFields(this.fields); + newBuilder.setInstance(this.instance); + newBuilder.setKey(this.key); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setShieldedInstanceIntegrityPolicyResource( + this.shieldedInstanceIntegrityPolicyResource); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "SetShieldedInstanceIntegrityPolicyInstanceHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fieldMask=" + + fieldMask + + ", " + + "fields=" + + fields + + ", " + + "instance=" + + instance + + ", " + + "key=" + + key + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "shieldedInstanceIntegrityPolicyResource=" + + shieldedInstanceIntegrityPolicyResource + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof SetShieldedInstanceIntegrityPolicyInstanceHttpRequest) { + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest that = + (SetShieldedInstanceIntegrityPolicyInstanceHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fieldMask, that.getFieldMask()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.instance, that.getInstance()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals( + this.shieldedInstanceIntegrityPolicyResource, + that.getShieldedInstanceIntegrityPolicyResource()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fieldMask, + fields, + instance, + key, + prettyPrint, + quotaUser, + requestId, + shieldedInstanceIntegrityPolicyResource, + userIp); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Snapshot.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Snapshot.java index f9f4946d811c..14b118717259 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Snapshot.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Snapshot.java @@ -49,6 +49,7 @@ public final class Snapshot implements ApiMessage { private final String status; private final String storageBytes; private final String storageBytesStatus; + private final List storageLocations; private Snapshot() { this.creationTimestamp = null; @@ -69,6 +70,7 @@ private Snapshot() { this.status = null; this.storageBytes = null; this.storageBytesStatus = null; + this.storageLocations = null; } private Snapshot( @@ -89,7 +91,8 @@ private Snapshot( String sourceDiskId, String status, String storageBytes, - String storageBytesStatus) { + String storageBytesStatus, + List storageLocations) { this.creationTimestamp = creationTimestamp; this.description = description; this.diskSizeGb = diskSizeGb; @@ -108,6 +111,7 @@ private Snapshot( this.status = status; this.storageBytes = storageBytes; this.storageBytesStatus = storageBytesStatus; + this.storageLocations = storageLocations; } @Override @@ -166,6 +170,9 @@ public Object getFieldValue(String fieldName) { if ("storageBytesStatus".equals(fieldName)) { return storageBytesStatus; } + if ("storageLocations".equals(fieldName)) { + return storageLocations; + } return null; } @@ -333,6 +340,11 @@ public String getStorageBytesStatus() { return storageBytesStatus; } + /** GCS bucket storage location of the snapshot (regional or multi-regional). */ + public List getStorageLocationsList() { + return storageLocations; + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } @@ -374,6 +386,7 @@ public static class Builder { private String status; private String storageBytes; private String storageBytesStatus; + private List storageLocations; Builder() {} @@ -433,6 +446,9 @@ public Builder mergeFrom(Snapshot other) { if (other.getStorageBytesStatus() != null) { this.storageBytesStatus = other.storageBytesStatus; } + if (other.getStorageLocationsList() != null) { + this.storageLocations = other.storageLocations; + } return this; } @@ -455,6 +471,7 @@ public Builder mergeFrom(Snapshot other) { this.status = source.status; this.storageBytes = source.storageBytes; this.storageBytesStatus = source.storageBytesStatus; + this.storageLocations = source.storageLocations; } /** [Output Only] Creation timestamp in RFC3339 text format. */ @@ -798,6 +815,29 @@ public Builder setStorageBytesStatus(String storageBytesStatus) { return this; } + /** GCS bucket storage location of the snapshot (regional or multi-regional). */ + public List getStorageLocationsList() { + return storageLocations; + } + + /** GCS bucket storage location of the snapshot (regional or multi-regional). */ + public Builder addAllStorageLocations(List storageLocations) { + if (this.storageLocations == null) { + this.storageLocations = new LinkedList<>(); + } + this.storageLocations.addAll(storageLocations); + return this; + } + + /** GCS bucket storage location of the snapshot (regional or multi-regional). */ + public Builder addStorageLocations(String storageLocations) { + if (this.storageLocations == null) { + this.storageLocations = new LinkedList<>(); + } + this.storageLocations.add(storageLocations); + return this; + } + public Snapshot build() { return new Snapshot( @@ -818,7 +858,8 @@ public Snapshot build() { sourceDiskId, status, storageBytes, - storageBytesStatus); + storageBytesStatus, + storageLocations); } public Builder clone() { @@ -841,6 +882,7 @@ public Builder clone() { newBuilder.setStatus(this.status); newBuilder.setStorageBytes(this.storageBytes); newBuilder.setStorageBytesStatus(this.storageBytesStatus); + newBuilder.addAllStorageLocations(this.storageLocations); return newBuilder; } } @@ -901,6 +943,9 @@ public String toString() { + ", " + "storageBytesStatus=" + storageBytesStatus + + ", " + + "storageLocations=" + + storageLocations + "}"; } @@ -928,7 +973,8 @@ public boolean equals(Object o) { && Objects.equals(this.sourceDiskId, that.getSourceDiskId()) && Objects.equals(this.status, that.getStatus()) && Objects.equals(this.storageBytes, that.getStorageBytes()) - && Objects.equals(this.storageBytesStatus, that.getStorageBytesStatus()); + && Objects.equals(this.storageBytesStatus, that.getStorageBytesStatus()) + && Objects.equals(this.storageLocations, that.getStorageLocationsList()); } return false; } @@ -953,6 +999,7 @@ public int hashCode() { sourceDiskId, status, storageBytes, - storageBytesStatus); + storageBytesStatus, + storageLocations); } } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SnapshotClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SnapshotClient.java index e1bf3225a6b7..7e34ce322c3e 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SnapshotClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SnapshotClient.java @@ -224,9 +224,9 @@ public final Operation deleteSnapshot(String snapshot) { * *


    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotName snapshot = ProjectGlobalSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   String formattedSnapshot = ProjectGlobalSnapshotName.format("[PROJECT]", "[SNAPSHOT]");
    *   DeleteSnapshotHttpRequest request = DeleteSnapshotHttpRequest.newBuilder()
-   *     .setSnapshot(snapshot.toString())
+   *     .setSnapshot(formattedSnapshot)
    *     .build();
    *   Operation response = snapshotClient.deleteSnapshot(request);
    * }
@@ -253,9 +253,9 @@ public final Operation deleteSnapshot(DeleteSnapshotHttpRequest request) {
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotName snapshot = ProjectGlobalSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   String formattedSnapshot = ProjectGlobalSnapshotName.format("[PROJECT]", "[SNAPSHOT]");
    *   DeleteSnapshotHttpRequest request = DeleteSnapshotHttpRequest.newBuilder()
-   *     .setSnapshot(snapshot.toString())
+   *     .setSnapshot(formattedSnapshot)
    *     .build();
    *   ApiFuture<Operation> future = snapshotClient.deleteSnapshotCallable().futureCall(request);
    *   // Do something
@@ -329,9 +329,9 @@ public final Snapshot getSnapshot(String snapshot) {
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotName snapshot = ProjectGlobalSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   String formattedSnapshot = ProjectGlobalSnapshotName.format("[PROJECT]", "[SNAPSHOT]");
    *   GetSnapshotHttpRequest request = GetSnapshotHttpRequest.newBuilder()
-   *     .setSnapshot(snapshot.toString())
+   *     .setSnapshot(formattedSnapshot)
    *     .build();
    *   Snapshot response = snapshotClient.getSnapshot(request);
    * }
@@ -354,9 +354,9 @@ public final Snapshot getSnapshot(GetSnapshotHttpRequest request) {
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotName snapshot = ProjectGlobalSnapshotName.of("[PROJECT]", "[SNAPSHOT]");
+   *   String formattedSnapshot = ProjectGlobalSnapshotName.format("[PROJECT]", "[SNAPSHOT]");
    *   GetSnapshotHttpRequest request = GetSnapshotHttpRequest.newBuilder()
-   *     .setSnapshot(snapshot.toString())
+   *     .setSnapshot(formattedSnapshot)
    *     .build();
    *   ApiFuture<Snapshot> future = snapshotClient.getSnapshotCallable().futureCall(request);
    *   // Do something
@@ -430,9 +430,9 @@ public final Policy getIamPolicySnapshot(String resource) {
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalSnapshotResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GetIamPolicySnapshotHttpRequest request = GetIamPolicySnapshotHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = snapshotClient.getIamPolicySnapshot(request);
    * }
@@ -455,9 +455,9 @@ public final Policy getIamPolicySnapshot(GetIamPolicySnapshotHttpRequest request
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalSnapshotResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GetIamPolicySnapshotHttpRequest request = GetIamPolicySnapshotHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = snapshotClient.getIamPolicySnapshotCallable().futureCall(request);
    *   // Do something
@@ -531,9 +531,9 @@ public final ListSnapshotsPagedResponse listSnapshots(String project) {
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSnapshotsHttpRequest request = ListSnapshotsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Snapshot element : snapshotClient.listSnapshots(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -557,9 +557,9 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsHttpRequest r
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSnapshotsHttpRequest request = ListSnapshotsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListSnapshotsPagedResponse> future = snapshotClient.listSnapshotsPagedCallable().futureCall(request);
    *   // Do something
@@ -583,9 +583,9 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsHttpRequest r
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSnapshotsHttpRequest request = ListSnapshotsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     SnapshotList response = snapshotClient.listSnapshotsCallable().call(request);
@@ -676,10 +676,10 @@ public final Policy setIamPolicySnapshot(
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalSnapshotResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetPolicyRequest globalSetPolicyRequestResource = GlobalSetPolicyRequest.newBuilder().build();
    *   SetIamPolicySnapshotHttpRequest request = SetIamPolicySnapshotHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
    *     .build();
    *   Policy response = snapshotClient.setIamPolicySnapshot(request);
@@ -702,10 +702,10 @@ public final Policy setIamPolicySnapshot(SetIamPolicySnapshotHttpRequest request
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalSnapshotResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetPolicyRequest globalSetPolicyRequestResource = GlobalSetPolicyRequest.newBuilder().build();
    *   SetIamPolicySnapshotHttpRequest request = SetIamPolicySnapshotHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = snapshotClient.setIamPolicySnapshotCallable().futureCall(request);
@@ -792,10 +792,10 @@ public final Operation setLabelsSnapshot(
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalSnapshotResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetLabelsRequest globalSetLabelsRequestResource = GlobalSetLabelsRequest.newBuilder().build();
    *   SetLabelsSnapshotHttpRequest request = SetLabelsSnapshotHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetLabelsRequestResource(globalSetLabelsRequestResource)
    *     .build();
    *   Operation response = snapshotClient.setLabelsSnapshot(request);
@@ -819,10 +819,10 @@ public final Operation setLabelsSnapshot(SetLabelsSnapshotHttpRequest request) {
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalSnapshotResourceName.format("[PROJECT]", "[RESOURCE]");
    *   GlobalSetLabelsRequest globalSetLabelsRequestResource = GlobalSetLabelsRequest.newBuilder().build();
    *   SetLabelsSnapshotHttpRequest request = SetLabelsSnapshotHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setGlobalSetLabelsRequestResource(globalSetLabelsRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = snapshotClient.setLabelsSnapshotCallable().futureCall(request);
@@ -905,10 +905,10 @@ public final TestPermissionsResponse testIamPermissionsSnapshot(
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalSnapshotResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsSnapshotHttpRequest request = TestIamPermissionsSnapshotHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = snapshotClient.testIamPermissionsSnapshot(request);
@@ -932,10 +932,10 @@ public final TestPermissionsResponse testIamPermissionsSnapshot(
    *
    * 

    * try (SnapshotClient snapshotClient = SnapshotClient.create()) {
-   *   ProjectGlobalSnapshotResourceName resource = ProjectGlobalSnapshotResourceName.of("[PROJECT]", "[RESOURCE]");
+   *   String formattedResource = ProjectGlobalSnapshotResourceName.format("[PROJECT]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsSnapshotHttpRequest request = TestIamPermissionsSnapshotHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = snapshotClient.testIamPermissionsSnapshotCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SslCertificateClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SslCertificateClient.java
index 6028c1f0d39a..e75b1660031d 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SslCertificateClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SslCertificateClient.java
@@ -211,9 +211,9 @@ public final Operation deleteSslCertificate(String sslCertificate) {
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectGlobalSslCertificateName sslCertificate = ProjectGlobalSslCertificateName.of("[PROJECT]", "[SSL_CERTIFICATE]");
+   *   String formattedSslCertificate = ProjectGlobalSslCertificateName.format("[PROJECT]", "[SSL_CERTIFICATE]");
    *   DeleteSslCertificateHttpRequest request = DeleteSslCertificateHttpRequest.newBuilder()
-   *     .setSslCertificate(sslCertificate.toString())
+   *     .setSslCertificate(formattedSslCertificate)
    *     .build();
    *   Operation response = sslCertificateClient.deleteSslCertificate(request);
    * }
@@ -235,9 +235,9 @@ public final Operation deleteSslCertificate(DeleteSslCertificateHttpRequest requ
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectGlobalSslCertificateName sslCertificate = ProjectGlobalSslCertificateName.of("[PROJECT]", "[SSL_CERTIFICATE]");
+   *   String formattedSslCertificate = ProjectGlobalSslCertificateName.format("[PROJECT]", "[SSL_CERTIFICATE]");
    *   DeleteSslCertificateHttpRequest request = DeleteSslCertificateHttpRequest.newBuilder()
-   *     .setSslCertificate(sslCertificate.toString())
+   *     .setSslCertificate(formattedSslCertificate)
    *     .build();
    *   ApiFuture<Operation> future = sslCertificateClient.deleteSslCertificateCallable().futureCall(request);
    *   // Do something
@@ -312,9 +312,9 @@ public final SslCertificate getSslCertificate(String sslCertificate) {
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectGlobalSslCertificateName sslCertificate = ProjectGlobalSslCertificateName.of("[PROJECT]", "[SSL_CERTIFICATE]");
+   *   String formattedSslCertificate = ProjectGlobalSslCertificateName.format("[PROJECT]", "[SSL_CERTIFICATE]");
    *   GetSslCertificateHttpRequest request = GetSslCertificateHttpRequest.newBuilder()
-   *     .setSslCertificate(sslCertificate.toString())
+   *     .setSslCertificate(formattedSslCertificate)
    *     .build();
    *   SslCertificate response = sslCertificateClient.getSslCertificate(request);
    * }
@@ -337,9 +337,9 @@ public final SslCertificate getSslCertificate(GetSslCertificateHttpRequest reque
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectGlobalSslCertificateName sslCertificate = ProjectGlobalSslCertificateName.of("[PROJECT]", "[SSL_CERTIFICATE]");
+   *   String formattedSslCertificate = ProjectGlobalSslCertificateName.format("[PROJECT]", "[SSL_CERTIFICATE]");
    *   GetSslCertificateHttpRequest request = GetSslCertificateHttpRequest.newBuilder()
-   *     .setSslCertificate(sslCertificate.toString())
+   *     .setSslCertificate(formattedSslCertificate)
    *     .build();
    *   ApiFuture<SslCertificate> future = sslCertificateClient.getSslCertificateCallable().futureCall(request);
    *   // Do something
@@ -428,10 +428,10 @@ public final Operation insertSslCertificate(
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
    *   InsertSslCertificateHttpRequest request = InsertSslCertificateHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setSslCertificateResource(sslCertificateResource)
    *     .build();
    *   Operation response = sslCertificateClient.insertSslCertificate(request);
@@ -455,10 +455,10 @@ public final Operation insertSslCertificate(InsertSslCertificateHttpRequest requ
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
    *   InsertSslCertificateHttpRequest request = InsertSslCertificateHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setSslCertificateResource(sslCertificateResource)
    *     .build();
    *   ApiFuture<Operation> future = sslCertificateClient.insertSslCertificateCallable().futureCall(request);
@@ -533,9 +533,9 @@ public final ListSslCertificatesPagedResponse listSslCertificates(String project
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSslCertificatesHttpRequest request = ListSslCertificatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (SslCertificate element : sslCertificateClient.listSslCertificates(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -560,9 +560,9 @@ public final ListSslCertificatesPagedResponse listSslCertificates(
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSslCertificatesHttpRequest request = ListSslCertificatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListSslCertificatesPagedResponse> future = sslCertificateClient.listSslCertificatesPagedCallable().futureCall(request);
    *   // Do something
@@ -586,9 +586,9 @@ public final ListSslCertificatesPagedResponse listSslCertificates(
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSslCertificatesHttpRequest request = ListSslCertificatesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     SslCertificateList response = sslCertificateClient.listSslCertificatesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SslPolicyClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SslPolicyClient.java
index afc899c8258d..f1db5a6ace34 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SslPolicyClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SslPolicyClient.java
@@ -214,9 +214,9 @@ public final Operation deleteSslPolicy(String sslPolicy) {
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
+   *   String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
    *   DeleteSslPolicyHttpRequest request = DeleteSslPolicyHttpRequest.newBuilder()
-   *     .setSslPolicy(sslPolicy.toString())
+   *     .setSslPolicy(formattedSslPolicy)
    *     .build();
    *   Operation response = sslPolicyClient.deleteSslPolicy(request);
    * }
@@ -239,9 +239,9 @@ public final Operation deleteSslPolicy(DeleteSslPolicyHttpRequest request) {
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
+   *   String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
    *   DeleteSslPolicyHttpRequest request = DeleteSslPolicyHttpRequest.newBuilder()
-   *     .setSslPolicy(sslPolicy.toString())
+   *     .setSslPolicy(formattedSslPolicy)
    *     .build();
    *   ApiFuture<Operation> future = sslPolicyClient.deleteSslPolicyCallable().futureCall(request);
    *   // Do something
@@ -314,9 +314,9 @@ public final SslPolicy getSslPolicy(String sslPolicy) {
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
+   *   String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
    *   GetSslPolicyHttpRequest request = GetSslPolicyHttpRequest.newBuilder()
-   *     .setSslPolicy(sslPolicy.toString())
+   *     .setSslPolicy(formattedSslPolicy)
    *     .build();
    *   SslPolicy response = sslPolicyClient.getSslPolicy(request);
    * }
@@ -338,9 +338,9 @@ public final SslPolicy getSslPolicy(GetSslPolicyHttpRequest request) {
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
+   *   String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
    *   GetSslPolicyHttpRequest request = GetSslPolicyHttpRequest.newBuilder()
-   *     .setSslPolicy(sslPolicy.toString())
+   *     .setSslPolicy(formattedSslPolicy)
    *     .build();
    *   ApiFuture<SslPolicy> future = sslPolicyClient.getSslPolicyCallable().futureCall(request);
    *   // Do something
@@ -428,10 +428,10 @@ public final Operation insertSslPolicy(String project, SslPolicy sslPolicyResour
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
    *   InsertSslPolicyHttpRequest request = InsertSslPolicyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setSslPolicyResource(sslPolicyResource)
    *     .build();
    *   Operation response = sslPolicyClient.insertSslPolicy(request);
@@ -455,10 +455,10 @@ public final Operation insertSslPolicy(InsertSslPolicyHttpRequest request) {
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
    *   InsertSslPolicyHttpRequest request = InsertSslPolicyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setSslPolicyResource(sslPolicyResource)
    *     .build();
    *   ApiFuture<Operation> future = sslPolicyClient.insertSslPolicyCallable().futureCall(request);
@@ -532,9 +532,9 @@ public final ListSslPoliciesPagedResponse listSslPolicies(String project) {
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSslPoliciesHttpRequest request = ListSslPoliciesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (SslPolicy element : sslPolicyClient.listSslPolicies(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -558,9 +558,9 @@ public final ListSslPoliciesPagedResponse listSslPolicies(ListSslPoliciesHttpReq
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSslPoliciesHttpRequest request = ListSslPoliciesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListSslPoliciesPagedResponse> future = sslPolicyClient.listSslPoliciesPagedCallable().futureCall(request);
    *   // Do something
@@ -584,9 +584,9 @@ public final ListSslPoliciesPagedResponse listSslPolicies(ListSslPoliciesHttpReq
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListSslPoliciesHttpRequest request = ListSslPoliciesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     SslPoliciesList response = sslPolicyClient.listSslPoliciesCallable().call(request);
@@ -669,9 +669,9 @@ public final SslPoliciesListAvailableFeaturesResponse listAvailableFeaturesSslPo
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListAvailableFeaturesSslPoliciesHttpRequest request = ListAvailableFeaturesSslPoliciesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   SslPoliciesListAvailableFeaturesResponse response = sslPolicyClient.listAvailableFeaturesSslPolicies(request);
    * }
@@ -694,9 +694,9 @@ public final SslPoliciesListAvailableFeaturesResponse listAvailableFeaturesSslPo
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListAvailableFeaturesSslPoliciesHttpRequest request = ListAvailableFeaturesSslPoliciesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<SslPoliciesListAvailableFeaturesResponse> future = sslPolicyClient.listAvailableFeaturesSslPoliciesCallable().futureCall(request);
    *   // Do something
@@ -799,11 +799,11 @@ public final Operation patchSslPolicy(
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
+   *   String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
    *   SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchSslPolicyHttpRequest request = PatchSslPolicyHttpRequest.newBuilder()
-   *     .setSslPolicy(sslPolicy.toString())
+   *     .setSslPolicy(formattedSslPolicy)
    *     .setSslPolicyResource(sslPolicyResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -827,11 +827,11 @@ public final Operation patchSslPolicy(PatchSslPolicyHttpRequest request) {
    *
    * 

    * try (SslPolicyClient sslPolicyClient = SslPolicyClient.create()) {
-   *   ProjectGlobalSslPolicyName sslPolicy = ProjectGlobalSslPolicyName.of("[PROJECT]", "[SSL_POLICY]");
+   *   String formattedSslPolicy = ProjectGlobalSslPolicyName.format("[PROJECT]", "[SSL_POLICY]");
    *   SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchSslPolicyHttpRequest request = PatchSslPolicyHttpRequest.newBuilder()
-   *     .setSslPolicy(sslPolicy.toString())
+   *     .setSslPolicy(formattedSslPolicy)
    *     .setSslPolicyResource(sslPolicyResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java
index 39429fe085c9..a91a65915e5a 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java
@@ -212,9 +212,9 @@ public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks(St
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSubnetworksHttpRequest request = AggregatedListSubnetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (SubnetworksScopedList element : subnetworkClient.aggregatedListSubnetworks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -239,9 +239,9 @@ public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSubnetworksHttpRequest request = AggregatedListSubnetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListSubnetworksPagedResponse> future = subnetworkClient.aggregatedListSubnetworksPagedCallable().futureCall(request);
    *   // Do something
@@ -266,9 +266,9 @@ public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSubnetworksHttpRequest request = AggregatedListSubnetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     SubnetworkAggregatedList response = subnetworkClient.aggregatedListSubnetworksCallable().call(request);
@@ -349,9 +349,9 @@ public final Operation deleteSubnetwork(String subnetwork) {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   DeleteSubnetworkHttpRequest request = DeleteSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .build();
    *   Operation response = subnetworkClient.deleteSubnetwork(request);
    * }
@@ -373,9 +373,9 @@ public final Operation deleteSubnetwork(DeleteSubnetworkHttpRequest request) {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   DeleteSubnetworkHttpRequest request = DeleteSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .build();
    *   ApiFuture<Operation> future = subnetworkClient.deleteSubnetworkCallable().futureCall(request);
    *   // Do something
@@ -460,10 +460,10 @@ public final Operation expandIpCidrRangeSubnetwork(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource = SubnetworksExpandIpCidrRangeRequest.newBuilder().build();
    *   ExpandIpCidrRangeSubnetworkHttpRequest request = ExpandIpCidrRangeSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .setSubnetworksExpandIpCidrRangeRequestResource(subnetworksExpandIpCidrRangeRequestResource)
    *     .build();
    *   Operation response = subnetworkClient.expandIpCidrRangeSubnetwork(request);
@@ -487,10 +487,10 @@ public final Operation expandIpCidrRangeSubnetwork(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource = SubnetworksExpandIpCidrRangeRequest.newBuilder().build();
    *   ExpandIpCidrRangeSubnetworkHttpRequest request = ExpandIpCidrRangeSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .setSubnetworksExpandIpCidrRangeRequestResource(subnetworksExpandIpCidrRangeRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = subnetworkClient.expandIpCidrRangeSubnetworkCallable().futureCall(request);
@@ -563,9 +563,9 @@ public final Subnetwork getSubnetwork(String subnetwork) {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   GetSubnetworkHttpRequest request = GetSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .build();
    *   Subnetwork response = subnetworkClient.getSubnetwork(request);
    * }
@@ -587,9 +587,9 @@ public final Subnetwork getSubnetwork(GetSubnetworkHttpRequest request) {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   GetSubnetworkHttpRequest request = GetSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .build();
    *   ApiFuture<Subnetwork> future = subnetworkClient.getSubnetworkCallable().futureCall(request);
    *   // Do something
@@ -663,9 +663,9 @@ public final Policy getIamPolicySubnetwork(String resource) {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkResourceName resource = ProjectRegionSubnetworkResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionSubnetworkResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   GetIamPolicySubnetworkHttpRequest request = GetIamPolicySubnetworkHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   Policy response = subnetworkClient.getIamPolicySubnetwork(request);
    * }
@@ -688,9 +688,9 @@ public final Policy getIamPolicySubnetwork(GetIamPolicySubnetworkHttpRequest req
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkResourceName resource = ProjectRegionSubnetworkResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionSubnetworkResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   GetIamPolicySubnetworkHttpRequest request = GetIamPolicySubnetworkHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .build();
    *   ApiFuture<Policy> future = subnetworkClient.getIamPolicySubnetworkCallable().futureCall(request);
    *   // Do something
@@ -772,10 +772,10 @@ public final Operation insertSubnetwork(String region, Subnetwork subnetworkReso
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Subnetwork subnetworkResource = Subnetwork.newBuilder().build();
    *   InsertSubnetworkHttpRequest request = InsertSubnetworkHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setSubnetworkResource(subnetworkResource)
    *     .build();
    *   Operation response = subnetworkClient.insertSubnetwork(request);
@@ -798,10 +798,10 @@ public final Operation insertSubnetwork(InsertSubnetworkHttpRequest request) {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   Subnetwork subnetworkResource = Subnetwork.newBuilder().build();
    *   InsertSubnetworkHttpRequest request = InsertSubnetworkHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setSubnetworkResource(subnetworkResource)
    *     .build();
    *   ApiFuture<Operation> future = subnetworkClient.insertSubnetworkCallable().futureCall(request);
@@ -875,9 +875,9 @@ public final ListSubnetworksPagedResponse listSubnetworks(String region) {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListSubnetworksHttpRequest request = ListSubnetworksHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (Subnetwork element : subnetworkClient.listSubnetworks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -901,9 +901,9 @@ public final ListSubnetworksPagedResponse listSubnetworks(ListSubnetworksHttpReq
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListSubnetworksHttpRequest request = ListSubnetworksHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListSubnetworksPagedResponse> future = subnetworkClient.listSubnetworksPagedCallable().futureCall(request);
    *   // Do something
@@ -927,9 +927,9 @@ public final ListSubnetworksPagedResponse listSubnetworks(ListSubnetworksHttpReq
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListSubnetworksHttpRequest request = ListSubnetworksHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     SubnetworkList response = subnetworkClient.listSubnetworksCallable().call(request);
@@ -1011,9 +1011,9 @@ public final ListUsableSubnetworksPagedResponse listUsableSubnetworks(String pro
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListUsableSubnetworksHttpRequest request = ListUsableSubnetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (UsableSubnetwork element : subnetworkClient.listUsableSubnetworks(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -1038,9 +1038,9 @@ public final ListUsableSubnetworksPagedResponse listUsableSubnetworks(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListUsableSubnetworksHttpRequest request = ListUsableSubnetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListUsableSubnetworksPagedResponse> future = subnetworkClient.listUsableSubnetworksPagedCallable().futureCall(request);
    *   // Do something
@@ -1064,9 +1064,9 @@ public final ListUsableSubnetworksPagedResponse listUsableSubnetworks(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListUsableSubnetworksHttpRequest request = ListUsableSubnetworksHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     UsableSubnetworksAggregatedList response = subnetworkClient.listUsableSubnetworksCallable().call(request);
@@ -1179,11 +1179,11 @@ public final Operation patchSubnetwork(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   Subnetwork subnetworkResource = Subnetwork.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchSubnetworkHttpRequest request = PatchSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .setSubnetworkResource(subnetworkResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1209,11 +1209,11 @@ public final Operation patchSubnetwork(PatchSubnetworkHttpRequest request) {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   Subnetwork subnetworkResource = Subnetwork.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchSubnetworkHttpRequest request = PatchSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .setSubnetworkResource(subnetworkResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1297,10 +1297,10 @@ public final Policy setIamPolicySubnetwork(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkResourceName resource = ProjectRegionSubnetworkResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionSubnetworkResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   RegionSetPolicyRequest regionSetPolicyRequestResource = RegionSetPolicyRequest.newBuilder().build();
    *   SetIamPolicySubnetworkHttpRequest request = SetIamPolicySubnetworkHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
    *     .build();
    *   Policy response = subnetworkClient.setIamPolicySubnetwork(request);
@@ -1323,10 +1323,10 @@ public final Policy setIamPolicySubnetwork(SetIamPolicySubnetworkHttpRequest req
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkResourceName resource = ProjectRegionSubnetworkResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionSubnetworkResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   RegionSetPolicyRequest regionSetPolicyRequestResource = RegionSetPolicyRequest.newBuilder().build();
    *   SetIamPolicySubnetworkHttpRequest request = SetIamPolicySubnetworkHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
    *     .build();
    *   ApiFuture<Policy> future = subnetworkClient.setIamPolicySubnetworkCallable().futureCall(request);
@@ -1418,10 +1418,10 @@ public final Operation setPrivateIpGoogleAccessSubnetwork(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   SubnetworksSetPrivateIpGoogleAccessRequest subnetworksSetPrivateIpGoogleAccessRequestResource = SubnetworksSetPrivateIpGoogleAccessRequest.newBuilder().build();
    *   SetPrivateIpGoogleAccessSubnetworkHttpRequest request = SetPrivateIpGoogleAccessSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .setSubnetworksSetPrivateIpGoogleAccessRequestResource(subnetworksSetPrivateIpGoogleAccessRequestResource)
    *     .build();
    *   Operation response = subnetworkClient.setPrivateIpGoogleAccessSubnetwork(request);
@@ -1446,10 +1446,10 @@ public final Operation setPrivateIpGoogleAccessSubnetwork(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkName subnetwork = ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]");
+   *   String formattedSubnetwork = ProjectRegionSubnetworkName.format("[PROJECT]", "[REGION]", "[SUBNETWORK]");
    *   SubnetworksSetPrivateIpGoogleAccessRequest subnetworksSetPrivateIpGoogleAccessRequestResource = SubnetworksSetPrivateIpGoogleAccessRequest.newBuilder().build();
    *   SetPrivateIpGoogleAccessSubnetworkHttpRequest request = SetPrivateIpGoogleAccessSubnetworkHttpRequest.newBuilder()
-   *     .setSubnetwork(subnetwork.toString())
+   *     .setSubnetwork(formattedSubnetwork)
    *     .setSubnetworksSetPrivateIpGoogleAccessRequestResource(subnetworksSetPrivateIpGoogleAccessRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = subnetworkClient.setPrivateIpGoogleAccessSubnetworkCallable().futureCall(request);
@@ -1533,10 +1533,10 @@ public final TestPermissionsResponse testIamPermissionsSubnetwork(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkResourceName resource = ProjectRegionSubnetworkResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionSubnetworkResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsSubnetworkHttpRequest request = TestIamPermissionsSubnetworkHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   TestPermissionsResponse response = subnetworkClient.testIamPermissionsSubnetwork(request);
@@ -1560,10 +1560,10 @@ public final TestPermissionsResponse testIamPermissionsSubnetwork(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
-   *   ProjectRegionSubnetworkResourceName resource = ProjectRegionSubnetworkResourceName.of("[PROJECT]", "[REGION]", "[RESOURCE]");
+   *   String formattedResource = ProjectRegionSubnetworkResourceName.format("[PROJECT]", "[REGION]", "[RESOURCE]");
    *   TestPermissionsRequest testPermissionsRequestResource = TestPermissionsRequest.newBuilder().build();
    *   TestIamPermissionsSubnetworkHttpRequest request = TestIamPermissionsSubnetworkHttpRequest.newBuilder()
-   *     .setResource(resource.toString())
+   *     .setResource(formattedResource)
    *     .setTestPermissionsRequestResource(testPermissionsRequestResource)
    *     .build();
    *   ApiFuture<TestPermissionsResponse> future = subnetworkClient.testIamPermissionsSubnetworkCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TCPHealthCheck.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TCPHealthCheck.java
index 97dc089e3475..a8408c9a8984 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TCPHealthCheck.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TCPHealthCheck.java
@@ -27,6 +27,7 @@
 public final class TCPHealthCheck implements ApiMessage {
   private final Integer port;
   private final String portName;
+  private final String portSpecification;
   private final String proxyHeader;
   private final String request;
   private final String response;
@@ -34,15 +35,22 @@ public final class TCPHealthCheck implements ApiMessage {
   private TCPHealthCheck() {
     this.port = null;
     this.portName = null;
+    this.portSpecification = null;
     this.proxyHeader = null;
     this.request = null;
     this.response = null;
   }
 
   private TCPHealthCheck(
-      Integer port, String portName, String proxyHeader, String request, String response) {
+      Integer port,
+      String portName,
+      String portSpecification,
+      String proxyHeader,
+      String request,
+      String response) {
     this.port = port;
     this.portName = portName;
+    this.portSpecification = portSpecification;
     this.proxyHeader = proxyHeader;
     this.request = request;
     this.response = response;
@@ -56,6 +64,9 @@ public Object getFieldValue(String fieldName) {
     if ("portName".equals(fieldName)) {
       return portName;
     }
+    if ("portSpecification".equals(fieldName)) {
+      return portSpecification;
+    }
     if ("proxyHeader".equals(fieldName)) {
       return proxyHeader;
     }
@@ -102,6 +113,19 @@ public String getPortName() {
     return portName;
   }
 
+  /**
+   * Specifies how port is selected for health checking, can be one of following values:
+   * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The
+   * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port
+   * specified for each network endpoint is used for health checking. For other backends, the port
+   * or named port specified in the Backend Service is used for health checking.
+   *
+   * 

If not specified, TCP health check follows behavior specified in port and portName fields. + */ + public String getPortSpecification() { + return portSpecification; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE or * PROXY_V1. The default is NONE. @@ -152,6 +176,7 @@ public static TCPHealthCheck getDefaultInstance() { public static class Builder { private Integer port; private String portName; + private String portSpecification; private String proxyHeader; private String request; private String response; @@ -166,6 +191,9 @@ public Builder mergeFrom(TCPHealthCheck other) { if (other.getPortName() != null) { this.portName = other.portName; } + if (other.getPortSpecification() != null) { + this.portSpecification = other.portSpecification; + } if (other.getProxyHeader() != null) { this.proxyHeader = other.proxyHeader; } @@ -181,6 +209,7 @@ public Builder mergeFrom(TCPHealthCheck other) { Builder(TCPHealthCheck source) { this.port = source.port; this.portName = source.portName; + this.portSpecification = source.portSpecification; this.proxyHeader = source.proxyHeader; this.request = source.request; this.response = source.response; @@ -220,6 +249,33 @@ public Builder setPortName(String portName) { return this; } + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, TCP health check follows behavior specified in port and portName fields. + */ + public String getPortSpecification() { + return portSpecification; + } + + /** + * Specifies how port is selected for health checking, can be one of following values: + * USE_FIXED_PORT: The port number in port is used for health checking. USE_NAMED_PORT: The + * portName is used for health checking. USE_SERVING_PORT: For NetworkEndpointGroup, the port + * specified for each network endpoint is used for health checking. For other backends, the port + * or named port specified in the Backend Service is used for health checking. + * + *

If not specified, TCP health check follows behavior specified in port and portName fields. + */ + public Builder setPortSpecification(String portSpecification) { + this.portSpecification = portSpecification; + return this; + } + /** * Specifies the type of proxy header to append before sending data to the backend, either NONE * or PROXY_V1. The default is NONE. @@ -275,13 +331,14 @@ public Builder setResponse(String response) { public TCPHealthCheck build() { - return new TCPHealthCheck(port, portName, proxyHeader, request, response); + return new TCPHealthCheck(port, portName, portSpecification, proxyHeader, request, response); } public Builder clone() { Builder newBuilder = new Builder(); newBuilder.setPort(this.port); newBuilder.setPortName(this.portName); + newBuilder.setPortSpecification(this.portSpecification); newBuilder.setProxyHeader(this.proxyHeader); newBuilder.setRequest(this.request); newBuilder.setResponse(this.response); @@ -298,6 +355,9 @@ public String toString() { + "portName=" + portName + ", " + + "portSpecification=" + + portSpecification + + ", " + "proxyHeader=" + proxyHeader + ", " @@ -318,6 +378,7 @@ public boolean equals(Object o) { TCPHealthCheck that = (TCPHealthCheck) o; return Objects.equals(this.port, that.getPort()) && Objects.equals(this.portName, that.getPortName()) + && Objects.equals(this.portSpecification, that.getPortSpecification()) && Objects.equals(this.proxyHeader, that.getProxyHeader()) && Objects.equals(this.request, that.getRequest()) && Objects.equals(this.response, that.getResponse()); @@ -327,6 +388,6 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(port, portName, proxyHeader, request, response); + return Objects.hash(port, portName, portSpecification, proxyHeader, request, response); } } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyClient.java index ab07a90e24db..1b4986ed36c9 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyClient.java @@ -212,9 +212,9 @@ public final Operation deleteTargetHttpProxy(String targetHttpProxy) { * *


    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectGlobalTargetHttpProxyName targetHttpProxy = ProjectGlobalTargetHttpProxyName.of("[PROJECT]", "[TARGET_HTTP_PROXY]");
+   *   String formattedTargetHttpProxy = ProjectGlobalTargetHttpProxyName.format("[PROJECT]", "[TARGET_HTTP_PROXY]");
    *   DeleteTargetHttpProxyHttpRequest request = DeleteTargetHttpProxyHttpRequest.newBuilder()
-   *     .setTargetHttpProxy(targetHttpProxy.toString())
+   *     .setTargetHttpProxy(formattedTargetHttpProxy)
    *     .build();
    *   Operation response = targetHttpProxyClient.deleteTargetHttpProxy(request);
    * }
@@ -236,9 +236,9 @@ public final Operation deleteTargetHttpProxy(DeleteTargetHttpProxyHttpRequest re
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectGlobalTargetHttpProxyName targetHttpProxy = ProjectGlobalTargetHttpProxyName.of("[PROJECT]", "[TARGET_HTTP_PROXY]");
+   *   String formattedTargetHttpProxy = ProjectGlobalTargetHttpProxyName.format("[PROJECT]", "[TARGET_HTTP_PROXY]");
    *   DeleteTargetHttpProxyHttpRequest request = DeleteTargetHttpProxyHttpRequest.newBuilder()
-   *     .setTargetHttpProxy(targetHttpProxy.toString())
+   *     .setTargetHttpProxy(formattedTargetHttpProxy)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpProxyClient.deleteTargetHttpProxyCallable().futureCall(request);
    *   // Do something
@@ -314,9 +314,9 @@ public final TargetHttpProxy getTargetHttpProxy(String targetHttpProxy) {
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectGlobalTargetHttpProxyName targetHttpProxy = ProjectGlobalTargetHttpProxyName.of("[PROJECT]", "[TARGET_HTTP_PROXY]");
+   *   String formattedTargetHttpProxy = ProjectGlobalTargetHttpProxyName.format("[PROJECT]", "[TARGET_HTTP_PROXY]");
    *   GetTargetHttpProxyHttpRequest request = GetTargetHttpProxyHttpRequest.newBuilder()
-   *     .setTargetHttpProxy(targetHttpProxy.toString())
+   *     .setTargetHttpProxy(formattedTargetHttpProxy)
    *     .build();
    *   TargetHttpProxy response = targetHttpProxyClient.getTargetHttpProxy(request);
    * }
@@ -339,9 +339,9 @@ public final TargetHttpProxy getTargetHttpProxy(GetTargetHttpProxyHttpRequest re
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectGlobalTargetHttpProxyName targetHttpProxy = ProjectGlobalTargetHttpProxyName.of("[PROJECT]", "[TARGET_HTTP_PROXY]");
+   *   String formattedTargetHttpProxy = ProjectGlobalTargetHttpProxyName.format("[PROJECT]", "[TARGET_HTTP_PROXY]");
    *   GetTargetHttpProxyHttpRequest request = GetTargetHttpProxyHttpRequest.newBuilder()
-   *     .setTargetHttpProxy(targetHttpProxy.toString())
+   *     .setTargetHttpProxy(formattedTargetHttpProxy)
    *     .build();
    *   ApiFuture<TargetHttpProxy> future = targetHttpProxyClient.getTargetHttpProxyCallable().futureCall(request);
    *   // Do something
@@ -428,10 +428,10 @@ public final Operation insertTargetHttpProxy(
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   TargetHttpProxy targetHttpProxyResource = TargetHttpProxy.newBuilder().build();
    *   InsertTargetHttpProxyHttpRequest request = InsertTargetHttpProxyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setTargetHttpProxyResource(targetHttpProxyResource)
    *     .build();
    *   Operation response = targetHttpProxyClient.insertTargetHttpProxy(request);
@@ -455,10 +455,10 @@ public final Operation insertTargetHttpProxy(InsertTargetHttpProxyHttpRequest re
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   TargetHttpProxy targetHttpProxyResource = TargetHttpProxy.newBuilder().build();
    *   InsertTargetHttpProxyHttpRequest request = InsertTargetHttpProxyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setTargetHttpProxyResource(targetHttpProxyResource)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpProxyClient.insertTargetHttpProxyCallable().futureCall(request);
@@ -533,9 +533,9 @@ public final ListTargetHttpProxiesPagedResponse listTargetHttpProxies(String pro
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetHttpProxiesHttpRequest request = ListTargetHttpProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (TargetHttpProxy element : targetHttpProxyClient.listTargetHttpProxies(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -560,9 +560,9 @@ public final ListTargetHttpProxiesPagedResponse listTargetHttpProxies(
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetHttpProxiesHttpRequest request = ListTargetHttpProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListTargetHttpProxiesPagedResponse> future = targetHttpProxyClient.listTargetHttpProxiesPagedCallable().futureCall(request);
    *   // Do something
@@ -586,9 +586,9 @@ public final ListTargetHttpProxiesPagedResponse listTargetHttpProxies(
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetHttpProxiesHttpRequest request = ListTargetHttpProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     TargetHttpProxyList response = targetHttpProxyClient.listTargetHttpProxiesCallable().call(request);
@@ -679,10 +679,10 @@ public final Operation setUrlMapTargetHttpProxy(
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectTargetHttpProxyName targetHttpProxy = ProjectTargetHttpProxyName.of("[PROJECT]", "[TARGET_HTTP_PROXY]");
+   *   String formattedTargetHttpProxy = ProjectTargetHttpProxyName.format("[PROJECT]", "[TARGET_HTTP_PROXY]");
    *   UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
    *   SetUrlMapTargetHttpProxyHttpRequest request = SetUrlMapTargetHttpProxyHttpRequest.newBuilder()
-   *     .setTargetHttpProxy(targetHttpProxy.toString())
+   *     .setTargetHttpProxy(formattedTargetHttpProxy)
    *     .setUrlMapReferenceResource(urlMapReferenceResource)
    *     .build();
    *   Operation response = targetHttpProxyClient.setUrlMapTargetHttpProxy(request);
@@ -705,10 +705,10 @@ public final Operation setUrlMapTargetHttpProxy(SetUrlMapTargetHttpProxyHttpRequ
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
-   *   ProjectTargetHttpProxyName targetHttpProxy = ProjectTargetHttpProxyName.of("[PROJECT]", "[TARGET_HTTP_PROXY]");
+   *   String formattedTargetHttpProxy = ProjectTargetHttpProxyName.format("[PROJECT]", "[TARGET_HTTP_PROXY]");
    *   UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
    *   SetUrlMapTargetHttpProxyHttpRequest request = SetUrlMapTargetHttpProxyHttpRequest.newBuilder()
-   *     .setTargetHttpProxy(targetHttpProxy.toString())
+   *     .setTargetHttpProxy(formattedTargetHttpProxy)
    *     .setUrlMapReferenceResource(urlMapReferenceResource)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpProxyClient.setUrlMapTargetHttpProxyCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyClient.java
index 3d6901d4a490..32389d498e03 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyClient.java
@@ -215,9 +215,9 @@ public final Operation deleteTargetHttpsProxy(String targetHttpsProxy) {
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectGlobalTargetHttpsProxyName targetHttpsProxy = ProjectGlobalTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectGlobalTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   DeleteTargetHttpsProxyHttpRequest request = DeleteTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .build();
    *   Operation response = targetHttpsProxyClient.deleteTargetHttpsProxy(request);
    * }
@@ -239,9 +239,9 @@ public final Operation deleteTargetHttpsProxy(DeleteTargetHttpsProxyHttpRequest
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectGlobalTargetHttpsProxyName targetHttpsProxy = ProjectGlobalTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectGlobalTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   DeleteTargetHttpsProxyHttpRequest request = DeleteTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpsProxyClient.deleteTargetHttpsProxyCallable().futureCall(request);
    *   // Do something
@@ -317,9 +317,9 @@ public final TargetHttpsProxy getTargetHttpsProxy(String targetHttpsProxy) {
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectGlobalTargetHttpsProxyName targetHttpsProxy = ProjectGlobalTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectGlobalTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   GetTargetHttpsProxyHttpRequest request = GetTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .build();
    *   TargetHttpsProxy response = targetHttpsProxyClient.getTargetHttpsProxy(request);
    * }
@@ -342,9 +342,9 @@ public final TargetHttpsProxy getTargetHttpsProxy(GetTargetHttpsProxyHttpRequest
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectGlobalTargetHttpsProxyName targetHttpsProxy = ProjectGlobalTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectGlobalTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   GetTargetHttpsProxyHttpRequest request = GetTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .build();
    *   ApiFuture<TargetHttpsProxy> future = targetHttpsProxyClient.getTargetHttpsProxyCallable().futureCall(request);
    *   // Do something
@@ -433,10 +433,10 @@ public final Operation insertTargetHttpsProxy(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build();
    *   InsertTargetHttpsProxyHttpRequest request = InsertTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setTargetHttpsProxyResource(targetHttpsProxyResource)
    *     .build();
    *   Operation response = targetHttpsProxyClient.insertTargetHttpsProxy(request);
@@ -460,10 +460,10 @@ public final Operation insertTargetHttpsProxy(InsertTargetHttpsProxyHttpRequest
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   TargetHttpsProxy targetHttpsProxyResource = TargetHttpsProxy.newBuilder().build();
    *   InsertTargetHttpsProxyHttpRequest request = InsertTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setTargetHttpsProxyResource(targetHttpsProxyResource)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpsProxyClient.insertTargetHttpsProxyCallable().futureCall(request);
@@ -538,9 +538,9 @@ public final ListTargetHttpsProxiesPagedResponse listTargetHttpsProxies(String p
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetHttpsProxiesHttpRequest request = ListTargetHttpsProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (TargetHttpsProxy element : targetHttpsProxyClient.listTargetHttpsProxies(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -565,9 +565,9 @@ public final ListTargetHttpsProxiesPagedResponse listTargetHttpsProxies(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetHttpsProxiesHttpRequest request = ListTargetHttpsProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListTargetHttpsProxiesPagedResponse> future = targetHttpsProxyClient.listTargetHttpsProxiesPagedCallable().futureCall(request);
    *   // Do something
@@ -591,9 +591,9 @@ public final ListTargetHttpsProxiesPagedResponse listTargetHttpsProxies(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetHttpsProxiesHttpRequest request = ListTargetHttpsProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     TargetHttpsProxyList response = targetHttpsProxyClient.listTargetHttpsProxiesCallable().call(request);
@@ -690,10 +690,10 @@ public final Operation setQuicOverrideTargetHttpsProxy(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectGlobalTargetHttpsProxyName targetHttpsProxy = ProjectGlobalTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectGlobalTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   TargetHttpsProxiesSetQuicOverrideRequest targetHttpsProxiesSetQuicOverrideRequestResource = TargetHttpsProxiesSetQuicOverrideRequest.newBuilder().build();
    *   SetQuicOverrideTargetHttpsProxyHttpRequest request = SetQuicOverrideTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .setTargetHttpsProxiesSetQuicOverrideRequestResource(targetHttpsProxiesSetQuicOverrideRequestResource)
    *     .build();
    *   Operation response = targetHttpsProxyClient.setQuicOverrideTargetHttpsProxy(request);
@@ -717,10 +717,10 @@ public final Operation setQuicOverrideTargetHttpsProxy(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectGlobalTargetHttpsProxyName targetHttpsProxy = ProjectGlobalTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectGlobalTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   TargetHttpsProxiesSetQuicOverrideRequest targetHttpsProxiesSetQuicOverrideRequestResource = TargetHttpsProxiesSetQuicOverrideRequest.newBuilder().build();
    *   SetQuicOverrideTargetHttpsProxyHttpRequest request = SetQuicOverrideTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .setTargetHttpsProxiesSetQuicOverrideRequestResource(targetHttpsProxiesSetQuicOverrideRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpsProxyClient.setQuicOverrideTargetHttpsProxyCallable().futureCall(request);
@@ -811,10 +811,10 @@ public final Operation setSslCertificatesTargetHttpsProxy(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectTargetHttpsProxyName targetHttpsProxy = ProjectTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   TargetHttpsProxiesSetSslCertificatesRequest targetHttpsProxiesSetSslCertificatesRequestResource = TargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build();
    *   SetSslCertificatesTargetHttpsProxyHttpRequest request = SetSslCertificatesTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .setTargetHttpsProxiesSetSslCertificatesRequestResource(targetHttpsProxiesSetSslCertificatesRequestResource)
    *     .build();
    *   Operation response = targetHttpsProxyClient.setSslCertificatesTargetHttpsProxy(request);
@@ -838,10 +838,10 @@ public final Operation setSslCertificatesTargetHttpsProxy(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectTargetHttpsProxyName targetHttpsProxy = ProjectTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   TargetHttpsProxiesSetSslCertificatesRequest targetHttpsProxiesSetSslCertificatesRequestResource = TargetHttpsProxiesSetSslCertificatesRequest.newBuilder().build();
    *   SetSslCertificatesTargetHttpsProxyHttpRequest request = SetSslCertificatesTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .setTargetHttpsProxiesSetSslCertificatesRequestResource(targetHttpsProxiesSetSslCertificatesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpsProxyClient.setSslCertificatesTargetHttpsProxyCallable().futureCall(request);
@@ -933,10 +933,10 @@ public final Operation setSslPolicyTargetHttpsProxy(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectGlobalTargetHttpsProxyName targetHttpsProxy = ProjectGlobalTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectGlobalTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build();
    *   SetSslPolicyTargetHttpsProxyHttpRequest request = SetSslPolicyTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .setSslPolicyReferenceResource(sslPolicyReferenceResource)
    *     .build();
    *   Operation response = targetHttpsProxyClient.setSslPolicyTargetHttpsProxy(request);
@@ -962,10 +962,10 @@ public final Operation setSslPolicyTargetHttpsProxy(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectGlobalTargetHttpsProxyName targetHttpsProxy = ProjectGlobalTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectGlobalTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build();
    *   SetSslPolicyTargetHttpsProxyHttpRequest request = SetSslPolicyTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .setSslPolicyReferenceResource(sslPolicyReferenceResource)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpsProxyClient.setSslPolicyTargetHttpsProxyCallable().futureCall(request);
@@ -1048,10 +1048,10 @@ public final Operation setUrlMapTargetHttpsProxy(
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectTargetHttpsProxyName targetHttpsProxy = ProjectTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
    *   SetUrlMapTargetHttpsProxyHttpRequest request = SetUrlMapTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .setUrlMapReferenceResource(urlMapReferenceResource)
    *     .build();
    *   Operation response = targetHttpsProxyClient.setUrlMapTargetHttpsProxy(request);
@@ -1074,10 +1074,10 @@ public final Operation setUrlMapTargetHttpsProxy(SetUrlMapTargetHttpsProxyHttpRe
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
-   *   ProjectTargetHttpsProxyName targetHttpsProxy = ProjectTargetHttpsProxyName.of("[PROJECT]", "[TARGET_HTTPS_PROXY]");
+   *   String formattedTargetHttpsProxy = ProjectTargetHttpsProxyName.format("[PROJECT]", "[TARGET_HTTPS_PROXY]");
    *   UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
    *   SetUrlMapTargetHttpsProxyHttpRequest request = SetUrlMapTargetHttpsProxyHttpRequest.newBuilder()
-   *     .setTargetHttpsProxy(targetHttpsProxy.toString())
+   *     .setTargetHttpsProxy(formattedTargetHttpsProxy)
    *     .setUrlMapReferenceResource(urlMapReferenceResource)
    *     .build();
    *   ApiFuture<Operation> future = targetHttpsProxyClient.setUrlMapTargetHttpsProxyCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetInstanceClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetInstanceClient.java
index 1eb959e74769..d956f711610e 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetInstanceClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetInstanceClient.java
@@ -215,9 +215,9 @@ public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInst
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetInstancesHttpRequest request = AggregatedListTargetInstancesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (TargetInstancesScopedList element : targetInstanceClient.aggregatedListTargetInstances(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -242,9 +242,9 @@ public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInst
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetInstancesHttpRequest request = AggregatedListTargetInstancesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListTargetInstancesPagedResponse> future = targetInstanceClient.aggregatedListTargetInstancesPagedCallable().futureCall(request);
    *   // Do something
@@ -269,9 +269,9 @@ public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInst
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetInstancesHttpRequest request = AggregatedListTargetInstancesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     TargetInstanceAggregatedList response = targetInstanceClient.aggregatedListTargetInstancesCallable().call(request);
@@ -352,9 +352,9 @@ public final Operation deleteTargetInstance(String targetInstance) {
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneTargetInstanceName targetInstance = ProjectZoneTargetInstanceName.of("[PROJECT]", "[ZONE]", "[TARGET_INSTANCE]");
+   *   String formattedTargetInstance = ProjectZoneTargetInstanceName.format("[PROJECT]", "[ZONE]", "[TARGET_INSTANCE]");
    *   DeleteTargetInstanceHttpRequest request = DeleteTargetInstanceHttpRequest.newBuilder()
-   *     .setTargetInstance(targetInstance.toString())
+   *     .setTargetInstance(formattedTargetInstance)
    *     .build();
    *   Operation response = targetInstanceClient.deleteTargetInstance(request);
    * }
@@ -376,9 +376,9 @@ public final Operation deleteTargetInstance(DeleteTargetInstanceHttpRequest requ
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneTargetInstanceName targetInstance = ProjectZoneTargetInstanceName.of("[PROJECT]", "[ZONE]", "[TARGET_INSTANCE]");
+   *   String formattedTargetInstance = ProjectZoneTargetInstanceName.format("[PROJECT]", "[ZONE]", "[TARGET_INSTANCE]");
    *   DeleteTargetInstanceHttpRequest request = DeleteTargetInstanceHttpRequest.newBuilder()
-   *     .setTargetInstance(targetInstance.toString())
+   *     .setTargetInstance(formattedTargetInstance)
    *     .build();
    *   ApiFuture<Operation> future = targetInstanceClient.deleteTargetInstanceCallable().futureCall(request);
    *   // Do something
@@ -453,9 +453,9 @@ public final TargetInstance getTargetInstance(String targetInstance) {
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneTargetInstanceName targetInstance = ProjectZoneTargetInstanceName.of("[PROJECT]", "[ZONE]", "[TARGET_INSTANCE]");
+   *   String formattedTargetInstance = ProjectZoneTargetInstanceName.format("[PROJECT]", "[ZONE]", "[TARGET_INSTANCE]");
    *   GetTargetInstanceHttpRequest request = GetTargetInstanceHttpRequest.newBuilder()
-   *     .setTargetInstance(targetInstance.toString())
+   *     .setTargetInstance(formattedTargetInstance)
    *     .build();
    *   TargetInstance response = targetInstanceClient.getTargetInstance(request);
    * }
@@ -478,9 +478,9 @@ public final TargetInstance getTargetInstance(GetTargetInstanceHttpRequest reque
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneTargetInstanceName targetInstance = ProjectZoneTargetInstanceName.of("[PROJECT]", "[ZONE]", "[TARGET_INSTANCE]");
+   *   String formattedTargetInstance = ProjectZoneTargetInstanceName.format("[PROJECT]", "[ZONE]", "[TARGET_INSTANCE]");
    *   GetTargetInstanceHttpRequest request = GetTargetInstanceHttpRequest.newBuilder()
-   *     .setTargetInstance(targetInstance.toString())
+   *     .setTargetInstance(formattedTargetInstance)
    *     .build();
    *   ApiFuture<TargetInstance> future = targetInstanceClient.getTargetInstanceCallable().futureCall(request);
    *   // Do something
@@ -568,10 +568,10 @@ public final Operation insertTargetInstance(String zone, TargetInstance targetIn
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   TargetInstance targetInstanceResource = TargetInstance.newBuilder().build();
    *   InsertTargetInstanceHttpRequest request = InsertTargetInstanceHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setTargetInstanceResource(targetInstanceResource)
    *     .build();
    *   Operation response = targetInstanceClient.insertTargetInstance(request);
@@ -595,10 +595,10 @@ public final Operation insertTargetInstance(InsertTargetInstanceHttpRequest requ
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   TargetInstance targetInstanceResource = TargetInstance.newBuilder().build();
    *   InsertTargetInstanceHttpRequest request = InsertTargetInstanceHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .setTargetInstanceResource(targetInstanceResource)
    *     .build();
    *   ApiFuture<Operation> future = targetInstanceClient.insertTargetInstanceCallable().futureCall(request);
@@ -673,9 +673,9 @@ public final ListTargetInstancesPagedResponse listTargetInstances(String zone) {
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListTargetInstancesHttpRequest request = ListTargetInstancesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (TargetInstance element : targetInstanceClient.listTargetInstances(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -700,9 +700,9 @@ public final ListTargetInstancesPagedResponse listTargetInstances(
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListTargetInstancesHttpRequest request = ListTargetInstancesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListTargetInstancesPagedResponse> future = targetInstanceClient.listTargetInstancesPagedCallable().futureCall(request);
    *   // Do something
@@ -726,9 +726,9 @@ public final ListTargetInstancesPagedResponse listTargetInstances(
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListTargetInstancesHttpRequest request = ListTargetInstancesHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     TargetInstanceList response = targetInstanceClient.listTargetInstancesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java
index d1454e0ba3e7..ddf8b238cd2e 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java
@@ -222,10 +222,10 @@ public final Operation addHealthCheckTargetPool(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   TargetPoolsAddHealthCheckRequest targetPoolsAddHealthCheckRequestResource = TargetPoolsAddHealthCheckRequest.newBuilder().build();
    *   AddHealthCheckTargetPoolHttpRequest request = AddHealthCheckTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setTargetPoolsAddHealthCheckRequestResource(targetPoolsAddHealthCheckRequestResource)
    *     .build();
    *   Operation response = targetPoolClient.addHealthCheckTargetPool(request);
@@ -248,10 +248,10 @@ public final Operation addHealthCheckTargetPool(AddHealthCheckTargetPoolHttpRequ
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   TargetPoolsAddHealthCheckRequest targetPoolsAddHealthCheckRequestResource = TargetPoolsAddHealthCheckRequest.newBuilder().build();
    *   AddHealthCheckTargetPoolHttpRequest request = AddHealthCheckTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setTargetPoolsAddHealthCheckRequestResource(targetPoolsAddHealthCheckRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetPoolClient.addHealthCheckTargetPoolCallable().futureCall(request);
@@ -335,10 +335,10 @@ public final Operation addInstanceTargetPool(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   TargetPoolsAddInstanceRequest targetPoolsAddInstanceRequestResource = TargetPoolsAddInstanceRequest.newBuilder().build();
    *   AddInstanceTargetPoolHttpRequest request = AddInstanceTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setTargetPoolsAddInstanceRequestResource(targetPoolsAddInstanceRequestResource)
    *     .build();
    *   Operation response = targetPoolClient.addInstanceTargetPool(request);
@@ -361,10 +361,10 @@ public final Operation addInstanceTargetPool(AddInstanceTargetPoolHttpRequest re
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   TargetPoolsAddInstanceRequest targetPoolsAddInstanceRequestResource = TargetPoolsAddInstanceRequest.newBuilder().build();
    *   AddInstanceTargetPoolHttpRequest request = AddInstanceTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setTargetPoolsAddInstanceRequestResource(targetPoolsAddInstanceRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetPoolClient.addInstanceTargetPoolCallable().futureCall(request);
@@ -440,9 +440,9 @@ public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools(St
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetPoolsHttpRequest request = AggregatedListTargetPoolsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (TargetPoolsScopedList element : targetPoolClient.aggregatedListTargetPools(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -467,9 +467,9 @@ public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetPoolsHttpRequest request = AggregatedListTargetPoolsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListTargetPoolsPagedResponse> future = targetPoolClient.aggregatedListTargetPoolsPagedCallable().futureCall(request);
    *   // Do something
@@ -494,9 +494,9 @@ public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetPoolsHttpRequest request = AggregatedListTargetPoolsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     TargetPoolAggregatedList response = targetPoolClient.aggregatedListTargetPoolsCallable().call(request);
@@ -577,9 +577,9 @@ public final Operation deleteTargetPool(String targetPool) {
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   DeleteTargetPoolHttpRequest request = DeleteTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .build();
    *   Operation response = targetPoolClient.deleteTargetPool(request);
    * }
@@ -601,9 +601,9 @@ public final Operation deleteTargetPool(DeleteTargetPoolHttpRequest request) {
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   DeleteTargetPoolHttpRequest request = DeleteTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .build();
    *   ApiFuture<Operation> future = targetPoolClient.deleteTargetPoolCallable().futureCall(request);
    *   // Do something
@@ -677,9 +677,9 @@ public final TargetPool getTargetPool(String targetPool) {
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   GetTargetPoolHttpRequest request = GetTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .build();
    *   TargetPool response = targetPoolClient.getTargetPool(request);
    * }
@@ -702,9 +702,9 @@ public final TargetPool getTargetPool(GetTargetPoolHttpRequest request) {
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   GetTargetPoolHttpRequest request = GetTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .build();
    *   ApiFuture<TargetPool> future = targetPoolClient.getTargetPoolCallable().futureCall(request);
    *   // Do something
@@ -788,10 +788,10 @@ public final TargetPoolInstanceHealth getHealthTargetPool(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   InstanceReference instanceReferenceResource = InstanceReference.newBuilder().build();
    *   GetHealthTargetPoolHttpRequest request = GetHealthTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setInstanceReferenceResource(instanceReferenceResource)
    *     .build();
    *   TargetPoolInstanceHealth response = targetPoolClient.getHealthTargetPool(request);
@@ -816,10 +816,10 @@ public final TargetPoolInstanceHealth getHealthTargetPool(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   InstanceReference instanceReferenceResource = InstanceReference.newBuilder().build();
    *   GetHealthTargetPoolHttpRequest request = GetHealthTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setInstanceReferenceResource(instanceReferenceResource)
    *     .build();
    *   ApiFuture<TargetPoolInstanceHealth> future = targetPoolClient.getHealthTargetPoolCallable().futureCall(request);
@@ -907,10 +907,10 @@ public final Operation insertTargetPool(String region, TargetPool targetPoolReso
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   TargetPool targetPoolResource = TargetPool.newBuilder().build();
    *   InsertTargetPoolHttpRequest request = InsertTargetPoolHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setTargetPoolResource(targetPoolResource)
    *     .build();
    *   Operation response = targetPoolClient.insertTargetPool(request);
@@ -934,10 +934,10 @@ public final Operation insertTargetPool(InsertTargetPoolHttpRequest request) {
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   TargetPool targetPoolResource = TargetPool.newBuilder().build();
    *   InsertTargetPoolHttpRequest request = InsertTargetPoolHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setTargetPoolResource(targetPoolResource)
    *     .build();
    *   ApiFuture<Operation> future = targetPoolClient.insertTargetPoolCallable().futureCall(request);
@@ -1011,9 +1011,9 @@ public final ListTargetPoolsPagedResponse listTargetPools(String region) {
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListTargetPoolsHttpRequest request = ListTargetPoolsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (TargetPool element : targetPoolClient.listTargetPools(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -1037,9 +1037,9 @@ public final ListTargetPoolsPagedResponse listTargetPools(ListTargetPoolsHttpReq
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListTargetPoolsHttpRequest request = ListTargetPoolsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListTargetPoolsPagedResponse> future = targetPoolClient.listTargetPoolsPagedCallable().futureCall(request);
    *   // Do something
@@ -1063,9 +1063,9 @@ public final ListTargetPoolsPagedResponse listTargetPools(ListTargetPoolsHttpReq
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListTargetPoolsHttpRequest request = ListTargetPoolsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     TargetPoolList response = targetPoolClient.listTargetPoolsCallable().call(request);
@@ -1159,10 +1159,10 @@ public final Operation removeHealthCheckTargetPool(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   TargetPoolsRemoveHealthCheckRequest targetPoolsRemoveHealthCheckRequestResource = TargetPoolsRemoveHealthCheckRequest.newBuilder().build();
    *   RemoveHealthCheckTargetPoolHttpRequest request = RemoveHealthCheckTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setTargetPoolsRemoveHealthCheckRequestResource(targetPoolsRemoveHealthCheckRequestResource)
    *     .build();
    *   Operation response = targetPoolClient.removeHealthCheckTargetPool(request);
@@ -1186,10 +1186,10 @@ public final Operation removeHealthCheckTargetPool(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   TargetPoolsRemoveHealthCheckRequest targetPoolsRemoveHealthCheckRequestResource = TargetPoolsRemoveHealthCheckRequest.newBuilder().build();
    *   RemoveHealthCheckTargetPoolHttpRequest request = RemoveHealthCheckTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setTargetPoolsRemoveHealthCheckRequestResource(targetPoolsRemoveHealthCheckRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetPoolClient.removeHealthCheckTargetPoolCallable().futureCall(request);
@@ -1274,10 +1274,10 @@ public final Operation removeInstanceTargetPool(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   TargetPoolsRemoveInstanceRequest targetPoolsRemoveInstanceRequestResource = TargetPoolsRemoveInstanceRequest.newBuilder().build();
    *   RemoveInstanceTargetPoolHttpRequest request = RemoveInstanceTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setTargetPoolsRemoveInstanceRequestResource(targetPoolsRemoveInstanceRequestResource)
    *     .build();
    *   Operation response = targetPoolClient.removeInstanceTargetPool(request);
@@ -1300,10 +1300,10 @@ public final Operation removeInstanceTargetPool(RemoveInstanceTargetPoolHttpRequ
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   TargetPoolsRemoveInstanceRequest targetPoolsRemoveInstanceRequestResource = TargetPoolsRemoveInstanceRequest.newBuilder().build();
    *   RemoveInstanceTargetPoolHttpRequest request = RemoveInstanceTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setTargetPoolsRemoveInstanceRequestResource(targetPoolsRemoveInstanceRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetPoolClient.removeInstanceTargetPoolCallable().futureCall(request);
@@ -1394,11 +1394,11 @@ public final Operation setBackupTargetPool(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   Float failoverRatio = 0;
    *   TargetReference targetReferenceResource = TargetReference.newBuilder().build();
    *   SetBackupTargetPoolHttpRequest request = SetBackupTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setFailoverRatio(failoverRatio)
    *     .setTargetReferenceResource(targetReferenceResource)
    *     .build();
@@ -1422,11 +1422,11 @@ public final Operation setBackupTargetPool(SetBackupTargetPoolHttpRequest reques
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
-   *   ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName.of("[PROJECT]", "[REGION]", "[TARGET_POOL]");
+   *   String formattedTargetPool = ProjectRegionTargetPoolName.format("[PROJECT]", "[REGION]", "[TARGET_POOL]");
    *   Float failoverRatio = 0;
    *   TargetReference targetReferenceResource = TargetReference.newBuilder().build();
    *   SetBackupTargetPoolHttpRequest request = SetBackupTargetPoolHttpRequest.newBuilder()
-   *     .setTargetPool(targetPool.toString())
+   *     .setTargetPool(formattedTargetPool)
    *     .setFailoverRatio(failoverRatio)
    *     .setTargetReferenceResource(targetReferenceResource)
    *     .build();
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetSslProxyClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetSslProxyClient.java
index ddda0fcc5d31..5f1c1e3e5c10 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetSslProxyClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetSslProxyClient.java
@@ -211,9 +211,9 @@ public final Operation deleteTargetSslProxy(String targetSslProxy) {
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   DeleteTargetSslProxyHttpRequest request = DeleteTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .build();
    *   Operation response = targetSslProxyClient.deleteTargetSslProxy(request);
    * }
@@ -235,9 +235,9 @@ public final Operation deleteTargetSslProxy(DeleteTargetSslProxyHttpRequest requ
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   DeleteTargetSslProxyHttpRequest request = DeleteTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .build();
    *   ApiFuture<Operation> future = targetSslProxyClient.deleteTargetSslProxyCallable().futureCall(request);
    *   // Do something
@@ -312,9 +312,9 @@ public final TargetSslProxy getTargetSslProxy(String targetSslProxy) {
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   GetTargetSslProxyHttpRequest request = GetTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .build();
    *   TargetSslProxy response = targetSslProxyClient.getTargetSslProxy(request);
    * }
@@ -337,9 +337,9 @@ public final TargetSslProxy getTargetSslProxy(GetTargetSslProxyHttpRequest reque
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   GetTargetSslProxyHttpRequest request = GetTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .build();
    *   ApiFuture<TargetSslProxy> future = targetSslProxyClient.getTargetSslProxyCallable().futureCall(request);
    *   // Do something
@@ -426,10 +426,10 @@ public final Operation insertTargetSslProxy(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   TargetSslProxy targetSslProxyResource = TargetSslProxy.newBuilder().build();
    *   InsertTargetSslProxyHttpRequest request = InsertTargetSslProxyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setTargetSslProxyResource(targetSslProxyResource)
    *     .build();
    *   Operation response = targetSslProxyClient.insertTargetSslProxy(request);
@@ -453,10 +453,10 @@ public final Operation insertTargetSslProxy(InsertTargetSslProxyHttpRequest requ
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   TargetSslProxy targetSslProxyResource = TargetSslProxy.newBuilder().build();
    *   InsertTargetSslProxyHttpRequest request = InsertTargetSslProxyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setTargetSslProxyResource(targetSslProxyResource)
    *     .build();
    *   ApiFuture<Operation> future = targetSslProxyClient.insertTargetSslProxyCallable().futureCall(request);
@@ -531,9 +531,9 @@ public final ListTargetSslProxiesPagedResponse listTargetSslProxies(String proje
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetSslProxiesHttpRequest request = ListTargetSslProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (TargetSslProxy element : targetSslProxyClient.listTargetSslProxies(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -558,9 +558,9 @@ public final ListTargetSslProxiesPagedResponse listTargetSslProxies(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetSslProxiesHttpRequest request = ListTargetSslProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListTargetSslProxiesPagedResponse> future = targetSslProxyClient.listTargetSslProxiesPagedCallable().futureCall(request);
    *   // Do something
@@ -584,9 +584,9 @@ public final ListTargetSslProxiesPagedResponse listTargetSslProxies(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetSslProxiesHttpRequest request = ListTargetSslProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     TargetSslProxyList response = targetSslProxyClient.listTargetSslProxiesCallable().call(request);
@@ -683,10 +683,10 @@ public final Operation setBackendServiceTargetSslProxy(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = TargetSslProxiesSetBackendServiceRequest.newBuilder().build();
    *   SetBackendServiceTargetSslProxyHttpRequest request = SetBackendServiceTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .setTargetSslProxiesSetBackendServiceRequestResource(targetSslProxiesSetBackendServiceRequestResource)
    *     .build();
    *   Operation response = targetSslProxyClient.setBackendServiceTargetSslProxy(request);
@@ -710,10 +710,10 @@ public final Operation setBackendServiceTargetSslProxy(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = TargetSslProxiesSetBackendServiceRequest.newBuilder().build();
    *   SetBackendServiceTargetSslProxyHttpRequest request = SetBackendServiceTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .setTargetSslProxiesSetBackendServiceRequestResource(targetSslProxiesSetBackendServiceRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetSslProxyClient.setBackendServiceTargetSslProxyCallable().futureCall(request);
@@ -800,10 +800,10 @@ public final Operation setProxyHeaderTargetSslProxy(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource = TargetSslProxiesSetProxyHeaderRequest.newBuilder().build();
    *   SetProxyHeaderTargetSslProxyHttpRequest request = SetProxyHeaderTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .setTargetSslProxiesSetProxyHeaderRequestResource(targetSslProxiesSetProxyHeaderRequestResource)
    *     .build();
    *   Operation response = targetSslProxyClient.setProxyHeaderTargetSslProxy(request);
@@ -827,10 +827,10 @@ public final Operation setProxyHeaderTargetSslProxy(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   TargetSslProxiesSetProxyHeaderRequest targetSslProxiesSetProxyHeaderRequestResource = TargetSslProxiesSetProxyHeaderRequest.newBuilder().build();
    *   SetProxyHeaderTargetSslProxyHttpRequest request = SetProxyHeaderTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .setTargetSslProxiesSetProxyHeaderRequestResource(targetSslProxiesSetProxyHeaderRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetSslProxyClient.setProxyHeaderTargetSslProxyCallable().futureCall(request);
@@ -919,10 +919,10 @@ public final Operation setSslCertificatesTargetSslProxy(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = TargetSslProxiesSetSslCertificatesRequest.newBuilder().build();
    *   SetSslCertificatesTargetSslProxyHttpRequest request = SetSslCertificatesTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .setTargetSslProxiesSetSslCertificatesRequestResource(targetSslProxiesSetSslCertificatesRequestResource)
    *     .build();
    *   Operation response = targetSslProxyClient.setSslCertificatesTargetSslProxy(request);
@@ -946,10 +946,10 @@ public final Operation setSslCertificatesTargetSslProxy(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = TargetSslProxiesSetSslCertificatesRequest.newBuilder().build();
    *   SetSslCertificatesTargetSslProxyHttpRequest request = SetSslCertificatesTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .setTargetSslProxiesSetSslCertificatesRequestResource(targetSslProxiesSetSslCertificatesRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetSslProxyClient.setSslCertificatesTargetSslProxyCallable().futureCall(request);
@@ -1041,10 +1041,10 @@ public final Operation setSslPolicyTargetSslProxy(
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build();
    *   SetSslPolicyTargetSslProxyHttpRequest request = SetSslPolicyTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .setSslPolicyReferenceResource(sslPolicyReferenceResource)
    *     .build();
    *   Operation response = targetSslProxyClient.setSslPolicyTargetSslProxy(request);
@@ -1069,10 +1069,10 @@ public final Operation setSslPolicyTargetSslProxy(SetSslPolicyTargetSslProxyHttp
    *
    * 

    * try (TargetSslProxyClient targetSslProxyClient = TargetSslProxyClient.create()) {
-   *   ProjectGlobalTargetSslProxyName targetSslProxy = ProjectGlobalTargetSslProxyName.of("[PROJECT]", "[TARGET_SSL_PROXY]");
+   *   String formattedTargetSslProxy = ProjectGlobalTargetSslProxyName.format("[PROJECT]", "[TARGET_SSL_PROXY]");
    *   SslPolicyReference sslPolicyReferenceResource = SslPolicyReference.newBuilder().build();
    *   SetSslPolicyTargetSslProxyHttpRequest request = SetSslPolicyTargetSslProxyHttpRequest.newBuilder()
-   *     .setTargetSslProxy(targetSslProxy.toString())
+   *     .setTargetSslProxy(formattedTargetSslProxy)
    *     .setSslPolicyReferenceResource(sslPolicyReferenceResource)
    *     .build();
    *   ApiFuture<Operation> future = targetSslProxyClient.setSslPolicyTargetSslProxyCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetTcpProxyClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetTcpProxyClient.java
index d34de3033329..854a8f4ccd1a 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetTcpProxyClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetTcpProxyClient.java
@@ -211,9 +211,9 @@ public final Operation deleteTargetTcpProxy(String targetTcpProxy) {
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectGlobalTargetTcpProxyName targetTcpProxy = ProjectGlobalTargetTcpProxyName.of("[PROJECT]", "[TARGET_TCP_PROXY]");
+   *   String formattedTargetTcpProxy = ProjectGlobalTargetTcpProxyName.format("[PROJECT]", "[TARGET_TCP_PROXY]");
    *   DeleteTargetTcpProxyHttpRequest request = DeleteTargetTcpProxyHttpRequest.newBuilder()
-   *     .setTargetTcpProxy(targetTcpProxy.toString())
+   *     .setTargetTcpProxy(formattedTargetTcpProxy)
    *     .build();
    *   Operation response = targetTcpProxyClient.deleteTargetTcpProxy(request);
    * }
@@ -235,9 +235,9 @@ public final Operation deleteTargetTcpProxy(DeleteTargetTcpProxyHttpRequest requ
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectGlobalTargetTcpProxyName targetTcpProxy = ProjectGlobalTargetTcpProxyName.of("[PROJECT]", "[TARGET_TCP_PROXY]");
+   *   String formattedTargetTcpProxy = ProjectGlobalTargetTcpProxyName.format("[PROJECT]", "[TARGET_TCP_PROXY]");
    *   DeleteTargetTcpProxyHttpRequest request = DeleteTargetTcpProxyHttpRequest.newBuilder()
-   *     .setTargetTcpProxy(targetTcpProxy.toString())
+   *     .setTargetTcpProxy(formattedTargetTcpProxy)
    *     .build();
    *   ApiFuture<Operation> future = targetTcpProxyClient.deleteTargetTcpProxyCallable().futureCall(request);
    *   // Do something
@@ -312,9 +312,9 @@ public final TargetTcpProxy getTargetTcpProxy(String targetTcpProxy) {
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectGlobalTargetTcpProxyName targetTcpProxy = ProjectGlobalTargetTcpProxyName.of("[PROJECT]", "[TARGET_TCP_PROXY]");
+   *   String formattedTargetTcpProxy = ProjectGlobalTargetTcpProxyName.format("[PROJECT]", "[TARGET_TCP_PROXY]");
    *   GetTargetTcpProxyHttpRequest request = GetTargetTcpProxyHttpRequest.newBuilder()
-   *     .setTargetTcpProxy(targetTcpProxy.toString())
+   *     .setTargetTcpProxy(formattedTargetTcpProxy)
    *     .build();
    *   TargetTcpProxy response = targetTcpProxyClient.getTargetTcpProxy(request);
    * }
@@ -337,9 +337,9 @@ public final TargetTcpProxy getTargetTcpProxy(GetTargetTcpProxyHttpRequest reque
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectGlobalTargetTcpProxyName targetTcpProxy = ProjectGlobalTargetTcpProxyName.of("[PROJECT]", "[TARGET_TCP_PROXY]");
+   *   String formattedTargetTcpProxy = ProjectGlobalTargetTcpProxyName.format("[PROJECT]", "[TARGET_TCP_PROXY]");
    *   GetTargetTcpProxyHttpRequest request = GetTargetTcpProxyHttpRequest.newBuilder()
-   *     .setTargetTcpProxy(targetTcpProxy.toString())
+   *     .setTargetTcpProxy(formattedTargetTcpProxy)
    *     .build();
    *   ApiFuture<TargetTcpProxy> future = targetTcpProxyClient.getTargetTcpProxyCallable().futureCall(request);
    *   // Do something
@@ -426,10 +426,10 @@ public final Operation insertTargetTcpProxy(
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   TargetTcpProxy targetTcpProxyResource = TargetTcpProxy.newBuilder().build();
    *   InsertTargetTcpProxyHttpRequest request = InsertTargetTcpProxyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setTargetTcpProxyResource(targetTcpProxyResource)
    *     .build();
    *   Operation response = targetTcpProxyClient.insertTargetTcpProxy(request);
@@ -453,10 +453,10 @@ public final Operation insertTargetTcpProxy(InsertTargetTcpProxyHttpRequest requ
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   TargetTcpProxy targetTcpProxyResource = TargetTcpProxy.newBuilder().build();
    *   InsertTargetTcpProxyHttpRequest request = InsertTargetTcpProxyHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setTargetTcpProxyResource(targetTcpProxyResource)
    *     .build();
    *   ApiFuture<Operation> future = targetTcpProxyClient.insertTargetTcpProxyCallable().futureCall(request);
@@ -531,9 +531,9 @@ public final ListTargetTcpProxiesPagedResponse listTargetTcpProxies(String proje
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetTcpProxiesHttpRequest request = ListTargetTcpProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (TargetTcpProxy element : targetTcpProxyClient.listTargetTcpProxies(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -558,9 +558,9 @@ public final ListTargetTcpProxiesPagedResponse listTargetTcpProxies(
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetTcpProxiesHttpRequest request = ListTargetTcpProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListTargetTcpProxiesPagedResponse> future = targetTcpProxyClient.listTargetTcpProxiesPagedCallable().futureCall(request);
    *   // Do something
@@ -584,9 +584,9 @@ public final ListTargetTcpProxiesPagedResponse listTargetTcpProxies(
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListTargetTcpProxiesHttpRequest request = ListTargetTcpProxiesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     TargetTcpProxyList response = targetTcpProxyClient.listTargetTcpProxiesCallable().call(request);
@@ -683,10 +683,10 @@ public final Operation setBackendServiceTargetTcpProxy(
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectGlobalTargetTcpProxyName targetTcpProxy = ProjectGlobalTargetTcpProxyName.of("[PROJECT]", "[TARGET_TCP_PROXY]");
+   *   String formattedTargetTcpProxy = ProjectGlobalTargetTcpProxyName.format("[PROJECT]", "[TARGET_TCP_PROXY]");
    *   TargetTcpProxiesSetBackendServiceRequest targetTcpProxiesSetBackendServiceRequestResource = TargetTcpProxiesSetBackendServiceRequest.newBuilder().build();
    *   SetBackendServiceTargetTcpProxyHttpRequest request = SetBackendServiceTargetTcpProxyHttpRequest.newBuilder()
-   *     .setTargetTcpProxy(targetTcpProxy.toString())
+   *     .setTargetTcpProxy(formattedTargetTcpProxy)
    *     .setTargetTcpProxiesSetBackendServiceRequestResource(targetTcpProxiesSetBackendServiceRequestResource)
    *     .build();
    *   Operation response = targetTcpProxyClient.setBackendServiceTargetTcpProxy(request);
@@ -710,10 +710,10 @@ public final Operation setBackendServiceTargetTcpProxy(
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectGlobalTargetTcpProxyName targetTcpProxy = ProjectGlobalTargetTcpProxyName.of("[PROJECT]", "[TARGET_TCP_PROXY]");
+   *   String formattedTargetTcpProxy = ProjectGlobalTargetTcpProxyName.format("[PROJECT]", "[TARGET_TCP_PROXY]");
    *   TargetTcpProxiesSetBackendServiceRequest targetTcpProxiesSetBackendServiceRequestResource = TargetTcpProxiesSetBackendServiceRequest.newBuilder().build();
    *   SetBackendServiceTargetTcpProxyHttpRequest request = SetBackendServiceTargetTcpProxyHttpRequest.newBuilder()
-   *     .setTargetTcpProxy(targetTcpProxy.toString())
+   *     .setTargetTcpProxy(formattedTargetTcpProxy)
    *     .setTargetTcpProxiesSetBackendServiceRequestResource(targetTcpProxiesSetBackendServiceRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetTcpProxyClient.setBackendServiceTargetTcpProxyCallable().futureCall(request);
@@ -800,10 +800,10 @@ public final Operation setProxyHeaderTargetTcpProxy(
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectGlobalTargetTcpProxyName targetTcpProxy = ProjectGlobalTargetTcpProxyName.of("[PROJECT]", "[TARGET_TCP_PROXY]");
+   *   String formattedTargetTcpProxy = ProjectGlobalTargetTcpProxyName.format("[PROJECT]", "[TARGET_TCP_PROXY]");
    *   TargetTcpProxiesSetProxyHeaderRequest targetTcpProxiesSetProxyHeaderRequestResource = TargetTcpProxiesSetProxyHeaderRequest.newBuilder().build();
    *   SetProxyHeaderTargetTcpProxyHttpRequest request = SetProxyHeaderTargetTcpProxyHttpRequest.newBuilder()
-   *     .setTargetTcpProxy(targetTcpProxy.toString())
+   *     .setTargetTcpProxy(formattedTargetTcpProxy)
    *     .setTargetTcpProxiesSetProxyHeaderRequestResource(targetTcpProxiesSetProxyHeaderRequestResource)
    *     .build();
    *   Operation response = targetTcpProxyClient.setProxyHeaderTargetTcpProxy(request);
@@ -827,10 +827,10 @@ public final Operation setProxyHeaderTargetTcpProxy(
    *
    * 

    * try (TargetTcpProxyClient targetTcpProxyClient = TargetTcpProxyClient.create()) {
-   *   ProjectGlobalTargetTcpProxyName targetTcpProxy = ProjectGlobalTargetTcpProxyName.of("[PROJECT]", "[TARGET_TCP_PROXY]");
+   *   String formattedTargetTcpProxy = ProjectGlobalTargetTcpProxyName.format("[PROJECT]", "[TARGET_TCP_PROXY]");
    *   TargetTcpProxiesSetProxyHeaderRequest targetTcpProxiesSetProxyHeaderRequestResource = TargetTcpProxiesSetProxyHeaderRequest.newBuilder().build();
    *   SetProxyHeaderTargetTcpProxyHttpRequest request = SetProxyHeaderTargetTcpProxyHttpRequest.newBuilder()
-   *     .setTargetTcpProxy(targetTcpProxy.toString())
+   *     .setTargetTcpProxy(formattedTargetTcpProxy)
    *     .setTargetTcpProxiesSetProxyHeaderRequestResource(targetTcpProxiesSetProxyHeaderRequestResource)
    *     .build();
    *   ApiFuture<Operation> future = targetTcpProxyClient.setProxyHeaderTargetTcpProxyCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayClient.java
index 1d2a4852a2f6..44e66a861eaa 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayClient.java
@@ -216,9 +216,9 @@ public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVp
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetVpnGatewaysHttpRequest request = AggregatedListTargetVpnGatewaysHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (TargetVpnGatewaysScopedList element : targetVpnGatewayClient.aggregatedListTargetVpnGateways(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -243,9 +243,9 @@ public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVp
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetVpnGatewaysHttpRequest request = AggregatedListTargetVpnGatewaysHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListTargetVpnGatewaysPagedResponse> future = targetVpnGatewayClient.aggregatedListTargetVpnGatewaysPagedCallable().futureCall(request);
    *   // Do something
@@ -270,9 +270,9 @@ public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVp
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetVpnGatewaysHttpRequest request = AggregatedListTargetVpnGatewaysHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     TargetVpnGatewayAggregatedList response = targetVpnGatewayClient.aggregatedListTargetVpnGatewaysCallable().call(request);
@@ -357,9 +357,9 @@ public final Operation deleteTargetVpnGateway(String targetVpnGateway) {
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionTargetVpnGatewayName targetVpnGateway = ProjectRegionTargetVpnGatewayName.of("[PROJECT]", "[REGION]", "[TARGET_VPN_GATEWAY]");
+   *   String formattedTargetVpnGateway = ProjectRegionTargetVpnGatewayName.format("[PROJECT]", "[REGION]", "[TARGET_VPN_GATEWAY]");
    *   DeleteTargetVpnGatewayHttpRequest request = DeleteTargetVpnGatewayHttpRequest.newBuilder()
-   *     .setTargetVpnGateway(targetVpnGateway.toString())
+   *     .setTargetVpnGateway(formattedTargetVpnGateway)
    *     .build();
    *   Operation response = targetVpnGatewayClient.deleteTargetVpnGateway(request);
    * }
@@ -381,9 +381,9 @@ public final Operation deleteTargetVpnGateway(DeleteTargetVpnGatewayHttpRequest
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionTargetVpnGatewayName targetVpnGateway = ProjectRegionTargetVpnGatewayName.of("[PROJECT]", "[REGION]", "[TARGET_VPN_GATEWAY]");
+   *   String formattedTargetVpnGateway = ProjectRegionTargetVpnGatewayName.format("[PROJECT]", "[REGION]", "[TARGET_VPN_GATEWAY]");
    *   DeleteTargetVpnGatewayHttpRequest request = DeleteTargetVpnGatewayHttpRequest.newBuilder()
-   *     .setTargetVpnGateway(targetVpnGateway.toString())
+   *     .setTargetVpnGateway(formattedTargetVpnGateway)
    *     .build();
    *   ApiFuture<Operation> future = targetVpnGatewayClient.deleteTargetVpnGatewayCallable().futureCall(request);
    *   // Do something
@@ -459,9 +459,9 @@ public final TargetVpnGateway getTargetVpnGateway(String targetVpnGateway) {
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionTargetVpnGatewayName targetVpnGateway = ProjectRegionTargetVpnGatewayName.of("[PROJECT]", "[REGION]", "[TARGET_VPN_GATEWAY]");
+   *   String formattedTargetVpnGateway = ProjectRegionTargetVpnGatewayName.format("[PROJECT]", "[REGION]", "[TARGET_VPN_GATEWAY]");
    *   GetTargetVpnGatewayHttpRequest request = GetTargetVpnGatewayHttpRequest.newBuilder()
-   *     .setTargetVpnGateway(targetVpnGateway.toString())
+   *     .setTargetVpnGateway(formattedTargetVpnGateway)
    *     .build();
    *   TargetVpnGateway response = targetVpnGatewayClient.getTargetVpnGateway(request);
    * }
@@ -484,9 +484,9 @@ public final TargetVpnGateway getTargetVpnGateway(GetTargetVpnGatewayHttpRequest
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionTargetVpnGatewayName targetVpnGateway = ProjectRegionTargetVpnGatewayName.of("[PROJECT]", "[REGION]", "[TARGET_VPN_GATEWAY]");
+   *   String formattedTargetVpnGateway = ProjectRegionTargetVpnGatewayName.format("[PROJECT]", "[REGION]", "[TARGET_VPN_GATEWAY]");
    *   GetTargetVpnGatewayHttpRequest request = GetTargetVpnGatewayHttpRequest.newBuilder()
-   *     .setTargetVpnGateway(targetVpnGateway.toString())
+   *     .setTargetVpnGateway(formattedTargetVpnGateway)
    *     .build();
    *   ApiFuture<TargetVpnGateway> future = targetVpnGatewayClient.getTargetVpnGatewayCallable().futureCall(request);
    *   // Do something
@@ -573,10 +573,10 @@ public final Operation insertTargetVpnGateway(
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   TargetVpnGateway targetVpnGatewayResource = TargetVpnGateway.newBuilder().build();
    *   InsertTargetVpnGatewayHttpRequest request = InsertTargetVpnGatewayHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setTargetVpnGatewayResource(targetVpnGatewayResource)
    *     .build();
    *   Operation response = targetVpnGatewayClient.insertTargetVpnGateway(request);
@@ -600,10 +600,10 @@ public final Operation insertTargetVpnGateway(InsertTargetVpnGatewayHttpRequest
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   TargetVpnGateway targetVpnGatewayResource = TargetVpnGateway.newBuilder().build();
    *   InsertTargetVpnGatewayHttpRequest request = InsertTargetVpnGatewayHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setTargetVpnGatewayResource(targetVpnGatewayResource)
    *     .build();
    *   ApiFuture<Operation> future = targetVpnGatewayClient.insertTargetVpnGatewayCallable().futureCall(request);
@@ -678,9 +678,9 @@ public final ListTargetVpnGatewaysPagedResponse listTargetVpnGateways(String reg
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListTargetVpnGatewaysHttpRequest request = ListTargetVpnGatewaysHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (TargetVpnGateway element : targetVpnGatewayClient.listTargetVpnGateways(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -705,9 +705,9 @@ public final ListTargetVpnGatewaysPagedResponse listTargetVpnGateways(
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListTargetVpnGatewaysHttpRequest request = ListTargetVpnGatewaysHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListTargetVpnGatewaysPagedResponse> future = targetVpnGatewayClient.listTargetVpnGatewaysPagedCallable().futureCall(request);
    *   // Do something
@@ -731,9 +731,9 @@ public final ListTargetVpnGatewaysPagedResponse listTargetVpnGateways(
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListTargetVpnGatewaysHttpRequest request = ListTargetVpnGatewaysHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     TargetVpnGatewayList response = targetVpnGatewayClient.listTargetVpnGatewaysCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkEndpointGroupHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkEndpointGroupHttpRequest.java
new file mode 100644
index 000000000000..ac0068c8d8b5
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkEndpointGroupHttpRequest.java
@@ -0,0 +1,472 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.networkEndpointGroups.testIamPermissions. Returns permissions
+ * that a caller has on the specified resource.
+ */
+public final class TestIamPermissionsNetworkEndpointGroupHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String key;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String resource;
+  private final TestPermissionsRequest testPermissionsRequestResource;
+  private final String userIp;
+
+  private TestIamPermissionsNetworkEndpointGroupHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.key = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.resource = null;
+    this.testPermissionsRequestResource = null;
+    this.userIp = null;
+  }
+
+  private TestIamPermissionsNetworkEndpointGroupHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String key,
+      String prettyPrint,
+      String quotaUser,
+      String resource,
+      TestPermissionsRequest testPermissionsRequestResource,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.key = key;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.resource = resource;
+    this.testPermissionsRequestResource = testPermissionsRequestResource;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("resource".equals(fieldName)) {
+      return resource;
+    }
+    if ("testPermissionsRequestResource".equals(fieldName)) {
+      return testPermissionsRequestResource;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public TestPermissionsRequest getApiMessageRequestBody() {
+    return testPermissionsRequestResource;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /**
+   * Name or id of the resource for this request. It must have the format
+   * `{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions`. \`{resource}\`
+   * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes
+   * (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent
+   * * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not
+   * start with \`"goog"\`.
+   */
+  public String getResource() {
+    return resource;
+  }
+
+  public TestPermissionsRequest getTestPermissionsRequestResource() {
+    return testPermissionsRequestResource;
+  }
+
+  /** IP address of the end user for whom the API call is being made. */
+  public String getUserIp() {
+    return userIp;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(TestIamPermissionsNetworkEndpointGroupHttpRequest prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static TestIamPermissionsNetworkEndpointGroupHttpRequest getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final TestIamPermissionsNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new TestIamPermissionsNetworkEndpointGroupHttpRequest();
+  }
+
+  public static class Builder {
+    private String access_token;
+    private String callback;
+    private String fields;
+    private String key;
+    private String prettyPrint;
+    private String quotaUser;
+    private String resource;
+    private TestPermissionsRequest testPermissionsRequestResource;
+    private String userIp;
+
+    Builder() {}
+
+    public Builder mergeFrom(TestIamPermissionsNetworkEndpointGroupHttpRequest other) {
+      if (other == TestIamPermissionsNetworkEndpointGroupHttpRequest.getDefaultInstance())
+        return this;
+      if (other.getAccessToken() != null) {
+        this.access_token = other.access_token;
+      }
+      if (other.getCallback() != null) {
+        this.callback = other.callback;
+      }
+      if (other.getFields() != null) {
+        this.fields = other.fields;
+      }
+      if (other.getKey() != null) {
+        this.key = other.key;
+      }
+      if (other.getPrettyPrint() != null) {
+        this.prettyPrint = other.prettyPrint;
+      }
+      if (other.getQuotaUser() != null) {
+        this.quotaUser = other.quotaUser;
+      }
+      if (other.getResource() != null) {
+        this.resource = other.resource;
+      }
+      if (other.getTestPermissionsRequestResource() != null) {
+        this.testPermissionsRequestResource = other.testPermissionsRequestResource;
+      }
+      if (other.getUserIp() != null) {
+        this.userIp = other.userIp;
+      }
+      return this;
+    }
+
+    Builder(TestIamPermissionsNetworkEndpointGroupHttpRequest source) {
+      this.access_token = source.access_token;
+      this.callback = source.callback;
+      this.fields = source.fields;
+      this.key = source.key;
+      this.prettyPrint = source.prettyPrint;
+      this.quotaUser = source.quotaUser;
+      this.resource = source.resource;
+      this.testPermissionsRequestResource = source.testPermissionsRequestResource;
+      this.userIp = source.userIp;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public String getAccessToken() {
+      return access_token;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public Builder setAccessToken(String access_token) {
+      this.access_token = access_token;
+      return this;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public String getCallback() {
+      return callback;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public Builder setCallback(String callback) {
+      this.callback = callback;
+      return this;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public String getFields() {
+      return fields;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public Builder setFields(String fields) {
+      this.fields = fields;
+      return this;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public String getKey() {
+      return key;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public Builder setKey(String key) {
+      this.key = key;
+      return this;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public String getPrettyPrint() {
+      return prettyPrint;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public Builder setPrettyPrint(String prettyPrint) {
+      this.prettyPrint = prettyPrint;
+      return this;
+    }
+
+    /** Alternative to userIp. */
+    public String getQuotaUser() {
+      return quotaUser;
+    }
+
+    /** Alternative to userIp. */
+    public Builder setQuotaUser(String quotaUser) {
+      this.quotaUser = quotaUser;
+      return this;
+    }
+
+    /**
+     * Name or id of the resource for this request. It must have the format
+     * `{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions`. \`{resource}\`
+     * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`),
+     * dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or
+     * percent * signs (\`%\`). It must be between 3 and 255 characters in length, and it *
+     * must not start with \`"goog"\`.
+     */
+    public String getResource() {
+      return resource;
+    }
+
+    /**
+     * Name or id of the resource for this request. It must have the format
+     * `{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions`. \`{resource}\`
+     * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`),
+     * dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or
+     * percent * signs (\`%\`). It must be between 3 and 255 characters in length, and it *
+     * must not start with \`"goog"\`.
+     */
+    public Builder setResource(String resource) {
+      this.resource = resource;
+      return this;
+    }
+
+    public TestPermissionsRequest getTestPermissionsRequestResource() {
+      return testPermissionsRequestResource;
+    }
+
+    public Builder setTestPermissionsRequestResource(
+        TestPermissionsRequest testPermissionsRequestResource) {
+      this.testPermissionsRequestResource = testPermissionsRequestResource;
+      return this;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public String getUserIp() {
+      return userIp;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public Builder setUserIp(String userIp) {
+      this.userIp = userIp;
+      return this;
+    }
+
+    public TestIamPermissionsNetworkEndpointGroupHttpRequest build() {
+      String missing = "";
+
+      if (resource == null) {
+        missing += " resource";
+      }
+
+      if (!missing.isEmpty()) {
+        throw new IllegalStateException("Missing required properties:" + missing);
+      }
+      return new TestIamPermissionsNetworkEndpointGroupHttpRequest(
+          access_token,
+          callback,
+          fields,
+          key,
+          prettyPrint,
+          quotaUser,
+          resource,
+          testPermissionsRequestResource,
+          userIp);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setAccessToken(this.access_token);
+      newBuilder.setCallback(this.callback);
+      newBuilder.setFields(this.fields);
+      newBuilder.setKey(this.key);
+      newBuilder.setPrettyPrint(this.prettyPrint);
+      newBuilder.setQuotaUser(this.quotaUser);
+      newBuilder.setResource(this.resource);
+      newBuilder.setTestPermissionsRequestResource(this.testPermissionsRequestResource);
+      newBuilder.setUserIp(this.userIp);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "TestIamPermissionsNetworkEndpointGroupHttpRequest{"
+        + "access_token="
+        + access_token
+        + ", "
+        + "callback="
+        + callback
+        + ", "
+        + "fields="
+        + fields
+        + ", "
+        + "key="
+        + key
+        + ", "
+        + "prettyPrint="
+        + prettyPrint
+        + ", "
+        + "quotaUser="
+        + quotaUser
+        + ", "
+        + "resource="
+        + resource
+        + ", "
+        + "testPermissionsRequestResource="
+        + testPermissionsRequestResource
+        + ", "
+        + "userIp="
+        + userIp
+        + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof TestIamPermissionsNetworkEndpointGroupHttpRequest) {
+      TestIamPermissionsNetworkEndpointGroupHttpRequest that =
+          (TestIamPermissionsNetworkEndpointGroupHttpRequest) o;
+      return Objects.equals(this.access_token, that.getAccessToken())
+          && Objects.equals(this.callback, that.getCallback())
+          && Objects.equals(this.fields, that.getFields())
+          && Objects.equals(this.key, that.getKey())
+          && Objects.equals(this.prettyPrint, that.getPrettyPrint())
+          && Objects.equals(this.quotaUser, that.getQuotaUser())
+          && Objects.equals(this.resource, that.getResource())
+          && Objects.equals(
+              this.testPermissionsRequestResource, that.getTestPermissionsRequestResource())
+          && Objects.equals(this.userIp, that.getUserIp());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(
+        access_token,
+        callback,
+        fields,
+        key,
+        prettyPrint,
+        quotaUser,
+        resource,
+        testPermissionsRequestResource,
+        userIp);
+  }
+}
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UpdateShieldedInstanceConfigInstanceHttpRequest.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UpdateShieldedInstanceConfigInstanceHttpRequest.java
new file mode 100644
index 000000000000..197e847baecb
--- /dev/null
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UpdateShieldedInstanceConfigInstanceHttpRequest.java
@@ -0,0 +1,607 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.instances.updateShieldedInstanceConfig. Updates the Shielded
+ * Instance config for an instance. You can only use this method on a stopped instance. This method
+ * supports PATCH semantics and uses the JSON merge patch format and processing rules.
+ */
+public final class UpdateShieldedInstanceConfigInstanceHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final List fieldMask;
+  private final String fields;
+  private final String instance;
+  private final String key;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String requestId;
+  private final ShieldedInstanceConfig shieldedInstanceConfigResource;
+  private final String userIp;
+
+  private UpdateShieldedInstanceConfigInstanceHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fieldMask = null;
+    this.fields = null;
+    this.instance = null;
+    this.key = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.requestId = null;
+    this.shieldedInstanceConfigResource = null;
+    this.userIp = null;
+  }
+
+  private UpdateShieldedInstanceConfigInstanceHttpRequest(
+      String access_token,
+      String callback,
+      List fieldMask,
+      String fields,
+      String instance,
+      String key,
+      String prettyPrint,
+      String quotaUser,
+      String requestId,
+      ShieldedInstanceConfig shieldedInstanceConfigResource,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fieldMask = fieldMask;
+    this.fields = fields;
+    this.instance = instance;
+    this.key = key;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.requestId = requestId;
+    this.shieldedInstanceConfigResource = shieldedInstanceConfigResource;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fieldMask".equals(fieldName)) {
+      return fieldMask;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("instance".equals(fieldName)) {
+      return instance;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("requestId".equals(fieldName)) {
+      return requestId;
+    }
+    if ("shieldedInstanceConfigResource".equals(fieldName)) {
+      return shieldedInstanceConfigResource;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ShieldedInstanceConfig getApiMessageRequestBody() {
+    return shieldedInstanceConfigResource;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return fieldMask;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /**
+   * Name or id of the instance scoping this request. It must have the format
+   * `{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig`. \`{instance}\` must
+   * start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes
+   * (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent
+   * * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not
+   * start with \`"goog"\`.
+   */
+  public String getInstance() {
+    return instance;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /**
+   * 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). + */ + public String getRequestId() { + return requestId; + } + + /** A set of Shielded Instance options. */ + public ShieldedInstanceConfig getShieldedInstanceConfigResource() { + return shieldedInstanceConfigResource; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(UpdateShieldedInstanceConfigInstanceHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static UpdateShieldedInstanceConfigInstanceHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final UpdateShieldedInstanceConfigInstanceHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new UpdateShieldedInstanceConfigInstanceHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private List fieldMask; + private String fields; + private String instance; + private String key; + private String prettyPrint; + private String quotaUser; + private String requestId; + private ShieldedInstanceConfig shieldedInstanceConfigResource; + private String userIp; + + Builder() {} + + public Builder mergeFrom(UpdateShieldedInstanceConfigInstanceHttpRequest other) { + if (other == UpdateShieldedInstanceConfigInstanceHttpRequest.getDefaultInstance()) + return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFieldMask() != null) { + this.fieldMask = other.fieldMask; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getInstance() != null) { + this.instance = other.instance; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getShieldedInstanceConfigResource() != null) { + this.shieldedInstanceConfigResource = other.shieldedInstanceConfigResource; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(UpdateShieldedInstanceConfigInstanceHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fieldMask = source.fieldMask; + this.fields = source.fields; + this.instance = source.instance; + this.key = source.key; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.shieldedInstanceConfigResource = source.shieldedInstanceConfigResource; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return fieldMask; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public Builder addAllFieldMask(List fieldMask) { + if (this.fieldMask == null) { + this.fieldMask = new LinkedList<>(); + } + this.fieldMask.addAll(fieldMask); + return this; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public Builder addFieldMask(String fieldMask) { + if (this.fieldMask == null) { + this.fieldMask = new LinkedList<>(); + } + this.fieldMask.add(fieldMask); + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** + * Name or id of the instance scoping this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig`. \`{instance}\` + * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), + * dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or + * percent * signs (\`%\`). It must be between 3 and 255 characters in length, and it * + * must not start with \`"goog"\`. + */ + public String getInstance() { + return instance; + } + + /** + * Name or id of the instance scoping this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig`. \`{instance}\` + * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), + * dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or + * percent * signs (\`%\`). It must be between 3 and 255 characters in length, and it * + * must not start with \`"goog"\`. + */ + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + 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). + */ + public String getRequestId() { + return 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). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** A set of Shielded Instance options. */ + public ShieldedInstanceConfig getShieldedInstanceConfigResource() { + return shieldedInstanceConfigResource; + } + + /** A set of Shielded Instance options. */ + public Builder setShieldedInstanceConfigResource( + ShieldedInstanceConfig shieldedInstanceConfigResource) { + this.shieldedInstanceConfigResource = shieldedInstanceConfigResource; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public UpdateShieldedInstanceConfigInstanceHttpRequest build() { + String missing = ""; + + if (fieldMask == null) { + missing += " fieldMask"; + } + + if (instance == null) { + missing += " instance"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new UpdateShieldedInstanceConfigInstanceHttpRequest( + access_token, + callback, + fieldMask, + fields, + instance, + key, + prettyPrint, + quotaUser, + requestId, + shieldedInstanceConfigResource, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.addAllFieldMask(this.fieldMask); + newBuilder.setFields(this.fields); + newBuilder.setInstance(this.instance); + newBuilder.setKey(this.key); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setShieldedInstanceConfigResource(this.shieldedInstanceConfigResource); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "UpdateShieldedInstanceConfigInstanceHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fieldMask=" + + fieldMask + + ", " + + "fields=" + + fields + + ", " + + "instance=" + + instance + + ", " + + "key=" + + key + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "shieldedInstanceConfigResource=" + + shieldedInstanceConfigResource + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof UpdateShieldedInstanceConfigInstanceHttpRequest) { + UpdateShieldedInstanceConfigInstanceHttpRequest that = + (UpdateShieldedInstanceConfigInstanceHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fieldMask, that.getFieldMask()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.instance, that.getInstance()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals( + this.shieldedInstanceConfigResource, that.getShieldedInstanceConfigResource()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fieldMask, + fields, + instance, + key, + prettyPrint, + quotaUser, + requestId, + shieldedInstanceConfigResource, + userIp); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java index ae06a360973c..2673953723ad 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java @@ -209,9 +209,9 @@ public final Operation deleteUrlMap(String urlMap) { * *


    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   DeleteUrlMapHttpRequest request = DeleteUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .build();
    *   Operation response = urlMapClient.deleteUrlMap(request);
    * }
@@ -233,9 +233,9 @@ public final Operation deleteUrlMap(DeleteUrlMapHttpRequest request) {
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   DeleteUrlMapHttpRequest request = DeleteUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .build();
    *   ApiFuture<Operation> future = urlMapClient.deleteUrlMapCallable().futureCall(request);
    *   // Do something
@@ -308,9 +308,9 @@ public final UrlMap getUrlMap(String urlMap) {
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   GetUrlMapHttpRequest request = GetUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .build();
    *   UrlMap response = urlMapClient.getUrlMap(request);
    * }
@@ -333,9 +333,9 @@ public final UrlMap getUrlMap(GetUrlMapHttpRequest request) {
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   GetUrlMapHttpRequest request = GetUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .build();
    *   ApiFuture<UrlMap> future = urlMapClient.getUrlMapCallable().futureCall(request);
    *   // Do something
@@ -416,10 +416,10 @@ public final Operation insertUrlMap(String project, UrlMap urlMapResource) {
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   UrlMap urlMapResource = UrlMap.newBuilder().build();
    *   InsertUrlMapHttpRequest request = InsertUrlMapHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setUrlMapResource(urlMapResource)
    *     .build();
    *   Operation response = urlMapClient.insertUrlMap(request);
@@ -442,10 +442,10 @@ public final Operation insertUrlMap(InsertUrlMapHttpRequest request) {
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   UrlMap urlMapResource = UrlMap.newBuilder().build();
    *   InsertUrlMapHttpRequest request = InsertUrlMapHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .setUrlMapResource(urlMapResource)
    *     .build();
    *   ApiFuture<Operation> future = urlMapClient.insertUrlMapCallable().futureCall(request);
@@ -530,10 +530,10 @@ public final Operation invalidateCacheUrlMap(
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   CacheInvalidationRule cacheInvalidationRuleResource = CacheInvalidationRule.newBuilder().build();
    *   InvalidateCacheUrlMapHttpRequest request = InvalidateCacheUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .setCacheInvalidationRuleResource(cacheInvalidationRuleResource)
    *     .build();
    *   Operation response = urlMapClient.invalidateCacheUrlMap(request);
@@ -557,10 +557,10 @@ public final Operation invalidateCacheUrlMap(InvalidateCacheUrlMapHttpRequest re
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   CacheInvalidationRule cacheInvalidationRuleResource = CacheInvalidationRule.newBuilder().build();
    *   InvalidateCacheUrlMapHttpRequest request = InvalidateCacheUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .setCacheInvalidationRuleResource(cacheInvalidationRuleResource)
    *     .build();
    *   ApiFuture<Operation> future = urlMapClient.invalidateCacheUrlMapCallable().futureCall(request);
@@ -635,9 +635,9 @@ public final ListUrlMapsPagedResponse listUrlMaps(String project) {
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListUrlMapsHttpRequest request = ListUrlMapsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (UrlMap element : urlMapClient.listUrlMaps(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -661,9 +661,9 @@ public final ListUrlMapsPagedResponse listUrlMaps(ListUrlMapsHttpRequest request
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListUrlMapsHttpRequest request = ListUrlMapsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListUrlMapsPagedResponse> future = urlMapClient.listUrlMapsPagedCallable().futureCall(request);
    *   // Do something
@@ -687,9 +687,9 @@ public final ListUrlMapsPagedResponse listUrlMaps(ListUrlMapsHttpRequest request
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListUrlMapsHttpRequest request = ListUrlMapsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     UrlMapList response = urlMapClient.listUrlMapsCallable().call(request);
@@ -795,11 +795,11 @@ public final Operation patchUrlMap(String urlMap, UrlMap urlMapResource, List
    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   UrlMap urlMapResource = UrlMap.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchUrlMapHttpRequest request = PatchUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .setUrlMapResource(urlMapResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -824,11 +824,11 @@ public final Operation patchUrlMap(PatchUrlMapHttpRequest request) {
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   UrlMap urlMapResource = UrlMap.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   PatchUrlMapHttpRequest request = PatchUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .setUrlMapResource(urlMapResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -925,11 +925,11 @@ public final Operation updateUrlMap(
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   UrlMap urlMapResource = UrlMap.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateUrlMapHttpRequest request = UpdateUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .setUrlMapResource(urlMapResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -953,11 +953,11 @@ public final Operation updateUrlMap(UpdateUrlMapHttpRequest request) {
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   UrlMap urlMapResource = UrlMap.newBuilder().build();
    *   List<String> fieldMask = new ArrayList<>();
    *   UpdateUrlMapHttpRequest request = UpdateUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .setUrlMapResource(urlMapResource)
    *     .addAllFieldMask(fieldMask)
    *     .build();
@@ -1043,10 +1043,10 @@ public final UrlMapsValidateResponse validateUrlMap(
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   UrlMapsValidateRequest urlMapsValidateRequestResource = UrlMapsValidateRequest.newBuilder().build();
    *   ValidateUrlMapHttpRequest request = ValidateUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .setUrlMapsValidateRequestResource(urlMapsValidateRequestResource)
    *     .build();
    *   UrlMapsValidateResponse response = urlMapClient.validateUrlMap(request);
@@ -1070,10 +1070,10 @@ public final UrlMapsValidateResponse validateUrlMap(ValidateUrlMapHttpRequest re
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
-   *   ProjectGlobalUrlMapName urlMap = ProjectGlobalUrlMapName.of("[PROJECT]", "[URL_MAP]");
+   *   String formattedUrlMap = ProjectGlobalUrlMapName.format("[PROJECT]", "[URL_MAP]");
    *   UrlMapsValidateRequest urlMapsValidateRequestResource = UrlMapsValidateRequest.newBuilder().build();
    *   ValidateUrlMapHttpRequest request = ValidateUrlMapHttpRequest.newBuilder()
-   *     .setUrlMap(urlMap.toString())
+   *     .setUrlMap(formattedUrlMap)
    *     .setUrlMapsValidateRequestResource(urlMapsValidateRequestResource)
    *     .build();
    *   ApiFuture<UrlMapsValidateResponse> future = urlMapClient.validateUrlMapCallable().futureCall(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VpnTunnelClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VpnTunnelClient.java
index d70c1633ed9b..e01b69fcea2f 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VpnTunnelClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VpnTunnelClient.java
@@ -211,9 +211,9 @@ public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(Stri
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnTunnelsHttpRequest request = AggregatedListVpnTunnelsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (VpnTunnelsScopedList element : vpnTunnelClient.aggregatedListVpnTunnels(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -238,9 +238,9 @@ public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnTunnelsHttpRequest request = AggregatedListVpnTunnelsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListVpnTunnelsPagedResponse> future = vpnTunnelClient.aggregatedListVpnTunnelsPagedCallable().futureCall(request);
    *   // Do something
@@ -265,9 +265,9 @@ public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnTunnelsHttpRequest request = AggregatedListVpnTunnelsHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     VpnTunnelAggregatedList response = vpnTunnelClient.aggregatedListVpnTunnelsCallable().call(request);
@@ -348,9 +348,9 @@ public final Operation deleteVpnTunnel(String vpnTunnel) {
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionVpnTunnelName vpnTunnel = ProjectRegionVpnTunnelName.of("[PROJECT]", "[REGION]", "[VPN_TUNNEL]");
+   *   String formattedVpnTunnel = ProjectRegionVpnTunnelName.format("[PROJECT]", "[REGION]", "[VPN_TUNNEL]");
    *   DeleteVpnTunnelHttpRequest request = DeleteVpnTunnelHttpRequest.newBuilder()
-   *     .setVpnTunnel(vpnTunnel.toString())
+   *     .setVpnTunnel(formattedVpnTunnel)
    *     .build();
    *   Operation response = vpnTunnelClient.deleteVpnTunnel(request);
    * }
@@ -372,9 +372,9 @@ public final Operation deleteVpnTunnel(DeleteVpnTunnelHttpRequest request) {
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionVpnTunnelName vpnTunnel = ProjectRegionVpnTunnelName.of("[PROJECT]", "[REGION]", "[VPN_TUNNEL]");
+   *   String formattedVpnTunnel = ProjectRegionVpnTunnelName.format("[PROJECT]", "[REGION]", "[VPN_TUNNEL]");
    *   DeleteVpnTunnelHttpRequest request = DeleteVpnTunnelHttpRequest.newBuilder()
-   *     .setVpnTunnel(vpnTunnel.toString())
+   *     .setVpnTunnel(formattedVpnTunnel)
    *     .build();
    *   ApiFuture<Operation> future = vpnTunnelClient.deleteVpnTunnelCallable().futureCall(request);
    *   // Do something
@@ -448,9 +448,9 @@ public final VpnTunnel getVpnTunnel(String vpnTunnel) {
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionVpnTunnelName vpnTunnel = ProjectRegionVpnTunnelName.of("[PROJECT]", "[REGION]", "[VPN_TUNNEL]");
+   *   String formattedVpnTunnel = ProjectRegionVpnTunnelName.format("[PROJECT]", "[REGION]", "[VPN_TUNNEL]");
    *   GetVpnTunnelHttpRequest request = GetVpnTunnelHttpRequest.newBuilder()
-   *     .setVpnTunnel(vpnTunnel.toString())
+   *     .setVpnTunnel(formattedVpnTunnel)
    *     .build();
    *   VpnTunnel response = vpnTunnelClient.getVpnTunnel(request);
    * }
@@ -473,9 +473,9 @@ public final VpnTunnel getVpnTunnel(GetVpnTunnelHttpRequest request) {
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionVpnTunnelName vpnTunnel = ProjectRegionVpnTunnelName.of("[PROJECT]", "[REGION]", "[VPN_TUNNEL]");
+   *   String formattedVpnTunnel = ProjectRegionVpnTunnelName.format("[PROJECT]", "[REGION]", "[VPN_TUNNEL]");
    *   GetVpnTunnelHttpRequest request = GetVpnTunnelHttpRequest.newBuilder()
-   *     .setVpnTunnel(vpnTunnel.toString())
+   *     .setVpnTunnel(formattedVpnTunnel)
    *     .build();
    *   ApiFuture<VpnTunnel> future = vpnTunnelClient.getVpnTunnelCallable().futureCall(request);
    *   // Do something
@@ -559,10 +559,10 @@ public final Operation insertVpnTunnel(String region, VpnTunnel vpnTunnelResourc
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   VpnTunnel vpnTunnelResource = VpnTunnel.newBuilder().build();
    *   InsertVpnTunnelHttpRequest request = InsertVpnTunnelHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setVpnTunnelResource(vpnTunnelResource)
    *     .build();
    *   Operation response = vpnTunnelClient.insertVpnTunnel(request);
@@ -586,10 +586,10 @@ public final Operation insertVpnTunnel(InsertVpnTunnelHttpRequest request) {
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   VpnTunnel vpnTunnelResource = VpnTunnel.newBuilder().build();
    *   InsertVpnTunnelHttpRequest request = InsertVpnTunnelHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .setVpnTunnelResource(vpnTunnelResource)
    *     .build();
    *   ApiFuture<Operation> future = vpnTunnelClient.insertVpnTunnelCallable().futureCall(request);
@@ -663,9 +663,9 @@ public final ListVpnTunnelsPagedResponse listVpnTunnels(String region) {
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListVpnTunnelsHttpRequest request = ListVpnTunnelsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   for (VpnTunnel element : vpnTunnelClient.listVpnTunnels(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -689,9 +689,9 @@ public final ListVpnTunnelsPagedResponse listVpnTunnels(ListVpnTunnelsHttpReques
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListVpnTunnelsHttpRequest request = ListVpnTunnelsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   ApiFuture<ListVpnTunnelsPagedResponse> future = vpnTunnelClient.listVpnTunnelsPagedCallable().futureCall(request);
    *   // Do something
@@ -715,9 +715,9 @@ public final ListVpnTunnelsPagedResponse listVpnTunnels(ListVpnTunnelsHttpReques
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
-   *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
+   *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
    *   ListVpnTunnelsHttpRequest request = ListVpnTunnelsHttpRequest.newBuilder()
-   *     .setRegion(region.toString())
+   *     .setRegion(formattedRegion)
    *     .build();
    *   while (true) {
    *     VpnTunnelList response = vpnTunnelClient.listVpnTunnelsCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneClient.java
index 312bd9bcb0e9..9f009716b4d0 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneClient.java
@@ -206,9 +206,9 @@ public final Zone getZone(String zone) {
    *
    * 

    * try (ZoneClient zoneClient = ZoneClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   GetZoneHttpRequest request = GetZoneHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   Zone response = zoneClient.getZone(request);
    * }
@@ -230,9 +230,9 @@ public final Zone getZone(GetZoneHttpRequest request) {
    *
    * 

    * try (ZoneClient zoneClient = ZoneClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   GetZoneHttpRequest request = GetZoneHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<Zone> future = zoneClient.getZoneCallable().futureCall(request);
    *   // Do something
@@ -304,9 +304,9 @@ public final ListZonesPagedResponse listZones(String project) {
    *
    * 

    * try (ZoneClient zoneClient = ZoneClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListZonesHttpRequest request = ListZonesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   for (Zone element : zoneClient.listZones(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -330,9 +330,9 @@ public final ListZonesPagedResponse listZones(ListZonesHttpRequest request) {
    *
    * 

    * try (ZoneClient zoneClient = ZoneClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListZonesHttpRequest request = ListZonesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<ListZonesPagedResponse> future = zoneClient.listZonesPagedCallable().futureCall(request);
    *   // Do something
@@ -356,9 +356,9 @@ public final ListZonesPagedResponse listZones(ListZonesHttpRequest request) {
    *
    * 

    * try (ZoneClient zoneClient = ZoneClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   String formattedProject = ProjectName.format("[PROJECT]");
    *   ListZonesHttpRequest request = ListZonesHttpRequest.newBuilder()
-   *     .setProject(project.toString())
+   *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
    *     ZoneList response = zoneClient.listZonesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneOperationClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneOperationClient.java
index 0f8e668bb93d..84e753551fe4 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneOperationClient.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneOperationClient.java
@@ -211,9 +211,9 @@ public final void deleteZoneOperation(String operation) {
    *
    * 

    * try (ZoneOperationClient zoneOperationClient = ZoneOperationClient.create()) {
-   *   ProjectZoneOperationName operation = ProjectZoneOperationName.of("[PROJECT]", "[ZONE]", "[OPERATION]");
+   *   String formattedOperation = ProjectZoneOperationName.format("[PROJECT]", "[ZONE]", "[OPERATION]");
    *   DeleteZoneOperationHttpRequest request = DeleteZoneOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   zoneOperationClient.deleteZoneOperation(request);
    * }
@@ -235,9 +235,9 @@ public final void deleteZoneOperation(DeleteZoneOperationHttpRequest request) {
    *
    * 

    * try (ZoneOperationClient zoneOperationClient = ZoneOperationClient.create()) {
-   *   ProjectZoneOperationName operation = ProjectZoneOperationName.of("[PROJECT]", "[ZONE]", "[OPERATION]");
+   *   String formattedOperation = ProjectZoneOperationName.format("[PROJECT]", "[ZONE]", "[OPERATION]");
    *   DeleteZoneOperationHttpRequest request = DeleteZoneOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   ApiFuture<Void> future = zoneOperationClient.deleteZoneOperationCallable().futureCall(request);
    *   // Do something
@@ -308,9 +308,9 @@ public final Operation getZoneOperation(String operation) {
    *
    * 

    * try (ZoneOperationClient zoneOperationClient = ZoneOperationClient.create()) {
-   *   ProjectZoneOperationName operation = ProjectZoneOperationName.of("[PROJECT]", "[ZONE]", "[OPERATION]");
+   *   String formattedOperation = ProjectZoneOperationName.format("[PROJECT]", "[ZONE]", "[OPERATION]");
    *   GetZoneOperationHttpRequest request = GetZoneOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   Operation response = zoneOperationClient.getZoneOperation(request);
    * }
@@ -332,9 +332,9 @@ public final Operation getZoneOperation(GetZoneOperationHttpRequest request) {
    *
    * 

    * try (ZoneOperationClient zoneOperationClient = ZoneOperationClient.create()) {
-   *   ProjectZoneOperationName operation = ProjectZoneOperationName.of("[PROJECT]", "[ZONE]", "[OPERATION]");
+   *   String formattedOperation = ProjectZoneOperationName.format("[PROJECT]", "[ZONE]", "[OPERATION]");
    *   GetZoneOperationHttpRequest request = GetZoneOperationHttpRequest.newBuilder()
-   *     .setOperation(operation.toString())
+   *     .setOperation(formattedOperation)
    *     .build();
    *   ApiFuture<Operation> future = zoneOperationClient.getZoneOperationCallable().futureCall(request);
    *   // Do something
@@ -407,9 +407,9 @@ public final ListZoneOperationsPagedResponse listZoneOperations(String zone) {
    *
    * 

    * try (ZoneOperationClient zoneOperationClient = ZoneOperationClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListZoneOperationsHttpRequest request = ListZoneOperationsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   for (Operation element : zoneOperationClient.listZoneOperations(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -434,9 +434,9 @@ public final ListZoneOperationsPagedResponse listZoneOperations(
    *
    * 

    * try (ZoneOperationClient zoneOperationClient = ZoneOperationClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListZoneOperationsHttpRequest request = ListZoneOperationsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   ApiFuture<ListZoneOperationsPagedResponse> future = zoneOperationClient.listZoneOperationsPagedCallable().futureCall(request);
    *   // Do something
@@ -460,9 +460,9 @@ public final ListZoneOperationsPagedResponse listZoneOperations(
    *
    * 

    * try (ZoneOperationClient zoneOperationClient = ZoneOperationClient.create()) {
-   *   ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]");
+   *   String formattedZone = ProjectZoneName.format("[PROJECT]", "[ZONE]");
    *   ListZoneOperationsHttpRequest request = ListZoneOperationsHttpRequest.newBuilder()
-   *     .setZone(zone.toString())
+   *     .setZone(formattedZone)
    *     .build();
    *   while (true) {
    *     OperationList response = zoneOperationClient.listZoneOperationsCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/package-info.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/package-info.java
index 62f6781bacfe..4a8ba668f518 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/package-info.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/package-info.java
@@ -417,6 +417,22 @@
  * 
  * 
* + * ========================== NetworkEndpointGroupClient ========================== + * + *

Service Description: Creates and runs virtual machines on Google Cloud Platform. + * + *

Sample for NetworkEndpointGroupClient: + * + *

+ * 
+ * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+ *   ProjectZoneNetworkEndpointGroupName networkEndpointGroup = ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]");
+ *   NetworkEndpointGroupsAttachEndpointsRequest networkEndpointGroupsAttachEndpointsRequestResource = NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+ *   Operation response = networkEndpointGroupClient.attachNetworkEndpointsNetworkEndpointGroup(networkEndpointGroup, networkEndpointGroupsAttachEndpointsRequestResource);
+ * }
+ * 
+ * 
+ * * ============= NetworkClient ============= * *

Service Description: Creates and runs virtual machines on Google Cloud Platform. diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceStub.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceStub.java index 0e54b2f419eb..8c06266d817f 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceStub.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceStub.java @@ -41,6 +41,7 @@ import com.google.cloud.compute.v1.GetIamPolicyInstanceHttpRequest; import com.google.cloud.compute.v1.GetInstanceHttpRequest; import com.google.cloud.compute.v1.GetSerialPortOutputInstanceHttpRequest; +import com.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceHttpRequest; import com.google.cloud.compute.v1.InsertInstanceHttpRequest; import com.google.cloud.compute.v1.Instance; import com.google.cloud.compute.v1.InstanceAggregatedList; @@ -66,7 +67,9 @@ import com.google.cloud.compute.v1.SetMinCpuPlatformInstanceHttpRequest; import com.google.cloud.compute.v1.SetSchedulingInstanceHttpRequest; import com.google.cloud.compute.v1.SetServiceAccountInstanceHttpRequest; +import com.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceHttpRequest; import com.google.cloud.compute.v1.SetTagsInstanceHttpRequest; +import com.google.cloud.compute.v1.ShieldedInstanceIdentity; import com.google.cloud.compute.v1.SimulateMaintenanceEventInstanceHttpRequest; import com.google.cloud.compute.v1.StartInstanceHttpRequest; import com.google.cloud.compute.v1.StartWithEncryptionKeyInstanceHttpRequest; @@ -75,6 +78,7 @@ import com.google.cloud.compute.v1.TestPermissionsResponse; import com.google.cloud.compute.v1.UpdateAccessConfigInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceHttpRequest; +import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceHttpRequest; import com.google.common.collect.Sets; import java.io.IOException; import java.util.concurrent.TimeUnit; @@ -279,6 +283,31 @@ public class HttpJsonInstanceStub extends InstanceStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor< + GetShieldedInstanceIdentityInstanceHttpRequest, ShieldedInstanceIdentity> + getShieldedInstanceIdentityInstanceMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName("compute.instances.getShieldedInstanceIdentity") + .setHttpMethod(HttpMethods.GET) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity")) + .setQueryParams(Sets.newHashSet()) + .setResourceNameFactory(ProjectZoneInstanceName.newFactory()) + .setResourceNameField("instance") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(ShieldedInstanceIdentity.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor insertInstanceMethodDescriptor = @@ -574,6 +603,30 @@ public class HttpJsonInstanceStub extends InstanceStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor< + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest, Operation> + setShieldedInstanceIntegrityPolicyInstanceMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.instances.setShieldedInstanceIntegrityPolicy") + .setHttpMethod(HttpMethods.PATCH) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneInstanceName.newFactory()) + .setResourceNameField("instance") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor setTagsInstanceMethodDescriptor = @@ -745,6 +798,30 @@ public class HttpJsonInstanceStub extends InstanceStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor< + UpdateShieldedInstanceConfigInstanceHttpRequest, Operation> + updateShieldedInstanceConfigInstanceMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.instances.updateShieldedInstanceConfig") + .setHttpMethod(HttpMethods.PATCH) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneInstanceName.newFactory()) + .setResourceNameField("instance") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + private final BackgroundResource backgroundResources; private final UnaryCallable @@ -763,6 +840,9 @@ public class HttpJsonInstanceStub extends InstanceStub { private final UnaryCallable getIamPolicyInstanceCallable; private final UnaryCallable getSerialPortOutputInstanceCallable; + private final UnaryCallable< + GetShieldedInstanceIdentityInstanceHttpRequest, ShieldedInstanceIdentity> + getShieldedInstanceIdentityInstanceCallable; private final UnaryCallable insertInstanceCallable; private final UnaryCallable listInstancesCallable; private final UnaryCallable @@ -791,6 +871,8 @@ public class HttpJsonInstanceStub extends InstanceStub { setSchedulingInstanceCallable; private final UnaryCallable setServiceAccountInstanceCallable; + private final UnaryCallable + setShieldedInstanceIntegrityPolicyInstanceCallable; private final UnaryCallable setTagsInstanceCallable; private final UnaryCallable simulateMaintenanceEventInstanceCallable; @@ -804,6 +886,8 @@ public class HttpJsonInstanceStub extends InstanceStub { updateAccessConfigInstanceCallable; private final UnaryCallable updateNetworkInterfaceInstanceCallable; + private final UnaryCallable + updateShieldedInstanceConfigInstanceCallable; private final HttpJsonStubCallableFactory callableFactory; @@ -889,6 +973,13 @@ protected HttpJsonInstanceStub( .newBuilder() .setMethodDescriptor(getSerialPortOutputInstanceMethodDescriptor) .build(); + HttpJsonCallSettings + getShieldedInstanceIdentityInstanceTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(getShieldedInstanceIdentityInstanceMethodDescriptor) + .build(); HttpJsonCallSettings insertInstanceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(insertInstanceMethodDescriptor) @@ -957,6 +1048,12 @@ protected HttpJsonInstanceStub( HttpJsonCallSettings.newBuilder() .setMethodDescriptor(setServiceAccountInstanceMethodDescriptor) .build(); + HttpJsonCallSettings + setShieldedInstanceIntegrityPolicyInstanceTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(setShieldedInstanceIntegrityPolicyInstanceMethodDescriptor) + .build(); HttpJsonCallSettings setTagsInstanceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(setTagsInstanceMethodDescriptor) @@ -996,6 +1093,12 @@ protected HttpJsonInstanceStub( HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateNetworkInterfaceInstanceMethodDescriptor) .build(); + HttpJsonCallSettings + updateShieldedInstanceConfigInstanceTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(updateShieldedInstanceConfigInstanceMethodDescriptor) + .build(); this.addAccessConfigInstanceCallable = callableFactory.createUnaryCallable( @@ -1043,6 +1146,11 @@ protected HttpJsonInstanceStub( getSerialPortOutputInstanceTransportSettings, settings.getSerialPortOutputInstanceSettings(), clientContext); + this.getShieldedInstanceIdentityInstanceCallable = + callableFactory.createUnaryCallable( + getShieldedInstanceIdentityInstanceTransportSettings, + settings.getShieldedInstanceIdentityInstanceSettings(), + clientContext); this.insertInstanceCallable = callableFactory.createUnaryCallable( insertInstanceTransportSettings, settings.insertInstanceSettings(), clientContext); @@ -1115,6 +1223,11 @@ protected HttpJsonInstanceStub( setServiceAccountInstanceTransportSettings, settings.setServiceAccountInstanceSettings(), clientContext); + this.setShieldedInstanceIntegrityPolicyInstanceCallable = + callableFactory.createUnaryCallable( + setShieldedInstanceIntegrityPolicyInstanceTransportSettings, + settings.setShieldedInstanceIntegrityPolicyInstanceSettings(), + clientContext); this.setTagsInstanceCallable = callableFactory.createUnaryCallable( setTagsInstanceTransportSettings, settings.setTagsInstanceSettings(), clientContext); @@ -1149,6 +1262,11 @@ protected HttpJsonInstanceStub( updateNetworkInterfaceInstanceTransportSettings, settings.updateNetworkInterfaceInstanceSettings(), clientContext); + this.updateShieldedInstanceConfigInstanceCallable = + callableFactory.createUnaryCallable( + updateShieldedInstanceConfigInstanceTransportSettings, + settings.updateShieldedInstanceConfigInstanceSettings(), + clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -1208,6 +1326,12 @@ public UnaryCallable getIamPolicyInstan return getSerialPortOutputInstanceCallable; } + @BetaApi + public UnaryCallable + getShieldedInstanceIdentityInstanceCallable() { + return getShieldedInstanceIdentityInstanceCallable; + } + @BetaApi public UnaryCallable insertInstanceCallable() { return insertInstanceCallable; @@ -1298,6 +1422,12 @@ public UnaryCallable setMetadataInsta return setServiceAccountInstanceCallable; } + @BetaApi + public UnaryCallable + setShieldedInstanceIntegrityPolicyInstanceCallable() { + return setShieldedInstanceIntegrityPolicyInstanceCallable; + } + @BetaApi public UnaryCallable setTagsInstanceCallable() { return setTagsInstanceCallable; @@ -1343,6 +1473,12 @@ public UnaryCallable stopInstanceCallable() return updateNetworkInterfaceInstanceCallable; } + @BetaApi + public UnaryCallable + updateShieldedInstanceConfigInstanceCallable() { + return updateShieldedInstanceConfigInstanceCallable; + } + @Override public final void close() { shutdown(); diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupCallableFactory.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupCallableFactory.java new file mode 100644 index 000000000000..ebd443e0ab04 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupCallableFactory.java @@ -0,0 +1,84 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.ApiMessage; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * HTTP callable factory implementation for compute. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class HttpJsonNetworkEndpointGroupCallableFactory + implements HttpJsonStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + @Nullable + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + BackgroundResource operationsStub) { + return null; + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, batchingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupStub.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupStub.java new file mode 100644 index 000000000000..46fbfe47ed37 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupStub.java @@ -0,0 +1,592 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; + +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.AggregatedListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointsNetworkEndpointGroupsPagedResponse; + +import com.google.api.client.http.HttpMethods; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMessageHttpRequestFormatter; +import com.google.api.gax.httpjson.ApiMessageHttpResponseParser; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; +import com.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DeleteNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.GetNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.InsertNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupAggregatedList; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectName; +import com.google.cloud.compute.v1.ProjectZoneName; +import com.google.cloud.compute.v1.ProjectZoneNetworkEndpointGroupName; +import com.google.cloud.compute.v1.ProjectZoneNetworkEndpointGroupResourceName; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; +import com.google.common.collect.Sets; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * HTTP stub implementation for compute. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class HttpJsonNetworkEndpointGroupStub extends NetworkEndpointGroupStub { + @InternalApi + public static final ApiMethodDescriptor< + AggregatedListNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupAggregatedList> + aggregatedListNetworkEndpointGroupsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName("compute.networkEndpointGroups.aggregatedList") + .setHttpMethod(HttpMethods.GET) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create("{project}/aggregated/networkEndpointGroups")) + .setQueryParams( + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + .setResourceNameFactory(ProjectName.newFactory()) + .setResourceNameField("project") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(NetworkEndpointGroupAggregatedList.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.networkEndpointGroups.attachNetworkEndpoints") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor + deleteNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.networkEndpointGroups.delete") + .setHttpMethod(HttpMethods.DELETE) + .setRequestFormatter( + ApiMessageHttpRequestFormatter.newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.networkEndpointGroups.detachNetworkEndpoints") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor + getNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.networkEndpointGroups.get") + .setHttpMethod(HttpMethods.GET) + .setRequestFormatter( + ApiMessageHttpRequestFormatter.newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}")) + .setQueryParams(Sets.newHashSet()) + .setResourceNameFactory(ProjectZoneNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(NetworkEndpointGroup.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor + insertNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.networkEndpointGroups.insert") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter.newBuilder() + .setPathTemplate( + PathTemplate.create("{project}/zones/{zone}/networkEndpointGroups")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneName.newFactory()) + .setResourceNameField("zone") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + ListNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupList> + listNetworkEndpointGroupsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.networkEndpointGroups.list") + .setHttpMethod(HttpMethods.GET) + .setRequestFormatter( + ApiMessageHttpRequestFormatter.newBuilder() + .setPathTemplate( + PathTemplate.create("{project}/zones/{zone}/networkEndpointGroups")) + .setQueryParams( + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + .setResourceNameFactory(ProjectZoneName.newFactory()) + .setResourceNameField("zone") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(NetworkEndpointGroupList.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsNetworkEndpointGroupsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName("compute.networkEndpointGroups.listNetworkEndpoints") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints")) + .setQueryParams( + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + .setResourceNameFactory(ProjectZoneNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser + .newBuilder() + .setResponseInstance( + NetworkEndpointGroupsListNetworkEndpoints.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName("compute.networkEndpointGroups.testIamPermissions") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions")) + .setQueryParams(Sets.newHashSet()) + .setResourceNameFactory( + ProjectZoneNetworkEndpointGroupResourceName.newFactory()) + .setResourceNameField("resource") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(TestPermissionsResponse.getDefaultInstance()) + .build()) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupAggregatedList> + aggregatedListNetworkEndpointGroupsCallable; + private final UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsPagedCallable; + private final UnaryCallable + attachNetworkEndpointsNetworkEndpointGroupCallable; + private final UnaryCallable + deleteNetworkEndpointGroupCallable; + private final UnaryCallable + detachNetworkEndpointsNetworkEndpointGroupCallable; + private final UnaryCallable + getNetworkEndpointGroupCallable; + private final UnaryCallable + insertNetworkEndpointGroupCallable; + private final UnaryCallable + listNetworkEndpointGroupsCallable; + private final UnaryCallable< + ListNetworkEndpointGroupsHttpRequest, ListNetworkEndpointGroupsPagedResponse> + listNetworkEndpointGroupsPagedCallable; + private final UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsNetworkEndpointGroupsCallable; + private final UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsPagedCallable; + private final UnaryCallable< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupCallable; + + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonNetworkEndpointGroupStub create( + NetworkEndpointGroupStubSettings settings) throws IOException { + return new HttpJsonNetworkEndpointGroupStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonNetworkEndpointGroupStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonNetworkEndpointGroupStub( + NetworkEndpointGroupStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonNetworkEndpointGroupStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonNetworkEndpointGroupStub( + NetworkEndpointGroupStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonNetworkEndpointGroupStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonNetworkEndpointGroupStub( + NetworkEndpointGroupStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonNetworkEndpointGroupCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonNetworkEndpointGroupStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonNetworkEndpointGroupStub( + NetworkEndpointGroupStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings< + AggregatedListNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupAggregatedList> + aggregatedListNetworkEndpointGroupsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(aggregatedListNetworkEndpointGroupsMethodDescriptor) + .build(); + HttpJsonCallSettings + attachNetworkEndpointsNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(attachNetworkEndpointsNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + deleteNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + detachNetworkEndpointsNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(detachNetworkEndpointsNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + getNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + insertNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(insertNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + listNetworkEndpointGroupsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listNetworkEndpointGroupsMethodDescriptor) + .build(); + HttpJsonCallSettings< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsNetworkEndpointGroupsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listNetworkEndpointsNetworkEndpointGroupsMethodDescriptor) + .build(); + HttpJsonCallSettings + testIamPermissionsNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(testIamPermissionsNetworkEndpointGroupMethodDescriptor) + .build(); + + this.aggregatedListNetworkEndpointGroupsCallable = + callableFactory.createUnaryCallable( + aggregatedListNetworkEndpointGroupsTransportSettings, + settings.aggregatedListNetworkEndpointGroupsSettings(), + clientContext); + this.aggregatedListNetworkEndpointGroupsPagedCallable = + callableFactory.createPagedCallable( + aggregatedListNetworkEndpointGroupsTransportSettings, + settings.aggregatedListNetworkEndpointGroupsSettings(), + clientContext); + this.attachNetworkEndpointsNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + attachNetworkEndpointsNetworkEndpointGroupTransportSettings, + settings.attachNetworkEndpointsNetworkEndpointGroupSettings(), + clientContext); + this.deleteNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + deleteNetworkEndpointGroupTransportSettings, + settings.deleteNetworkEndpointGroupSettings(), + clientContext); + this.detachNetworkEndpointsNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + detachNetworkEndpointsNetworkEndpointGroupTransportSettings, + settings.detachNetworkEndpointsNetworkEndpointGroupSettings(), + clientContext); + this.getNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + getNetworkEndpointGroupTransportSettings, + settings.getNetworkEndpointGroupSettings(), + clientContext); + this.insertNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + insertNetworkEndpointGroupTransportSettings, + settings.insertNetworkEndpointGroupSettings(), + clientContext); + this.listNetworkEndpointGroupsCallable = + callableFactory.createUnaryCallable( + listNetworkEndpointGroupsTransportSettings, + settings.listNetworkEndpointGroupsSettings(), + clientContext); + this.listNetworkEndpointGroupsPagedCallable = + callableFactory.createPagedCallable( + listNetworkEndpointGroupsTransportSettings, + settings.listNetworkEndpointGroupsSettings(), + clientContext); + this.listNetworkEndpointsNetworkEndpointGroupsCallable = + callableFactory.createUnaryCallable( + listNetworkEndpointsNetworkEndpointGroupsTransportSettings, + settings.listNetworkEndpointsNetworkEndpointGroupsSettings(), + clientContext); + this.listNetworkEndpointsNetworkEndpointGroupsPagedCallable = + callableFactory.createPagedCallable( + listNetworkEndpointsNetworkEndpointGroupsTransportSettings, + settings.listNetworkEndpointsNetworkEndpointGroupsSettings(), + clientContext); + this.testIamPermissionsNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + testIamPermissionsNetworkEndpointGroupTransportSettings, + settings.testIamPermissionsNetworkEndpointGroupSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @BetaApi + public UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsPagedCallable() { + return aggregatedListNetworkEndpointGroupsPagedCallable; + } + + @BetaApi + public UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupAggregatedList> + aggregatedListNetworkEndpointGroupsCallable() { + return aggregatedListNetworkEndpointGroupsCallable; + } + + @BetaApi + public UnaryCallable + attachNetworkEndpointsNetworkEndpointGroupCallable() { + return attachNetworkEndpointsNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + deleteNetworkEndpointGroupCallable() { + return deleteNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + detachNetworkEndpointsNetworkEndpointGroupCallable() { + return detachNetworkEndpointsNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + getNetworkEndpointGroupCallable() { + return getNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + insertNetworkEndpointGroupCallable() { + return insertNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + listNetworkEndpointGroupsPagedCallable() { + return listNetworkEndpointGroupsPagedCallable; + } + + @BetaApi + public UnaryCallable + listNetworkEndpointGroupsCallable() { + return listNetworkEndpointGroupsCallable; + } + + @BetaApi + public UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsPagedCallable() { + return listNetworkEndpointsNetworkEndpointGroupsPagedCallable; + } + + @BetaApi + public UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsNetworkEndpointGroupsCallable() { + return listNetworkEndpointsNetworkEndpointGroupsCallable; + } + + @BetaApi + public UnaryCallable + testIamPermissionsNetworkEndpointGroupCallable() { + return testIamPermissionsNetworkEndpointGroupCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStub.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStub.java index e06e430fa527..d2d7bf17c658 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStub.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStub.java @@ -31,6 +31,7 @@ import com.google.cloud.compute.v1.GetIamPolicyInstanceHttpRequest; import com.google.cloud.compute.v1.GetInstanceHttpRequest; import com.google.cloud.compute.v1.GetSerialPortOutputInstanceHttpRequest; +import com.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceHttpRequest; import com.google.cloud.compute.v1.InsertInstanceHttpRequest; import com.google.cloud.compute.v1.Instance; import com.google.cloud.compute.v1.InstanceAggregatedList; @@ -52,7 +53,9 @@ import com.google.cloud.compute.v1.SetMinCpuPlatformInstanceHttpRequest; import com.google.cloud.compute.v1.SetSchedulingInstanceHttpRequest; import com.google.cloud.compute.v1.SetServiceAccountInstanceHttpRequest; +import com.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceHttpRequest; import com.google.cloud.compute.v1.SetTagsInstanceHttpRequest; +import com.google.cloud.compute.v1.ShieldedInstanceIdentity; import com.google.cloud.compute.v1.SimulateMaintenanceEventInstanceHttpRequest; import com.google.cloud.compute.v1.StartInstanceHttpRequest; import com.google.cloud.compute.v1.StartWithEncryptionKeyInstanceHttpRequest; @@ -61,6 +64,7 @@ import com.google.cloud.compute.v1.TestPermissionsResponse; import com.google.cloud.compute.v1.UpdateAccessConfigInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceHttpRequest; +import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceHttpRequest; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS @@ -131,6 +135,13 @@ public UnaryCallable getIamPolicyInstan "Not implemented: getSerialPortOutputInstanceCallable()"); } + @BetaApi + public UnaryCallable + getShieldedInstanceIdentityInstanceCallable() { + throw new UnsupportedOperationException( + "Not implemented: getShieldedInstanceIdentityInstanceCallable()"); + } + @BetaApi public UnaryCallable insertInstanceCallable() { throw new UnsupportedOperationException("Not implemented: insertInstanceCallable()"); @@ -224,6 +235,13 @@ public UnaryCallable setMetadataInsta throw new UnsupportedOperationException("Not implemented: setServiceAccountInstanceCallable()"); } + @BetaApi + public UnaryCallable + setShieldedInstanceIntegrityPolicyInstanceCallable() { + throw new UnsupportedOperationException( + "Not implemented: setShieldedInstanceIntegrityPolicyInstanceCallable()"); + } + @BetaApi public UnaryCallable setTagsInstanceCallable() { throw new UnsupportedOperationException("Not implemented: setTagsInstanceCallable()"); @@ -274,6 +292,13 @@ public UnaryCallable stopInstanceCallable() "Not implemented: updateNetworkInterfaceInstanceCallable()"); } + @BetaApi + public UnaryCallable + updateShieldedInstanceConfigInstanceCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateShieldedInstanceConfigInstanceCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java index 89dc19dc04e1..79061d42dde1 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java @@ -50,6 +50,7 @@ import com.google.cloud.compute.v1.GetIamPolicyInstanceHttpRequest; import com.google.cloud.compute.v1.GetInstanceHttpRequest; import com.google.cloud.compute.v1.GetSerialPortOutputInstanceHttpRequest; +import com.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceHttpRequest; import com.google.cloud.compute.v1.InsertInstanceHttpRequest; import com.google.cloud.compute.v1.Instance; import com.google.cloud.compute.v1.InstanceAggregatedList; @@ -73,7 +74,9 @@ import com.google.cloud.compute.v1.SetMinCpuPlatformInstanceHttpRequest; import com.google.cloud.compute.v1.SetSchedulingInstanceHttpRequest; import com.google.cloud.compute.v1.SetServiceAccountInstanceHttpRequest; +import com.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceHttpRequest; import com.google.cloud.compute.v1.SetTagsInstanceHttpRequest; +import com.google.cloud.compute.v1.ShieldedInstanceIdentity; import com.google.cloud.compute.v1.SimulateMaintenanceEventInstanceHttpRequest; import com.google.cloud.compute.v1.StartInstanceHttpRequest; import com.google.cloud.compute.v1.StartWithEncryptionKeyInstanceHttpRequest; @@ -82,6 +85,7 @@ import com.google.cloud.compute.v1.TestPermissionsResponse; import com.google.cloud.compute.v1.UpdateAccessConfigInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceHttpRequest; +import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceHttpRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -151,6 +155,9 @@ public class InstanceStubSettings extends StubSettings { getIamPolicyInstanceSettings; private final UnaryCallSettings getSerialPortOutputInstanceSettings; + private final UnaryCallSettings< + GetShieldedInstanceIdentityInstanceHttpRequest, ShieldedInstanceIdentity> + getShieldedInstanceIdentityInstanceSettings; private final UnaryCallSettings insertInstanceSettings; private final PagedCallSettings< ListInstancesHttpRequest, InstanceList, ListInstancesPagedResponse> @@ -181,6 +188,8 @@ public class InstanceStubSettings extends StubSettings { setSchedulingInstanceSettings; private final UnaryCallSettings setServiceAccountInstanceSettings; + private final UnaryCallSettings + setShieldedInstanceIntegrityPolicyInstanceSettings; private final UnaryCallSettings setTagsInstanceSettings; private final UnaryCallSettings simulateMaintenanceEventInstanceSettings; @@ -194,6 +203,8 @@ public class InstanceStubSettings extends StubSettings { updateAccessConfigInstanceSettings; private final UnaryCallSettings updateNetworkInterfaceInstanceSettings; + private final UnaryCallSettings + updateShieldedInstanceConfigInstanceSettings; /** Returns the object with the settings used for calls to addAccessConfigInstance. */ public UnaryCallSettings @@ -247,6 +258,12 @@ public UnaryCallSettings getIamPolicyIn return getSerialPortOutputInstanceSettings; } + /** Returns the object with the settings used for calls to getShieldedInstanceIdentityInstance. */ + public UnaryCallSettings + getShieldedInstanceIdentityInstanceSettings() { + return getShieldedInstanceIdentityInstanceSettings; + } + /** Returns the object with the settings used for calls to insertInstance. */ public UnaryCallSettings insertInstanceSettings() { return insertInstanceSettings; @@ -330,6 +347,15 @@ public UnaryCallSettings setLabelsInsta return setServiceAccountInstanceSettings; } + /** + * Returns the object with the settings used for calls to + * setShieldedInstanceIntegrityPolicyInstance. + */ + public UnaryCallSettings + setShieldedInstanceIntegrityPolicyInstanceSettings() { + return setShieldedInstanceIntegrityPolicyInstanceSettings; + } + /** Returns the object with the settings used for calls to setTagsInstance. */ public UnaryCallSettings setTagsInstanceSettings() { return setTagsInstanceSettings; @@ -375,6 +401,14 @@ public UnaryCallSettings stopInstanceSetting return updateNetworkInterfaceInstanceSettings; } + /** + * Returns the object with the settings used for calls to updateShieldedInstanceConfigInstance. + */ + public UnaryCallSettings + updateShieldedInstanceConfigInstanceSettings() { + return updateShieldedInstanceConfigInstanceSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public InstanceStub createStub() throws IOException { if (getTransportChannelProvider() @@ -460,6 +494,8 @@ protected InstanceStubSettings(Builder settingsBuilder) throws IOException { getIamPolicyInstanceSettings = settingsBuilder.getIamPolicyInstanceSettings().build(); getSerialPortOutputInstanceSettings = settingsBuilder.getSerialPortOutputInstanceSettings().build(); + getShieldedInstanceIdentityInstanceSettings = + settingsBuilder.getShieldedInstanceIdentityInstanceSettings().build(); insertInstanceSettings = settingsBuilder.insertInstanceSettings().build(); listInstancesSettings = settingsBuilder.listInstancesSettings().build(); listReferrersInstancesSettings = settingsBuilder.listReferrersInstancesSettings().build(); @@ -476,6 +512,8 @@ protected InstanceStubSettings(Builder settingsBuilder) throws IOException { setMinCpuPlatformInstanceSettings = settingsBuilder.setMinCpuPlatformInstanceSettings().build(); setSchedulingInstanceSettings = settingsBuilder.setSchedulingInstanceSettings().build(); setServiceAccountInstanceSettings = settingsBuilder.setServiceAccountInstanceSettings().build(); + setShieldedInstanceIntegrityPolicyInstanceSettings = + settingsBuilder.setShieldedInstanceIntegrityPolicyInstanceSettings().build(); setTagsInstanceSettings = settingsBuilder.setTagsInstanceSettings().build(); simulateMaintenanceEventInstanceSettings = settingsBuilder.simulateMaintenanceEventInstanceSettings().build(); @@ -489,6 +527,8 @@ protected InstanceStubSettings(Builder settingsBuilder) throws IOException { settingsBuilder.updateAccessConfigInstanceSettings().build(); updateNetworkInterfaceInstanceSettings = settingsBuilder.updateNetworkInterfaceInstanceSettings().build(); + updateShieldedInstanceConfigInstanceSettings = + settingsBuilder.updateShieldedInstanceConfigInstanceSettings().build(); } private static final PagedListDescriptor< @@ -708,6 +748,9 @@ public static class Builder extends StubSettings.Builder getSerialPortOutputInstanceSettings; + private final UnaryCallSettings.Builder< + GetShieldedInstanceIdentityInstanceHttpRequest, ShieldedInstanceIdentity> + getShieldedInstanceIdentityInstanceSettings; private final UnaryCallSettings.Builder insertInstanceSettings; private final PagedCallSettings.Builder< @@ -740,6 +783,9 @@ public static class Builder extends StubSettings.Builder setServiceAccountInstanceSettings; + private final UnaryCallSettings.Builder< + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest, Operation> + setShieldedInstanceIntegrityPolicyInstanceSettings; private final UnaryCallSettings.Builder setTagsInstanceSettings; private final UnaryCallSettings.Builder @@ -757,6 +803,9 @@ public static class Builder extends StubSettings.Builder updateNetworkInterfaceInstanceSettings; + private final UnaryCallSettings.Builder< + UpdateShieldedInstanceConfigInstanceHttpRequest, Operation> + updateShieldedInstanceConfigInstanceSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -818,6 +867,8 @@ protected Builder(ClientContext clientContext) { getSerialPortOutputInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getShieldedInstanceIdentityInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + insertInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); @@ -847,6 +898,9 @@ protected Builder(ClientContext clientContext) { setServiceAccountInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setShieldedInstanceIntegrityPolicyInstanceSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + setTagsInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); simulateMaintenanceEventInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -863,6 +917,9 @@ protected Builder(ClientContext clientContext) { updateNetworkInterfaceInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateShieldedInstanceConfigInstanceSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + unaryMethodSettingsBuilders = ImmutableList.>of( addAccessConfigInstanceSettings, @@ -874,6 +931,7 @@ protected Builder(ClientContext clientContext) { getInstanceSettings, getIamPolicyInstanceSettings, getSerialPortOutputInstanceSettings, + getShieldedInstanceIdentityInstanceSettings, insertInstanceSettings, listInstancesSettings, listReferrersInstancesSettings, @@ -888,6 +946,7 @@ protected Builder(ClientContext clientContext) { setMinCpuPlatformInstanceSettings, setSchedulingInstanceSettings, setServiceAccountInstanceSettings, + setShieldedInstanceIntegrityPolicyInstanceSettings, setTagsInstanceSettings, simulateMaintenanceEventInstanceSettings, startInstanceSettings, @@ -895,7 +954,8 @@ protected Builder(ClientContext clientContext) { stopInstanceSettings, testIamPermissionsInstanceSettings, updateAccessConfigInstanceSettings, - updateNetworkInterfaceInstanceSettings); + updateNetworkInterfaceInstanceSettings, + updateShieldedInstanceConfigInstanceSettings); initDefaults(this); } @@ -956,6 +1016,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .getShieldedInstanceIdentityInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .insertInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -1026,6 +1091,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .setShieldedInstanceIntegrityPolicyInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .setTagsInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -1066,6 +1136,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .updateShieldedInstanceConfigInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + return builder; } @@ -1082,6 +1157,8 @@ protected Builder(InstanceStubSettings settings) { getIamPolicyInstanceSettings = settings.getIamPolicyInstanceSettings.toBuilder(); getSerialPortOutputInstanceSettings = settings.getSerialPortOutputInstanceSettings.toBuilder(); + getShieldedInstanceIdentityInstanceSettings = + settings.getShieldedInstanceIdentityInstanceSettings.toBuilder(); insertInstanceSettings = settings.insertInstanceSettings.toBuilder(); listInstancesSettings = settings.listInstancesSettings.toBuilder(); listReferrersInstancesSettings = settings.listReferrersInstancesSettings.toBuilder(); @@ -1098,6 +1175,8 @@ protected Builder(InstanceStubSettings settings) { setMinCpuPlatformInstanceSettings = settings.setMinCpuPlatformInstanceSettings.toBuilder(); setSchedulingInstanceSettings = settings.setSchedulingInstanceSettings.toBuilder(); setServiceAccountInstanceSettings = settings.setServiceAccountInstanceSettings.toBuilder(); + setShieldedInstanceIntegrityPolicyInstanceSettings = + settings.setShieldedInstanceIntegrityPolicyInstanceSettings.toBuilder(); setTagsInstanceSettings = settings.setTagsInstanceSettings.toBuilder(); simulateMaintenanceEventInstanceSettings = settings.simulateMaintenanceEventInstanceSettings.toBuilder(); @@ -1109,6 +1188,8 @@ protected Builder(InstanceStubSettings settings) { updateAccessConfigInstanceSettings = settings.updateAccessConfigInstanceSettings.toBuilder(); updateNetworkInterfaceInstanceSettings = settings.updateNetworkInterfaceInstanceSettings.toBuilder(); + updateShieldedInstanceConfigInstanceSettings = + settings.updateShieldedInstanceConfigInstanceSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -1121,6 +1202,7 @@ protected Builder(InstanceStubSettings settings) { getInstanceSettings, getIamPolicyInstanceSettings, getSerialPortOutputInstanceSettings, + getShieldedInstanceIdentityInstanceSettings, insertInstanceSettings, listInstancesSettings, listReferrersInstancesSettings, @@ -1135,6 +1217,7 @@ protected Builder(InstanceStubSettings settings) { setMinCpuPlatformInstanceSettings, setSchedulingInstanceSettings, setServiceAccountInstanceSettings, + setShieldedInstanceIntegrityPolicyInstanceSettings, setTagsInstanceSettings, simulateMaintenanceEventInstanceSettings, startInstanceSettings, @@ -1142,7 +1225,8 @@ protected Builder(InstanceStubSettings settings) { stopInstanceSettings, testIamPermissionsInstanceSettings, updateAccessConfigInstanceSettings, - updateNetworkInterfaceInstanceSettings); + updateNetworkInterfaceInstanceSettings, + updateShieldedInstanceConfigInstanceSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -1217,6 +1301,15 @@ public UnaryCallSettings.Builder getInstanceSe return getSerialPortOutputInstanceSettings; } + /** + * Returns the builder for the settings used for calls to getShieldedInstanceIdentityInstance. + */ + public UnaryCallSettings.Builder< + GetShieldedInstanceIdentityInstanceHttpRequest, ShieldedInstanceIdentity> + getShieldedInstanceIdentityInstanceSettings() { + return getShieldedInstanceIdentityInstanceSettings; + } + /** Returns the builder for the settings used for calls to insertInstance. */ public UnaryCallSettings.Builder insertInstanceSettings() { @@ -1304,6 +1397,16 @@ public UnaryCallSettings.Builder resetInsta return setServiceAccountInstanceSettings; } + /** + * Returns the builder for the settings used for calls to + * setShieldedInstanceIntegrityPolicyInstance. + */ + public UnaryCallSettings.Builder< + SetShieldedInstanceIntegrityPolicyInstanceHttpRequest, Operation> + setShieldedInstanceIntegrityPolicyInstanceSettings() { + return setShieldedInstanceIntegrityPolicyInstanceSettings; + } + /** Returns the builder for the settings used for calls to setTagsInstance. */ public UnaryCallSettings.Builder setTagsInstanceSettings() { @@ -1350,6 +1453,14 @@ public UnaryCallSettings.Builder stopInstanc return updateNetworkInterfaceInstanceSettings; } + /** + * Returns the builder for the settings used for calls to updateShieldedInstanceConfigInstance. + */ + public UnaryCallSettings.Builder + updateShieldedInstanceConfigInstanceSettings() { + return updateShieldedInstanceConfigInstanceSettings; + } + @Override public InstanceStubSettings build() throws IOException { return new InstanceStubSettings(this); diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkEndpointGroupStub.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkEndpointGroupStub.java new file mode 100644 index 000000000000..8c05ec044747 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkEndpointGroupStub.java @@ -0,0 +1,143 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; + +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.AggregatedListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointsNetworkEndpointGroupsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DeleteNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.GetNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.InsertNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupAggregatedList; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for compute. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class NetworkEndpointGroupStub implements BackgroundResource { + + @BetaApi + public UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: aggregatedListNetworkEndpointGroupsPagedCallable()"); + } + + @BetaApi + public UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupAggregatedList> + aggregatedListNetworkEndpointGroupsCallable() { + throw new UnsupportedOperationException( + "Not implemented: aggregatedListNetworkEndpointGroupsCallable()"); + } + + @BetaApi + public UnaryCallable + attachNetworkEndpointsNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: attachNetworkEndpointsNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + deleteNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + detachNetworkEndpointsNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: detachNetworkEndpointsNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + getNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + insertNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: insertNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + listNetworkEndpointGroupsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNetworkEndpointGroupsPagedCallable()"); + } + + @BetaApi + public UnaryCallable + listNetworkEndpointGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listNetworkEndpointGroupsCallable()"); + } + + @BetaApi + public UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNetworkEndpointsNetworkEndpointGroupsPagedCallable()"); + } + + @BetaApi + public UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsNetworkEndpointGroupsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNetworkEndpointsNetworkEndpointGroupsCallable()"); + } + + @BetaApi + public UnaryCallable + testIamPermissionsNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: testIamPermissionsNetworkEndpointGroupCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkEndpointGroupStubSettings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkEndpointGroupStubSettings.java new file mode 100644 index 000000000000..ee556a8e5203 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/NetworkEndpointGroupStubSettings.java @@ -0,0 +1,860 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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; + +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.AggregatedListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointsNetworkEndpointGroupsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DeleteNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.GetNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.InsertNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupAggregatedList; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints; +import com.google.cloud.compute.v1.NetworkEndpointGroupsScopedList; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.TestPermissionsResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link NetworkEndpointGroupStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (https://www.googleapis.com/compute/v1/projects/) and default + * port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of attachNetworkEndpointsNetworkEndpointGroup to 30 seconds: + * + *

+ * 
+ * NetworkEndpointGroupStubSettings.Builder networkEndpointGroupSettingsBuilder =
+ *     NetworkEndpointGroupStubSettings.newBuilder();
+ * networkEndpointGroupSettingsBuilder.attachNetworkEndpointsNetworkEndpointGroupSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * NetworkEndpointGroupStubSettings networkEndpointGroupSettings = networkEndpointGroupSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class NetworkEndpointGroupStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/compute") + .add("https://www.googleapis.com/auth/compute.readonly") + .add("https://www.googleapis.com/auth/devstorage.full_control") + .add("https://www.googleapis.com/auth/devstorage.read_only") + .add("https://www.googleapis.com/auth/devstorage.read_write") + .build(); + + private final PagedCallSettings< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsSettings; + private final UnaryCallSettings + attachNetworkEndpointsNetworkEndpointGroupSettings; + private final UnaryCallSettings + deleteNetworkEndpointGroupSettings; + private final UnaryCallSettings + detachNetworkEndpointsNetworkEndpointGroupSettings; + private final UnaryCallSettings + getNetworkEndpointGroupSettings; + private final UnaryCallSettings + insertNetworkEndpointGroupSettings; + private final PagedCallSettings< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListNetworkEndpointGroupsPagedResponse> + listNetworkEndpointGroupsSettings; + private final PagedCallSettings< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsSettings; + private final UnaryCallSettings< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupSettings; + + /** Returns the object with the settings used for calls to aggregatedListNetworkEndpointGroups. */ + public PagedCallSettings< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsSettings() { + return aggregatedListNetworkEndpointGroupsSettings; + } + + /** + * Returns the object with the settings used for calls to + * attachNetworkEndpointsNetworkEndpointGroup. + */ + public UnaryCallSettings + attachNetworkEndpointsNetworkEndpointGroupSettings() { + return attachNetworkEndpointsNetworkEndpointGroupSettings; + } + + /** Returns the object with the settings used for calls to deleteNetworkEndpointGroup. */ + public UnaryCallSettings + deleteNetworkEndpointGroupSettings() { + return deleteNetworkEndpointGroupSettings; + } + + /** + * Returns the object with the settings used for calls to + * detachNetworkEndpointsNetworkEndpointGroup. + */ + public UnaryCallSettings + detachNetworkEndpointsNetworkEndpointGroupSettings() { + return detachNetworkEndpointsNetworkEndpointGroupSettings; + } + + /** Returns the object with the settings used for calls to getNetworkEndpointGroup. */ + public UnaryCallSettings + getNetworkEndpointGroupSettings() { + return getNetworkEndpointGroupSettings; + } + + /** Returns the object with the settings used for calls to insertNetworkEndpointGroup. */ + public UnaryCallSettings + insertNetworkEndpointGroupSettings() { + return insertNetworkEndpointGroupSettings; + } + + /** Returns the object with the settings used for calls to listNetworkEndpointGroups. */ + public PagedCallSettings< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListNetworkEndpointGroupsPagedResponse> + listNetworkEndpointGroupsSettings() { + return listNetworkEndpointGroupsSettings; + } + + /** + * Returns the object with the settings used for calls to + * listNetworkEndpointsNetworkEndpointGroups. + */ + public PagedCallSettings< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsSettings() { + return listNetworkEndpointsNetworkEndpointGroupsSettings; + } + + /** + * Returns the object with the settings used for calls to testIamPermissionsNetworkEndpointGroup. + */ + public UnaryCallSettings< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupSettings() { + return testIamPermissionsNetworkEndpointGroupSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public NetworkEndpointGroupStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonNetworkEndpointGroupStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "https://www.googleapis.com/compute/v1/projects/"; + } + + /** Returns the default service port. */ + public static int getDefaultServicePort() { + return 443; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultHttpJsonTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(NetworkEndpointGroupStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected NetworkEndpointGroupStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + aggregatedListNetworkEndpointGroupsSettings = + settingsBuilder.aggregatedListNetworkEndpointGroupsSettings().build(); + attachNetworkEndpointsNetworkEndpointGroupSettings = + settingsBuilder.attachNetworkEndpointsNetworkEndpointGroupSettings().build(); + deleteNetworkEndpointGroupSettings = + settingsBuilder.deleteNetworkEndpointGroupSettings().build(); + detachNetworkEndpointsNetworkEndpointGroupSettings = + settingsBuilder.detachNetworkEndpointsNetworkEndpointGroupSettings().build(); + getNetworkEndpointGroupSettings = settingsBuilder.getNetworkEndpointGroupSettings().build(); + insertNetworkEndpointGroupSettings = + settingsBuilder.insertNetworkEndpointGroupSettings().build(); + listNetworkEndpointGroupsSettings = settingsBuilder.listNetworkEndpointGroupsSettings().build(); + listNetworkEndpointsNetworkEndpointGroupsSettings = + settingsBuilder.listNetworkEndpointsNetworkEndpointGroupsSettings().build(); + testIamPermissionsNetworkEndpointGroupSettings = + settingsBuilder.testIamPermissionsNetworkEndpointGroupSettings().build(); + } + + private static final PagedListDescriptor< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList> + AGGREGATED_LIST_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public AggregatedListNetworkEndpointGroupsHttpRequest injectToken( + AggregatedListNetworkEndpointGroupsHttpRequest payload, String token) { + return AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public AggregatedListNetworkEndpointGroupsHttpRequest injectPageSize( + AggregatedListNetworkEndpointGroupsHttpRequest payload, int pageSize) { + return AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setMaxResults(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(AggregatedListNetworkEndpointGroupsHttpRequest payload) { + return payload.getMaxResults(); + } + + @Override + public String extractNextToken(NetworkEndpointGroupAggregatedList payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + NetworkEndpointGroupAggregatedList payload) { + return payload.getItemsMap() != null + ? payload.getItemsMap().values() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupList, NetworkEndpointGroup> + LIST_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNetworkEndpointGroupsHttpRequest injectToken( + ListNetworkEndpointGroupsHttpRequest payload, String token) { + return ListNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListNetworkEndpointGroupsHttpRequest injectPageSize( + ListNetworkEndpointGroupsHttpRequest payload, int pageSize) { + return ListNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setMaxResults(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListNetworkEndpointGroupsHttpRequest payload) { + return payload.getMaxResults(); + } + + @Override + public String extractNextToken(NetworkEndpointGroupList payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + NetworkEndpointGroupList payload) { + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + LIST_NETWORK_ENDPOINTS_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNetworkEndpointsNetworkEndpointGroupsHttpRequest injectToken( + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest payload, String token) { + return ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListNetworkEndpointsNetworkEndpointGroupsHttpRequest injectPageSize( + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest payload, int pageSize) { + return ListNetworkEndpointsNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setMaxResults(pageSize) + .build(); + } + + @Override + public Integer extractPageSize( + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest payload) { + return payload.getMaxResults(); + } + + @Override + public String extractNextToken(NetworkEndpointGroupsListNetworkEndpoints payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + NetworkEndpointGroupsListNetworkEndpoints payload) { + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + AggregatedListNetworkEndpointGroupsPagedResponse> + AGGREGATED_LIST_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + AggregatedListNetworkEndpointGroupsPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList> + callable, + AggregatedListNetworkEndpointGroupsHttpRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + NetworkEndpointGroupsScopedList> + pageContext = + PageContext.create( + callable, + AGGREGATED_LIST_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC, + request, + context); + return AggregatedListNetworkEndpointGroupsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListNetworkEndpointGroupsPagedResponse> + LIST_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListNetworkEndpointGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListNetworkEndpointGroupsHttpRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + pageContext = + PageContext.create( + callable, LIST_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC, request, context); + return ListNetworkEndpointGroupsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + LIST_NETWORK_ENDPOINTS_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + callable, + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + pageContext = + PageContext.create( + callable, + LIST_NETWORK_ENDPOINTS_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC, + request, + context); + return ListNetworkEndpointsNetworkEndpointGroupsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Builder for NetworkEndpointGroupStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final PagedCallSettings.Builder< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsSettings; + private final UnaryCallSettings.Builder< + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsNetworkEndpointGroupSettings; + private final UnaryCallSettings.Builder + deleteNetworkEndpointGroupSettings; + private final UnaryCallSettings.Builder< + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsNetworkEndpointGroupSettings; + private final UnaryCallSettings.Builder< + GetNetworkEndpointGroupHttpRequest, NetworkEndpointGroup> + getNetworkEndpointGroupSettings; + private final UnaryCallSettings.Builder + insertNetworkEndpointGroupSettings; + private final PagedCallSettings.Builder< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListNetworkEndpointGroupsPagedResponse> + listNetworkEndpointGroupsSettings; + private final PagedCallSettings.Builder< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsSettings; + private final UnaryCallSettings.Builder< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + aggregatedListNetworkEndpointGroupsSettings = + PagedCallSettings.newBuilder(AGGREGATED_LIST_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT); + + attachNetworkEndpointsNetworkEndpointGroupSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteNetworkEndpointGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + detachNetworkEndpointsNetworkEndpointGroupSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getNetworkEndpointGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + insertNetworkEndpointGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listNetworkEndpointGroupsSettings = + PagedCallSettings.newBuilder(LIST_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT); + + listNetworkEndpointsNetworkEndpointGroupsSettings = + PagedCallSettings.newBuilder( + LIST_NETWORK_ENDPOINTS_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT); + + testIamPermissionsNetworkEndpointGroupSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + aggregatedListNetworkEndpointGroupsSettings, + attachNetworkEndpointsNetworkEndpointGroupSettings, + deleteNetworkEndpointGroupSettings, + detachNetworkEndpointsNetworkEndpointGroupSettings, + getNetworkEndpointGroupSettings, + insertNetworkEndpointGroupSettings, + listNetworkEndpointGroupsSettings, + listNetworkEndpointsNetworkEndpointGroupsSettings, + testIamPermissionsNetworkEndpointGroupSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .aggregatedListNetworkEndpointGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .attachNetworkEndpointsNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .detachNetworkEndpointsNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .insertNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listNetworkEndpointGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listNetworkEndpointsNetworkEndpointGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .testIamPermissionsNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(NetworkEndpointGroupStubSettings settings) { + super(settings); + + aggregatedListNetworkEndpointGroupsSettings = + settings.aggregatedListNetworkEndpointGroupsSettings.toBuilder(); + attachNetworkEndpointsNetworkEndpointGroupSettings = + settings.attachNetworkEndpointsNetworkEndpointGroupSettings.toBuilder(); + deleteNetworkEndpointGroupSettings = settings.deleteNetworkEndpointGroupSettings.toBuilder(); + detachNetworkEndpointsNetworkEndpointGroupSettings = + settings.detachNetworkEndpointsNetworkEndpointGroupSettings.toBuilder(); + getNetworkEndpointGroupSettings = settings.getNetworkEndpointGroupSettings.toBuilder(); + insertNetworkEndpointGroupSettings = settings.insertNetworkEndpointGroupSettings.toBuilder(); + listNetworkEndpointGroupsSettings = settings.listNetworkEndpointGroupsSettings.toBuilder(); + listNetworkEndpointsNetworkEndpointGroupsSettings = + settings.listNetworkEndpointsNetworkEndpointGroupsSettings.toBuilder(); + testIamPermissionsNetworkEndpointGroupSettings = + settings.testIamPermissionsNetworkEndpointGroupSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + aggregatedListNetworkEndpointGroupsSettings, + attachNetworkEndpointsNetworkEndpointGroupSettings, + deleteNetworkEndpointGroupSettings, + detachNetworkEndpointsNetworkEndpointGroupSettings, + getNetworkEndpointGroupSettings, + insertNetworkEndpointGroupSettings, + listNetworkEndpointGroupsSettings, + listNetworkEndpointsNetworkEndpointGroupsSettings, + testIamPermissionsNetworkEndpointGroupSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** + * Returns the builder for the settings used for calls to aggregatedListNetworkEndpointGroups. + */ + public PagedCallSettings.Builder< + AggregatedListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupAggregatedList, + AggregatedListNetworkEndpointGroupsPagedResponse> + aggregatedListNetworkEndpointGroupsSettings() { + return aggregatedListNetworkEndpointGroupsSettings; + } + + /** + * Returns the builder for the settings used for calls to + * attachNetworkEndpointsNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + AttachNetworkEndpointsNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsNetworkEndpointGroupSettings() { + return attachNetworkEndpointsNetworkEndpointGroupSettings; + } + + /** Returns the builder for the settings used for calls to deleteNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + deleteNetworkEndpointGroupSettings() { + return deleteNetworkEndpointGroupSettings; + } + + /** + * Returns the builder for the settings used for calls to + * detachNetworkEndpointsNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + DetachNetworkEndpointsNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsNetworkEndpointGroupSettings() { + return detachNetworkEndpointsNetworkEndpointGroupSettings; + } + + /** Returns the builder for the settings used for calls to getNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + getNetworkEndpointGroupSettings() { + return getNetworkEndpointGroupSettings; + } + + /** Returns the builder for the settings used for calls to insertNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + insertNetworkEndpointGroupSettings() { + return insertNetworkEndpointGroupSettings; + } + + /** Returns the builder for the settings used for calls to listNetworkEndpointGroups. */ + public PagedCallSettings.Builder< + ListNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListNetworkEndpointGroupsPagedResponse> + listNetworkEndpointGroupsSettings() { + return listNetworkEndpointGroupsSettings; + } + + /** + * Returns the builder for the settings used for calls to + * listNetworkEndpointsNetworkEndpointGroups. + */ + public PagedCallSettings.Builder< + ListNetworkEndpointsNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsNetworkEndpointGroupsSettings() { + return listNetworkEndpointsNetworkEndpointGroupsSettings; + } + + /** + * Returns the builder for the settings used for calls to + * testIamPermissionsNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + TestIamPermissionsNetworkEndpointGroupHttpRequest, TestPermissionsResponse> + testIamPermissionsNetworkEndpointGroupSettings() { + return testIamPermissionsNetworkEndpointGroupSettings; + } + + @Override + public NetworkEndpointGroupStubSettings build() throws IOException { + return new NetworkEndpointGroupStubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java index 55611efc3005..1fa5757fe0d0 100644 --- a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java +++ b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java @@ -27,6 +27,7 @@ import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.getIamPolicyInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.getInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.getSerialPortOutputInstanceMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.getShieldedInstanceIdentityInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.insertInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.listInstancesMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.listReferrersInstancesMethodDescriptor; @@ -41,6 +42,7 @@ import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.setMinCpuPlatformInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.setSchedulingInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.setServiceAccountInstanceMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.setShieldedInstanceIntegrityPolicyInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.setTagsInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.simulateMaintenanceEventInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.startInstanceMethodDescriptor; @@ -49,6 +51,7 @@ import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.testIamPermissionsInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.updateAccessConfigInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.updateNetworkInterfaceInstanceMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.updateShieldedInstanceConfigInstanceMethodDescriptor; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.httpjson.ApiMethodDescriptor; @@ -90,6 +93,7 @@ public class InstanceClientTest { getInstanceMethodDescriptor, getIamPolicyInstanceMethodDescriptor, getSerialPortOutputInstanceMethodDescriptor, + getShieldedInstanceIdentityInstanceMethodDescriptor, insertInstanceMethodDescriptor, listInstancesMethodDescriptor, listReferrersInstancesMethodDescriptor, @@ -104,6 +108,7 @@ public class InstanceClientTest { setMinCpuPlatformInstanceMethodDescriptor, setSchedulingInstanceMethodDescriptor, setServiceAccountInstanceMethodDescriptor, + setShieldedInstanceIntegrityPolicyInstanceMethodDescriptor, setTagsInstanceMethodDescriptor, simulateMaintenanceEventInstanceMethodDescriptor, startInstanceMethodDescriptor, @@ -111,7 +116,8 @@ public class InstanceClientTest { stopInstanceMethodDescriptor, testIamPermissionsInstanceMethodDescriptor, updateAccessConfigInstanceMethodDescriptor, - updateNetworkInterfaceInstanceMethodDescriptor)); + updateNetworkInterfaceInstanceMethodDescriptor, + updateShieldedInstanceConfigInstanceMethodDescriptor)); private static final MockHttpService mockService = new MockHttpService(METHOD_DESCRIPTORS, InstanceStubSettings.getDefaultEndpoint()); @@ -866,6 +872,54 @@ public void getSerialPortOutputInstanceExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void getShieldedInstanceIdentityInstanceTest() { + String kind = "kind3292052"; + ShieldedInstanceIdentity expectedResponse = + ShieldedInstanceIdentity.newBuilder().setKind(kind).build(); + mockService.addResponse(expectedResponse); + + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + + ShieldedInstanceIdentity actualResponse = client.getShieldedInstanceIdentityInstance(instance); + 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 + @SuppressWarnings("all") + public void getShieldedInstanceIdentityInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + + client.getShieldedInstanceIdentityInstance(instance); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void insertInstanceTest() { @@ -2065,6 +2119,105 @@ public void setServiceAccountInstanceExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void setShieldedInstanceIntegrityPolicyInstanceTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = + ShieldedInstanceIntegrityPolicy.newBuilder().build(); + List fieldMask = new ArrayList<>(); + + Operation actualResponse = + client.setShieldedInstanceIntegrityPolicyInstance( + instance, shieldedInstanceIntegrityPolicyResource, fieldMask); + 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 + @SuppressWarnings("all") + public void setShieldedInstanceIntegrityPolicyInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicyResource = + ShieldedInstanceIntegrityPolicy.newBuilder().build(); + List fieldMask = new ArrayList<>(); + + client.setShieldedInstanceIntegrityPolicyInstance( + instance, shieldedInstanceIntegrityPolicyResource, fieldMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void setTagsInstanceTest() { @@ -2768,4 +2921,103 @@ public void updateNetworkInterfaceInstanceExceptionTest() throws Exception { // Expected exception } } + + @Test + @SuppressWarnings("all") + public void updateShieldedInstanceConfigInstanceTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + ShieldedInstanceConfig shieldedInstanceConfigResource = + ShieldedInstanceConfig.newBuilder().build(); + List fieldMask = new ArrayList<>(); + + Operation actualResponse = + client.updateShieldedInstanceConfigInstance( + instance, shieldedInstanceConfigResource, fieldMask); + 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 + @SuppressWarnings("all") + public void updateShieldedInstanceConfigInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + ShieldedInstanceConfig shieldedInstanceConfigResource = + ShieldedInstanceConfig.newBuilder().build(); + List fieldMask = new ArrayList<>(); + + client.updateShieldedInstanceConfigInstance( + instance, shieldedInstanceConfigResource, fieldMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } } diff --git a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/NetworkEndpointGroupClientTest.java b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/NetworkEndpointGroupClientTest.java new file mode 100644 index 000000000000..d34b78ef6c82 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/NetworkEndpointGroupClientTest.java @@ -0,0 +1,797 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.AggregatedListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.NetworkEndpointGroupClient.ListNetworkEndpointsNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.aggregatedListNetworkEndpointGroupsMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.attachNetworkEndpointsNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.deleteNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.detachNetworkEndpointsNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.getNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.insertNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.listNetworkEndpointGroupsMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.listNetworkEndpointsNetworkEndpointGroupsMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNetworkEndpointGroupStub.testIamPermissionsNetworkEndpointGroupMethodDescriptor; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode.Code; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.compute.v1.stub.NetworkEndpointGroupStubSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class NetworkEndpointGroupClientTest { + + private static final List METHOD_DESCRIPTORS = + ImmutableList.copyOf( + Lists.newArrayList( + aggregatedListNetworkEndpointGroupsMethodDescriptor, + attachNetworkEndpointsNetworkEndpointGroupMethodDescriptor, + deleteNetworkEndpointGroupMethodDescriptor, + detachNetworkEndpointsNetworkEndpointGroupMethodDescriptor, + getNetworkEndpointGroupMethodDescriptor, + insertNetworkEndpointGroupMethodDescriptor, + listNetworkEndpointGroupsMethodDescriptor, + listNetworkEndpointsNetworkEndpointGroupsMethodDescriptor, + testIamPermissionsNetworkEndpointGroupMethodDescriptor)); + private static final MockHttpService mockService = + new MockHttpService( + METHOD_DESCRIPTORS, NetworkEndpointGroupStubSettings.getDefaultEndpoint()); + + private static NetworkEndpointGroupClient client; + private static NetworkEndpointGroupSettings clientSettings; + + @BeforeClass + public static void setUp() throws IOException { + clientSettings = + NetworkEndpointGroupSettings.newBuilder() + .setTransportChannelProvider( + NetworkEndpointGroupSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = NetworkEndpointGroupClient.create(clientSettings); + } + + @After + public void cleanUp() { + mockService.reset(); + } + + @AfterClass + public static void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void aggregatedListNetworkEndpointGroupsTest() { + String id = "id3355"; + String kind = "kind3292052"; + String nextPageToken = ""; + String selfLink = "selfLink-1691268851"; + NetworkEndpointGroupsScopedList itemsItem = + NetworkEndpointGroupsScopedList.newBuilder().build(); + Map items = new HashMap<>(); + items.put("items", itemsItem); + NetworkEndpointGroupAggregatedList expectedResponse = + NetworkEndpointGroupAggregatedList.newBuilder() + .setId(id) + .setKind(kind) + .setNextPageToken(nextPageToken) + .setSelfLink(selfLink) + .putAllItems(items) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName project = ProjectName.of("[PROJECT]"); + + AggregatedListNetworkEndpointGroupsPagedResponse pagedListResponse = + client.aggregatedListNetworkEndpointGroups(project); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getItemsMap().values().iterator().next(), resources.get(0)); + + 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 + @SuppressWarnings("all") + public void aggregatedListNetworkEndpointGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName project = ProjectName.of("[PROJECT]"); + + client.aggregatedListNetworkEndpointGroups(project); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void attachNetworkEndpointsNetworkEndpointGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource = + NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build(); + + Operation actualResponse = + client.attachNetworkEndpointsNetworkEndpointGroup( + networkEndpointGroup, networkEndpointGroupsAttachEndpointsRequestResource); + 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 + @SuppressWarnings("all") + public void attachNetworkEndpointsNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + NetworkEndpointGroupsAttachEndpointsRequest + networkEndpointGroupsAttachEndpointsRequestResource = + NetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build(); + + client.attachNetworkEndpointsNetworkEndpointGroup( + networkEndpointGroup, networkEndpointGroupsAttachEndpointsRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteNetworkEndpointGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + + Operation actualResponse = client.deleteNetworkEndpointGroup(networkEndpointGroup); + 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 + @SuppressWarnings("all") + public void deleteNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + + client.deleteNetworkEndpointGroup(networkEndpointGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void detachNetworkEndpointsNetworkEndpointGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource = + NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build(); + + Operation actualResponse = + client.detachNetworkEndpointsNetworkEndpointGroup( + networkEndpointGroup, networkEndpointGroupsDetachEndpointsRequestResource); + 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 + @SuppressWarnings("all") + public void detachNetworkEndpointsNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + NetworkEndpointGroupsDetachEndpointsRequest + networkEndpointGroupsDetachEndpointsRequestResource = + NetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build(); + + client.detachNetworkEndpointsNetworkEndpointGroup( + networkEndpointGroup, networkEndpointGroupsDetachEndpointsRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getNetworkEndpointGroupTest() { + String creationTimestamp = "creationTimestamp567396278"; + Integer defaultPort = 650363969; + String description = "description-1724546052"; + String id = "id3355"; + String kind = "kind3292052"; + String name = "name3373707"; + ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]"); + String networkEndpointType = "networkEndpointType118301523"; + String selfLink = "selfLink-1691268851"; + Integer size = 3530753; + ProjectRegionSubnetworkName subnetwork = + ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]"); + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + NetworkEndpointGroup expectedResponse = + NetworkEndpointGroup.newBuilder() + .setCreationTimestamp(creationTimestamp) + .setDefaultPort(defaultPort) + .setDescription(description) + .setId(id) + .setKind(kind) + .setName(name) + .setNetwork(network.toString()) + .setNetworkEndpointType(networkEndpointType) + .setSelfLink(selfLink) + .setSize(size) + .setSubnetwork(subnetwork.toString()) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + + NetworkEndpointGroup actualResponse = client.getNetworkEndpointGroup(networkEndpointGroup); + 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 + @SuppressWarnings("all") + public void getNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + + client.getNetworkEndpointGroup(networkEndpointGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void insertNetworkEndpointGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone2 = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone2.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build(); + + Operation actualResponse = + client.insertNetworkEndpointGroup(zone, networkEndpointGroupResource); + 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 + @SuppressWarnings("all") + public void insertNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build(); + + client.insertNetworkEndpointGroup(zone, networkEndpointGroupResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listNetworkEndpointGroupsTest() { + String id = "id3355"; + String kind = "kind3292052"; + String nextPageToken = ""; + String selfLink = "selfLink-1691268851"; + NetworkEndpointGroup itemsElement = NetworkEndpointGroup.newBuilder().build(); + List items = Arrays.asList(itemsElement); + NetworkEndpointGroupList expectedResponse = + NetworkEndpointGroupList.newBuilder() + .setId(id) + .setKind(kind) + .setNextPageToken(nextPageToken) + .setSelfLink(selfLink) + .addAllItems(items) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + + ListNetworkEndpointGroupsPagedResponse pagedListResponse = + client.listNetworkEndpointGroups(zone); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + 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 + @SuppressWarnings("all") + public void listNetworkEndpointGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + + client.listNetworkEndpointGroups(zone); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listNetworkEndpointsNetworkEndpointGroupsTest() { + String id = "id3355"; + String kind = "kind3292052"; + String nextPageToken = ""; + NetworkEndpointWithHealthStatus itemsElement = + NetworkEndpointWithHealthStatus.newBuilder().build(); + List items = Arrays.asList(itemsElement); + NetworkEndpointGroupsListNetworkEndpoints expectedResponse = + NetworkEndpointGroupsListNetworkEndpoints.newBuilder() + .setId(id) + .setKind(kind) + .setNextPageToken(nextPageToken) + .addAllItems(items) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource = + NetworkEndpointGroupsListEndpointsRequest.newBuilder().build(); + + ListNetworkEndpointsNetworkEndpointGroupsPagedResponse pagedListResponse = + client.listNetworkEndpointsNetworkEndpointGroups( + networkEndpointGroup, networkEndpointGroupsListEndpointsRequestResource); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + 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 + @SuppressWarnings("all") + public void listNetworkEndpointsNetworkEndpointGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneNetworkEndpointGroupName networkEndpointGroup = + ProjectZoneNetworkEndpointGroupName.of("[PROJECT]", "[ZONE]", "[NETWORK_ENDPOINT_GROUP]"); + NetworkEndpointGroupsListEndpointsRequest networkEndpointGroupsListEndpointsRequestResource = + NetworkEndpointGroupsListEndpointsRequest.newBuilder().build(); + + client.listNetworkEndpointsNetworkEndpointGroups( + networkEndpointGroup, networkEndpointGroupsListEndpointsRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void testIamPermissionsNetworkEndpointGroupTest() { + TestPermissionsResponse expectedResponse = TestPermissionsResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProjectZoneNetworkEndpointGroupResourceName resource = + ProjectZoneNetworkEndpointGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]"); + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + + TestPermissionsResponse actualResponse = + client.testIamPermissionsNetworkEndpointGroup(resource, testPermissionsRequestResource); + 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 + @SuppressWarnings("all") + public void testIamPermissionsNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneNetworkEndpointGroupResourceName resource = + ProjectZoneNetworkEndpointGroupResourceName.of("[PROJECT]", "[ZONE]", "[RESOURCE]"); + TestPermissionsRequest testPermissionsRequestResource = + TestPermissionsRequest.newBuilder().build(); + + client.testIamPermissionsNetworkEndpointGroup(resource, testPermissionsRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-clients/google-cloud-compute/synth.metadata b/google-cloud-clients/google-cloud-compute/synth.metadata index 396abb575e71..4330364df4db 100644 --- a/google-cloud-clients/google-cloud-compute/synth.metadata +++ b/google-cloud-clients/google-cloud-compute/synth.metadata @@ -1,18 +1,18 @@ { - "updateTime": "2019-03-23T07:37:04.485920Z", + "updateTime": "2019-04-05T07:39:47.301268Z", "sources": [ { "git": { "name": "discovery-artifact-manager", "remote": "https://github.com/googleapis/discovery-artifact-manager.git", - "sha": "891ad31c01291863e08aaff6d3fe85ca34c44fe9" + "sha": "3a104d61d1f6867527174147405443d0af3f9921" } }, { "generator": { "name": "artman", - "version": "0.16.19", - "dockerImage": "googleapis/artman@sha256:70ba28fda87e032ae44e6df41b7fc342c1b0cce1ed90658c4890eb4f613038c2" + "version": "0.16.25", + "dockerImage": "googleapis/artman@sha256:d9597f983d1d4e61272c63cb97b7d8f8234da9999526c35d357de3d781f0ec1b" } } ]