From 29d5473515e9a6c67d78d5d24c052f33bd10fd02 Mon Sep 17 00:00:00 2001 From: dpebot Date: Wed, 7 Nov 2018 00:34:17 -0800 Subject: [PATCH] Regenerate compute client --- .../cloud/compute/v1/InstanceClient.java | 23 +- .../InstanceGroupManagerActionsSummary.java | 40 +- .../v1/InstanceGroupManagerClient.java | 156 +++--- .../compute/v1/InterconnectDiagnostics.java | 230 +++++++++ .../v1/InterconnectDiagnosticsARPEntry.java | 175 +++++++ ...InterconnectDiagnosticsLinkLACPStatus.java | 205 ++++++++ ...terconnectDiagnosticsLinkOpticalPower.java | 175 +++++++ .../v1/InterconnectDiagnosticsLinkStatus.java | 323 ++++++++++++ .../InterconnectsGetDiagnosticsResponse.java | 142 ++++++ .../cloud/compute/v1/LicenseClient.java | 4 +- .../cloud/compute/v1/LicenseCodeClient.java | 4 +- .../cloud/compute/v1/RegionDiskClient.java | 4 +- .../v1/RegionInstanceGroupManagerClient.java | 148 +++--- .../com/google/cloud/compute/v1/Router.java | 43 ++ .../google/cloud/compute/v1/RouterNat.java | 462 ++++++++++++++++++ .../compute/v1/RouterNatSubnetworkToNat.java | 228 +++++++++ .../google/cloud/compute/v1/RouterStatus.java | 45 +- .../compute/v1/RouterStatusNatStatus.java | 345 +++++++++++++ .../compute/v1/VmEndpointNatMappings.java | 190 +++++++ ...dpointNatMappingsInterfaceNatMappings.java | 251 ++++++++++ .../compute/v1/VmEndpointNatMappingsList.java | 309 ++++++++++++ 21 files changed, 3349 insertions(+), 153 deletions(-) create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnostics.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsARPEntry.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkLACPStatus.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkOpticalPower.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkStatus.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectsGetDiagnosticsResponse.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterNat.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterNatSubnetworkToNat.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatus.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappings.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappings.java create mode 100644 google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsList.java 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 b1c3521554e2..a0bc4932428e 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 @@ -1360,7 +1360,8 @@ public final UnaryCallable listInstances // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves the list of referrers to instances contained within the specified zone. + * Retrieves the list of referrers to instances contained within the specified zone. For more + * information, read Viewing Referrers to VM Instances. * *

Sample code: * @@ -1389,7 +1390,8 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves the list of referrers to instances contained within the specified zone. + * Retrieves the list of referrers to instances contained within the specified zone. For more + * information, read Viewing Referrers to VM Instances. * *

Sample code: * @@ -1415,7 +1417,8 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances(String i // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves the list of referrers to instances contained within the specified zone. + * Retrieves the list of referrers to instances contained within the specified zone. For more + * information, read Viewing Referrers to VM Instances. * *

Sample code: * @@ -1442,7 +1445,8 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves the list of referrers to instances contained within the specified zone. + * Retrieves the list of referrers to instances contained within the specified zone. For more + * information, read Viewing Referrers to VM Instances. * *

Sample code: * @@ -1468,7 +1472,8 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves the list of referrers to instances contained within the specified zone. + * Retrieves the list of referrers to instances contained within the specified zone. For more + * information, read Viewing Referrers to VM Instances. * *

Sample code: * @@ -2641,7 +2646,7 @@ public final Operation setServiceAccountInstance(SetServiceAccountInstanceHttpRe // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Sets tags for the specified instance to the data included in the request. + * Sets network tags for the specified instance to the data included in the request. * *

Sample code: * @@ -2670,7 +2675,7 @@ public final Operation setTagsInstance(ProjectZoneInstanceName instance, Tags ta // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Sets tags for the specified instance to the data included in the request. + * Sets network tags for the specified instance to the data included in the request. * *

Sample code: * @@ -2699,7 +2704,7 @@ public final Operation setTagsInstance(String instance, Tags tagsResource) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Sets tags for the specified instance to the data included in the request. + * Sets network tags for the specified instance to the data included in the request. * *

Sample code: * @@ -2725,7 +2730,7 @@ public final Operation setTagsInstance(SetTagsInstanceHttpRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Sets tags for the specified instance to the data included in the request. + * Sets network tags for the specified instance to the data included in the request. * *

Sample code: * diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerActionsSummary.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerActionsSummary.java index e7dee1d39935..d192cf844bdd 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerActionsSummary.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerActionsSummary.java @@ -33,6 +33,7 @@ public final class InstanceGroupManagerActionsSummary implements ApiMessage { private final Integer recreating; private final Integer refreshing; private final Integer restarting; + private final Integer verifying; private InstanceGroupManagerActionsSummary() { this.abandoning = null; @@ -43,6 +44,7 @@ private InstanceGroupManagerActionsSummary() { this.recreating = null; this.refreshing = null; this.restarting = null; + this.verifying = null; } private InstanceGroupManagerActionsSummary( @@ -53,7 +55,8 @@ private InstanceGroupManagerActionsSummary( Integer none, Integer recreating, Integer refreshing, - Integer restarting) { + Integer restarting, + Integer verifying) { this.abandoning = abandoning; this.creating = creating; this.creatingWithoutRetries = creatingWithoutRetries; @@ -62,6 +65,7 @@ private InstanceGroupManagerActionsSummary( this.recreating = recreating; this.refreshing = refreshing; this.restarting = restarting; + this.verifying = verifying; } @Override @@ -90,6 +94,9 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("restarting")) { return restarting; } + if (fieldName.equals("verifying")) { + return verifying; + } return null; } @@ -137,6 +144,10 @@ public Integer getRestarting() { return restarting; } + public Integer getVerifying() { + return verifying; + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } @@ -168,6 +179,7 @@ public static class Builder { private Integer recreating; private Integer refreshing; private Integer restarting; + private Integer verifying; Builder() {} @@ -197,6 +209,9 @@ public Builder mergeFrom(InstanceGroupManagerActionsSummary other) { if (other.getRestarting() != null) { this.restarting = other.restarting; } + if (other.getVerifying() != null) { + this.verifying = other.verifying; + } return this; } @@ -209,6 +224,7 @@ public Builder mergeFrom(InstanceGroupManagerActionsSummary other) { this.recreating = source.recreating; this.refreshing = source.refreshing; this.restarting = source.restarting; + this.verifying = source.verifying; } public Integer getAbandoning() { @@ -283,6 +299,15 @@ public Builder setRestarting(Integer restarting) { return this; } + public Integer getVerifying() { + return verifying; + } + + public Builder setVerifying(Integer verifying) { + this.verifying = verifying; + return this; + } + public InstanceGroupManagerActionsSummary build() { return new InstanceGroupManagerActionsSummary( @@ -293,7 +318,8 @@ public InstanceGroupManagerActionsSummary build() { none, recreating, refreshing, - restarting); + restarting, + verifying); } public Builder clone() { @@ -306,6 +332,7 @@ public Builder clone() { newBuilder.setRecreating(this.recreating); newBuilder.setRefreshing(this.refreshing); newBuilder.setRestarting(this.restarting); + newBuilder.setVerifying(this.verifying); return newBuilder; } } @@ -336,6 +363,9 @@ public String toString() { + ", " + "restarting=" + restarting + + ", " + + "verifying=" + + verifying + "}"; } @@ -353,7 +383,8 @@ public boolean equals(Object o) { && Objects.equals(this.none, that.getNone()) && Objects.equals(this.recreating, that.getRecreating()) && Objects.equals(this.refreshing, that.getRefreshing()) - && Objects.equals(this.restarting, that.getRestarting()); + && Objects.equals(this.restarting, that.getRestarting()) + && Objects.equals(this.verifying, that.getVerifying()); } return false; } @@ -368,6 +399,7 @@ public int hashCode() { none, recreating, refreshing, - restarting); + restarting, + verifying); } } 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 c266a5718d82..921bb853788b 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 @@ -156,12 +156,12 @@ public InstanceGroupManagerStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to remove the specified instances from the managed instance group. - * Abandoning an instance does not delete the instance, but it does remove the instance from any - * target pools that are applied by the managed instance group. This method reduces the targetSize - * of the managed instance group by the number of instances that you abandon. This operation is - * marked as DONE when the action is scheduled even if the instances have not yet been removed - * from the group. You must separately verify the status of the abandoning action with the + * Flags the specified instances to be removed from the managed instance group. Abandoning an + * instance does not delete the instance, but it does remove the instance from any target pools + * that are applied by the managed instance group. This method reduces the targetSize of the + * managed instance group by the number of instances that you abandon. This operation is marked as + * DONE when the action is scheduled even if the instances have not yet been removed from the + * group. You must separately verify the status of the abandoning action with the * listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take @@ -202,12 +202,12 @@ public final Operation abandonInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to remove the specified instances from the managed instance group. - * Abandoning an instance does not delete the instance, but it does remove the instance from any - * target pools that are applied by the managed instance group. This method reduces the targetSize - * of the managed instance group by the number of instances that you abandon. This operation is - * marked as DONE when the action is scheduled even if the instances have not yet been removed - * from the group. You must separately verify the status of the abandoning action with the + * Flags the specified instances to be removed from the managed instance group. Abandoning an + * instance does not delete the instance, but it does remove the instance from any target pools + * that are applied by the managed instance group. This method reduces the targetSize of the + * managed instance group by the number of instances that you abandon. This operation is marked as + * DONE when the action is scheduled even if the instances have not yet been removed from the + * group. You must separately verify the status of the abandoning action with the * listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take @@ -247,12 +247,12 @@ public final Operation abandonInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to remove the specified instances from the managed instance group. - * Abandoning an instance does not delete the instance, but it does remove the instance from any - * target pools that are applied by the managed instance group. This method reduces the targetSize - * of the managed instance group by the number of instances that you abandon. This operation is - * marked as DONE when the action is scheduled even if the instances have not yet been removed - * from the group. You must separately verify the status of the abandoning action with the + * Flags the specified instances to be removed from the managed instance group. Abandoning an + * instance does not delete the instance, but it does remove the instance from any target pools + * that are applied by the managed instance group. This method reduces the targetSize of the + * managed instance group by the number of instances that you abandon. This operation is marked as + * DONE when the action is scheduled even if the instances have not yet been removed from the + * group. You must separately verify the status of the abandoning action with the * listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take @@ -286,12 +286,12 @@ public final Operation abandonInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to remove the specified instances from the managed instance group. - * Abandoning an instance does not delete the instance, but it does remove the instance from any - * target pools that are applied by the managed instance group. This method reduces the targetSize - * of the managed instance group by the number of instances that you abandon. This operation is - * marked as DONE when the action is scheduled even if the instances have not yet been removed - * from the group. You must separately verify the status of the abandoning action with the + * Flags the specified instances to be removed from the managed instance group. Abandoning an + * instance does not delete the instance, but it does remove the instance from any target pools + * that are applied by the managed instance group. This method reduces the targetSize of the + * managed instance group by the number of instances that you abandon. This operation is marked as + * DONE when the action is scheduled even if the instances have not yet been removed from the + * group. You must separately verify the status of the abandoning action with the * listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take @@ -577,7 +577,7 @@ public final Operation deleteInstanceGroupManager(DeleteInstanceGroupManagerHttp // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to delete the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group for immediate deletion. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you * delete. This operation is marked as DONE when the action is scheduled even if the instances are @@ -622,7 +622,7 @@ public final Operation deleteInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to delete the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group for immediate deletion. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you * delete. This operation is marked as DONE when the action is scheduled even if the instances are @@ -666,7 +666,7 @@ public final Operation deleteInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to delete the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group for immediate deletion. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you * delete. This operation is marked as DONE when the action is scheduled even if the instances are @@ -704,7 +704,7 @@ public final Operation deleteInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to delete the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group for immediate deletion. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you * delete. This operation is marked as DONE when the action is scheduled even if the instances are @@ -849,10 +849,10 @@ public final InstanceGroupManager getInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a managed instance group using the information that you specify in the request. After - * the group is created, it schedules an action to create instances in the group using the - * specified instance template. This operation is marked as DONE when the group is created even if - * the instances in the group have not yet been created. You must separately verify the status of - * the individual instances with the listmanagedinstances method. + * the group is created, instances in the group are created using the specified instance template. + * This operation is marked as DONE when the group is created even if the instances in the group + * have not yet been created. You must separately verify the status of the individual instances + * with the listmanagedinstances method. * *

A managed instance group can have up to 1000 VM instances per group. Please contact Cloud * Support if you need an increase in this limit. @@ -889,10 +889,10 @@ public final Operation insertInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a managed instance group using the information that you specify in the request. After - * the group is created, it schedules an action to create instances in the group using the - * specified instance template. This operation is marked as DONE when the group is created even if - * the instances in the group have not yet been created. You must separately verify the status of - * the individual instances with the listmanagedinstances method. + * the group is created, instances in the group are created using the specified instance template. + * This operation is marked as DONE when the group is created even if the instances in the group + * have not yet been created. You must separately verify the status of the individual instances + * with the listmanagedinstances method. * *

A managed instance group can have up to 1000 VM instances per group. Please contact Cloud * Support if you need an increase in this limit. @@ -929,10 +929,10 @@ public final Operation insertInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a managed instance group using the information that you specify in the request. After - * the group is created, it schedules an action to create instances in the group using the - * specified instance template. This operation is marked as DONE when the group is created even if - * the instances in the group have not yet been created. You must separately verify the status of - * the individual instances with the listmanagedinstances method. + * the group is created, instances in the group are created using the specified instance template. + * This operation is marked as DONE when the group is created even if the instances in the group + * have not yet been created. You must separately verify the status of the individual instances + * with the listmanagedinstances method. * *

A managed instance group can have up to 1000 VM instances per group. Please contact Cloud * Support if you need an increase in this limit. @@ -962,10 +962,10 @@ public final Operation insertInstanceGroupManager(InsertInstanceGroupManagerHttp // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a managed instance group using the information that you specify in the request. After - * the group is created, it schedules an action to create instances in the group using the - * specified instance template. This operation is marked as DONE when the group is created even if - * the instances in the group have not yet been created. You must separately verify the status of - * the individual instances with the listmanagedinstances method. + * the group is created, instances in the group are created using the specified instance template. + * This operation is marked as DONE when the group is created even if the instances in the group + * have not yet been created. You must separately verify the status of the individual instances + * with the listmanagedinstances method. * *

A managed instance group can have up to 1000 VM instances per group. Please contact Cloud * Support if you need an increase in this limit. @@ -1259,11 +1259,11 @@ public final ListInstanceGroupManagersPagedResponse listInstanceGroupManagers( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to recreate the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately recreated. The * instances are deleted and recreated using the current instance template for the managed - * instance group. This operation is marked as DONE when the action is scheduled even if the - * instances have not yet been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. + * instance group. This operation is marked as DONE when the flag is set even if the instances + * have not yet been recreated. You must separately verify the status of the recreating action + * with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -1303,11 +1303,11 @@ public final Operation recreateInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to recreate the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately recreated. The * instances are deleted and recreated using the current instance template for the managed - * instance group. This operation is marked as DONE when the action is scheduled even if the - * instances have not yet been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. + * instance group. This operation is marked as DONE when the flag is set even if the instances + * have not yet been recreated. You must separately verify the status of the recreating action + * with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -1346,11 +1346,11 @@ public final Operation recreateInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to recreate the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately recreated. The * instances are deleted and recreated using the current instance template for the managed - * instance group. This operation is marked as DONE when the action is scheduled even if the - * instances have not yet been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. + * instance group. This operation is marked as DONE when the flag is set even if the instances + * have not yet been recreated. You must separately verify the status of the recreating action + * with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -1383,11 +1383,11 @@ public final Operation recreateInstancesInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to recreate the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately recreated. The * instances are deleted and recreated using the current instance template for the managed - * instance group. This operation is marked as DONE when the action is scheduled even if the - * instances have not yet been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. + * instance group. This operation is marked as DONE when the flag is set even if the instances + * have not yet been recreated. You must separately verify the status of the recreating action + * with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -1425,6 +1425,15 @@ public final Operation recreateInstancesInstanceGroupManager( * yet added or deleted any instances. You must separately verify the status of the creating or * deleting actions with the listmanagedinstances method. * + *

When resizing down, the instance group arbitrarily chooses the order in which VMs are + * deleted. The group takes into account some VM attributes when making the selection including: + * + *

+ The status of the VM instance. + The health of the VM instance. + The instance template + * version the VM is based on. + For regional managed instance groups, the location of the VM + * instance. + * + *

This list is subject to change. + * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is * removed or deleted. @@ -1466,6 +1475,15 @@ public final Operation resizeInstanceGroupManager( * yet added or deleted any instances. You must separately verify the status of the creating or * deleting actions with the listmanagedinstances method. * + *

When resizing down, the instance group arbitrarily chooses the order in which VMs are + * deleted. The group takes into account some VM attributes when making the selection including: + * + *

+ The status of the VM instance. + The health of the VM instance. + The instance template + * version the VM is based on. + For regional managed instance groups, the location of the VM + * instance. + * + *

This list is subject to change. + * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is * removed or deleted. @@ -1505,6 +1523,15 @@ public final Operation resizeInstanceGroupManager(Integer size, String instanceG * yet added or deleted any instances. You must separately verify the status of the creating or * deleting actions with the listmanagedinstances method. * + *

When resizing down, the instance group arbitrarily chooses the order in which VMs are + * deleted. The group takes into account some VM attributes when making the selection including: + * + *

+ The status of the VM instance. + The health of the VM instance. + The instance template + * version the VM is based on. + For regional managed instance groups, the location of the VM + * instance. + * + *

This list is subject to change. + * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is * removed or deleted. @@ -1539,6 +1566,15 @@ public final Operation resizeInstanceGroupManager(ResizeInstanceGroupManagerHttp * yet added or deleted any instances. You must separately verify the status of the creating or * deleting actions with the listmanagedinstances method. * + *

When resizing down, the instance group arbitrarily chooses the order in which VMs are + * deleted. The group takes into account some VM attributes when making the selection including: + * + *

+ The status of the VM instance. + The health of the VM instance. + The instance template + * version the VM is based on. + For regional managed instance groups, the location of the VM + * instance. + * + *

This list is subject to change. + * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is * removed or deleted. diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnostics.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnostics.java new file mode 100644 index 000000000000..abec84a84ee4 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnostics.java @@ -0,0 +1,230 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 InterconnectDiagnostics implements ApiMessage { + private final List arpCaches; + private final List links; + private final String macAddress; + + private InterconnectDiagnostics() { + this.arpCaches = null; + this.links = null; + this.macAddress = null; + } + + private InterconnectDiagnostics( + List arpCaches, + List links, + String macAddress) { + this.arpCaches = arpCaches; + this.links = links; + this.macAddress = macAddress; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("arpCaches")) { + return arpCaches; + } + if (fieldName.equals("links")) { + return links; + } + if (fieldName.equals("macAddress")) { + return macAddress; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getArpCachesList() { + return arpCaches; + } + + public List getLinksList() { + return links; + } + + public String getMacAddress() { + return macAddress; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InterconnectDiagnostics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InterconnectDiagnostics getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InterconnectDiagnostics DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InterconnectDiagnostics(); + } + + public static class Builder { + private List arpCaches; + private List links; + private String macAddress; + + Builder() {} + + public Builder mergeFrom(InterconnectDiagnostics other) { + if (other == InterconnectDiagnostics.getDefaultInstance()) return this; + if (other.getArpCachesList() != null) { + this.arpCaches = other.arpCaches; + } + if (other.getLinksList() != null) { + this.links = other.links; + } + if (other.getMacAddress() != null) { + this.macAddress = other.macAddress; + } + return this; + } + + Builder(InterconnectDiagnostics source) { + this.arpCaches = source.arpCaches; + this.links = source.links; + this.macAddress = source.macAddress; + } + + public List getArpCachesList() { + return arpCaches; + } + + public Builder addAllArpCaches(List arpCaches) { + if (this.arpCaches == null) { + this.arpCaches = new LinkedList<>(); + } + this.arpCaches.addAll(arpCaches); + return this; + } + + public Builder addArpCaches(InterconnectDiagnosticsARPEntry arpCaches) { + if (this.arpCaches == null) { + this.arpCaches = new LinkedList<>(); + } + this.arpCaches.add(arpCaches); + return this; + } + + public List getLinksList() { + return links; + } + + public Builder addAllLinks(List links) { + if (this.links == null) { + this.links = new LinkedList<>(); + } + this.links.addAll(links); + return this; + } + + public Builder addLinks(InterconnectDiagnosticsLinkStatus links) { + if (this.links == null) { + this.links = new LinkedList<>(); + } + this.links.add(links); + return this; + } + + public String getMacAddress() { + return macAddress; + } + + public Builder setMacAddress(String macAddress) { + this.macAddress = macAddress; + return this; + } + + public InterconnectDiagnostics build() { + + return new InterconnectDiagnostics(arpCaches, links, macAddress); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllArpCaches(this.arpCaches); + newBuilder.addAllLinks(this.links); + newBuilder.setMacAddress(this.macAddress); + return newBuilder; + } + } + + @Override + public String toString() { + return "InterconnectDiagnostics{" + + "arpCaches=" + + arpCaches + + ", " + + "links=" + + links + + ", " + + "macAddress=" + + macAddress + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InterconnectDiagnostics) { + InterconnectDiagnostics that = (InterconnectDiagnostics) o; + return Objects.equals(this.arpCaches, that.getArpCachesList()) + && Objects.equals(this.links, that.getLinksList()) + && Objects.equals(this.macAddress, that.getMacAddress()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(arpCaches, links, macAddress); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsARPEntry.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsARPEntry.java new file mode 100644 index 000000000000..164ee84f7705 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsARPEntry.java @@ -0,0 +1,175 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 InterconnectDiagnosticsARPEntry implements ApiMessage { + private final String ipAddress; + private final String macAddress; + + private InterconnectDiagnosticsARPEntry() { + this.ipAddress = null; + this.macAddress = null; + } + + private InterconnectDiagnosticsARPEntry(String ipAddress, String macAddress) { + this.ipAddress = ipAddress; + this.macAddress = macAddress; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("ipAddress")) { + return ipAddress; + } + if (fieldName.equals("macAddress")) { + return macAddress; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getIpAddress() { + return ipAddress; + } + + public String getMacAddress() { + return macAddress; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InterconnectDiagnosticsARPEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InterconnectDiagnosticsARPEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InterconnectDiagnosticsARPEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InterconnectDiagnosticsARPEntry(); + } + + public static class Builder { + private String ipAddress; + private String macAddress; + + Builder() {} + + public Builder mergeFrom(InterconnectDiagnosticsARPEntry other) { + if (other == InterconnectDiagnosticsARPEntry.getDefaultInstance()) return this; + if (other.getIpAddress() != null) { + this.ipAddress = other.ipAddress; + } + if (other.getMacAddress() != null) { + this.macAddress = other.macAddress; + } + return this; + } + + Builder(InterconnectDiagnosticsARPEntry source) { + this.ipAddress = source.ipAddress; + this.macAddress = source.macAddress; + } + + public String getIpAddress() { + return ipAddress; + } + + public Builder setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + public String getMacAddress() { + return macAddress; + } + + public Builder setMacAddress(String macAddress) { + this.macAddress = macAddress; + return this; + } + + public InterconnectDiagnosticsARPEntry build() { + + return new InterconnectDiagnosticsARPEntry(ipAddress, macAddress); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setIpAddress(this.ipAddress); + newBuilder.setMacAddress(this.macAddress); + return newBuilder; + } + } + + @Override + public String toString() { + return "InterconnectDiagnosticsARPEntry{" + + "ipAddress=" + + ipAddress + + ", " + + "macAddress=" + + macAddress + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InterconnectDiagnosticsARPEntry) { + InterconnectDiagnosticsARPEntry that = (InterconnectDiagnosticsARPEntry) o; + return Objects.equals(this.ipAddress, that.getIpAddress()) + && Objects.equals(this.macAddress, that.getMacAddress()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(ipAddress, macAddress); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkLACPStatus.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkLACPStatus.java new file mode 100644 index 000000000000..808c4e3b11ba --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkLACPStatus.java @@ -0,0 +1,205 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 InterconnectDiagnosticsLinkLACPStatus implements ApiMessage { + private final String googleSystemId; + private final String neighborSystemId; + private final String state; + + private InterconnectDiagnosticsLinkLACPStatus() { + this.googleSystemId = null; + this.neighborSystemId = null; + this.state = null; + } + + private InterconnectDiagnosticsLinkLACPStatus( + String googleSystemId, String neighborSystemId, String state) { + this.googleSystemId = googleSystemId; + this.neighborSystemId = neighborSystemId; + this.state = state; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("googleSystemId")) { + return googleSystemId; + } + if (fieldName.equals("neighborSystemId")) { + return neighborSystemId; + } + if (fieldName.equals("state")) { + return state; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getGoogleSystemId() { + return googleSystemId; + } + + public String getNeighborSystemId() { + return neighborSystemId; + } + + public String getState() { + return state; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InterconnectDiagnosticsLinkLACPStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InterconnectDiagnosticsLinkLACPStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InterconnectDiagnosticsLinkLACPStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InterconnectDiagnosticsLinkLACPStatus(); + } + + public static class Builder { + private String googleSystemId; + private String neighborSystemId; + private String state; + + Builder() {} + + public Builder mergeFrom(InterconnectDiagnosticsLinkLACPStatus other) { + if (other == InterconnectDiagnosticsLinkLACPStatus.getDefaultInstance()) return this; + if (other.getGoogleSystemId() != null) { + this.googleSystemId = other.googleSystemId; + } + if (other.getNeighborSystemId() != null) { + this.neighborSystemId = other.neighborSystemId; + } + if (other.getState() != null) { + this.state = other.state; + } + return this; + } + + Builder(InterconnectDiagnosticsLinkLACPStatus source) { + this.googleSystemId = source.googleSystemId; + this.neighborSystemId = source.neighborSystemId; + this.state = source.state; + } + + public String getGoogleSystemId() { + return googleSystemId; + } + + public Builder setGoogleSystemId(String googleSystemId) { + this.googleSystemId = googleSystemId; + return this; + } + + public String getNeighborSystemId() { + return neighborSystemId; + } + + public Builder setNeighborSystemId(String neighborSystemId) { + this.neighborSystemId = neighborSystemId; + return this; + } + + public String getState() { + return state; + } + + public Builder setState(String state) { + this.state = state; + return this; + } + + public InterconnectDiagnosticsLinkLACPStatus build() { + + return new InterconnectDiagnosticsLinkLACPStatus(googleSystemId, neighborSystemId, state); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setGoogleSystemId(this.googleSystemId); + newBuilder.setNeighborSystemId(this.neighborSystemId); + newBuilder.setState(this.state); + return newBuilder; + } + } + + @Override + public String toString() { + return "InterconnectDiagnosticsLinkLACPStatus{" + + "googleSystemId=" + + googleSystemId + + ", " + + "neighborSystemId=" + + neighborSystemId + + ", " + + "state=" + + state + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InterconnectDiagnosticsLinkLACPStatus) { + InterconnectDiagnosticsLinkLACPStatus that = (InterconnectDiagnosticsLinkLACPStatus) o; + return Objects.equals(this.googleSystemId, that.getGoogleSystemId()) + && Objects.equals(this.neighborSystemId, that.getNeighborSystemId()) + && Objects.equals(this.state, that.getState()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(googleSystemId, neighborSystemId, state); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkOpticalPower.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkOpticalPower.java new file mode 100644 index 000000000000..f5ec4c569b20 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkOpticalPower.java @@ -0,0 +1,175 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 InterconnectDiagnosticsLinkOpticalPower implements ApiMessage { + private final String state; + private final Float value; + + private InterconnectDiagnosticsLinkOpticalPower() { + this.state = null; + this.value = null; + } + + private InterconnectDiagnosticsLinkOpticalPower(String state, Float value) { + this.state = state; + this.value = value; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("state")) { + return state; + } + if (fieldName.equals("value")) { + return value; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getState() { + return state; + } + + public Float getValue() { + return value; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InterconnectDiagnosticsLinkOpticalPower prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InterconnectDiagnosticsLinkOpticalPower getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InterconnectDiagnosticsLinkOpticalPower DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InterconnectDiagnosticsLinkOpticalPower(); + } + + public static class Builder { + private String state; + private Float value; + + Builder() {} + + public Builder mergeFrom(InterconnectDiagnosticsLinkOpticalPower other) { + if (other == InterconnectDiagnosticsLinkOpticalPower.getDefaultInstance()) return this; + if (other.getState() != null) { + this.state = other.state; + } + if (other.getValue() != null) { + this.value = other.value; + } + return this; + } + + Builder(InterconnectDiagnosticsLinkOpticalPower source) { + this.state = source.state; + this.value = source.value; + } + + public String getState() { + return state; + } + + public Builder setState(String state) { + this.state = state; + return this; + } + + public Float getValue() { + return value; + } + + public Builder setValue(Float value) { + this.value = value; + return this; + } + + public InterconnectDiagnosticsLinkOpticalPower build() { + + return new InterconnectDiagnosticsLinkOpticalPower(state, value); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setState(this.state); + newBuilder.setValue(this.value); + return newBuilder; + } + } + + @Override + public String toString() { + return "InterconnectDiagnosticsLinkOpticalPower{" + + "state=" + + state + + ", " + + "value=" + + value + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InterconnectDiagnosticsLinkOpticalPower) { + InterconnectDiagnosticsLinkOpticalPower that = (InterconnectDiagnosticsLinkOpticalPower) o; + return Objects.equals(this.state, that.getState()) + && Objects.equals(this.value, that.getValue()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(state, value); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkStatus.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkStatus.java new file mode 100644 index 000000000000..95586f3ecdff --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkStatus.java @@ -0,0 +1,323 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 InterconnectDiagnosticsLinkStatus implements ApiMessage { + private final List arpCaches; + private final String circuitId; + private final String googleDemarc; + private final InterconnectDiagnosticsLinkLACPStatus lacpStatus; + private final InterconnectDiagnosticsLinkOpticalPower receivingOpticalPower; + private final InterconnectDiagnosticsLinkOpticalPower transmittingOpticalPower; + + private InterconnectDiagnosticsLinkStatus() { + this.arpCaches = null; + this.circuitId = null; + this.googleDemarc = null; + this.lacpStatus = null; + this.receivingOpticalPower = null; + this.transmittingOpticalPower = null; + } + + private InterconnectDiagnosticsLinkStatus( + List arpCaches, + String circuitId, + String googleDemarc, + InterconnectDiagnosticsLinkLACPStatus lacpStatus, + InterconnectDiagnosticsLinkOpticalPower receivingOpticalPower, + InterconnectDiagnosticsLinkOpticalPower transmittingOpticalPower) { + this.arpCaches = arpCaches; + this.circuitId = circuitId; + this.googleDemarc = googleDemarc; + this.lacpStatus = lacpStatus; + this.receivingOpticalPower = receivingOpticalPower; + this.transmittingOpticalPower = transmittingOpticalPower; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("arpCaches")) { + return arpCaches; + } + if (fieldName.equals("circuitId")) { + return circuitId; + } + if (fieldName.equals("googleDemarc")) { + return googleDemarc; + } + if (fieldName.equals("lacpStatus")) { + return lacpStatus; + } + if (fieldName.equals("receivingOpticalPower")) { + return receivingOpticalPower; + } + if (fieldName.equals("transmittingOpticalPower")) { + return transmittingOpticalPower; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getArpCachesList() { + return arpCaches; + } + + public String getCircuitId() { + return circuitId; + } + + public String getGoogleDemarc() { + return googleDemarc; + } + + public InterconnectDiagnosticsLinkLACPStatus getLacpStatus() { + return lacpStatus; + } + + public InterconnectDiagnosticsLinkOpticalPower getReceivingOpticalPower() { + return receivingOpticalPower; + } + + public InterconnectDiagnosticsLinkOpticalPower getTransmittingOpticalPower() { + return transmittingOpticalPower; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InterconnectDiagnosticsLinkStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InterconnectDiagnosticsLinkStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InterconnectDiagnosticsLinkStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InterconnectDiagnosticsLinkStatus(); + } + + public static class Builder { + private List arpCaches; + private String circuitId; + private String googleDemarc; + private InterconnectDiagnosticsLinkLACPStatus lacpStatus; + private InterconnectDiagnosticsLinkOpticalPower receivingOpticalPower; + private InterconnectDiagnosticsLinkOpticalPower transmittingOpticalPower; + + Builder() {} + + public Builder mergeFrom(InterconnectDiagnosticsLinkStatus other) { + if (other == InterconnectDiagnosticsLinkStatus.getDefaultInstance()) return this; + if (other.getArpCachesList() != null) { + this.arpCaches = other.arpCaches; + } + if (other.getCircuitId() != null) { + this.circuitId = other.circuitId; + } + if (other.getGoogleDemarc() != null) { + this.googleDemarc = other.googleDemarc; + } + if (other.getLacpStatus() != null) { + this.lacpStatus = other.lacpStatus; + } + if (other.getReceivingOpticalPower() != null) { + this.receivingOpticalPower = other.receivingOpticalPower; + } + if (other.getTransmittingOpticalPower() != null) { + this.transmittingOpticalPower = other.transmittingOpticalPower; + } + return this; + } + + Builder(InterconnectDiagnosticsLinkStatus source) { + this.arpCaches = source.arpCaches; + this.circuitId = source.circuitId; + this.googleDemarc = source.googleDemarc; + this.lacpStatus = source.lacpStatus; + this.receivingOpticalPower = source.receivingOpticalPower; + this.transmittingOpticalPower = source.transmittingOpticalPower; + } + + public List getArpCachesList() { + return arpCaches; + } + + public Builder addAllArpCaches(List arpCaches) { + if (this.arpCaches == null) { + this.arpCaches = new LinkedList<>(); + } + this.arpCaches.addAll(arpCaches); + return this; + } + + public Builder addArpCaches(InterconnectDiagnosticsARPEntry arpCaches) { + if (this.arpCaches == null) { + this.arpCaches = new LinkedList<>(); + } + this.arpCaches.add(arpCaches); + return this; + } + + public String getCircuitId() { + return circuitId; + } + + public Builder setCircuitId(String circuitId) { + this.circuitId = circuitId; + return this; + } + + public String getGoogleDemarc() { + return googleDemarc; + } + + public Builder setGoogleDemarc(String googleDemarc) { + this.googleDemarc = googleDemarc; + return this; + } + + public InterconnectDiagnosticsLinkLACPStatus getLacpStatus() { + return lacpStatus; + } + + public Builder setLacpStatus(InterconnectDiagnosticsLinkLACPStatus lacpStatus) { + this.lacpStatus = lacpStatus; + return this; + } + + public InterconnectDiagnosticsLinkOpticalPower getReceivingOpticalPower() { + return receivingOpticalPower; + } + + public Builder setReceivingOpticalPower( + InterconnectDiagnosticsLinkOpticalPower receivingOpticalPower) { + this.receivingOpticalPower = receivingOpticalPower; + return this; + } + + public InterconnectDiagnosticsLinkOpticalPower getTransmittingOpticalPower() { + return transmittingOpticalPower; + } + + public Builder setTransmittingOpticalPower( + InterconnectDiagnosticsLinkOpticalPower transmittingOpticalPower) { + this.transmittingOpticalPower = transmittingOpticalPower; + return this; + } + + public InterconnectDiagnosticsLinkStatus build() { + + return new InterconnectDiagnosticsLinkStatus( + arpCaches, + circuitId, + googleDemarc, + lacpStatus, + receivingOpticalPower, + transmittingOpticalPower); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllArpCaches(this.arpCaches); + newBuilder.setCircuitId(this.circuitId); + newBuilder.setGoogleDemarc(this.googleDemarc); + newBuilder.setLacpStatus(this.lacpStatus); + newBuilder.setReceivingOpticalPower(this.receivingOpticalPower); + newBuilder.setTransmittingOpticalPower(this.transmittingOpticalPower); + return newBuilder; + } + } + + @Override + public String toString() { + return "InterconnectDiagnosticsLinkStatus{" + + "arpCaches=" + + arpCaches + + ", " + + "circuitId=" + + circuitId + + ", " + + "googleDemarc=" + + googleDemarc + + ", " + + "lacpStatus=" + + lacpStatus + + ", " + + "receivingOpticalPower=" + + receivingOpticalPower + + ", " + + "transmittingOpticalPower=" + + transmittingOpticalPower + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InterconnectDiagnosticsLinkStatus) { + InterconnectDiagnosticsLinkStatus that = (InterconnectDiagnosticsLinkStatus) o; + return Objects.equals(this.arpCaches, that.getArpCachesList()) + && Objects.equals(this.circuitId, that.getCircuitId()) + && Objects.equals(this.googleDemarc, that.getGoogleDemarc()) + && Objects.equals(this.lacpStatus, that.getLacpStatus()) + && Objects.equals(this.receivingOpticalPower, that.getReceivingOpticalPower()) + && Objects.equals(this.transmittingOpticalPower, that.getTransmittingOpticalPower()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + arpCaches, + circuitId, + googleDemarc, + lacpStatus, + receivingOpticalPower, + transmittingOpticalPower); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectsGetDiagnosticsResponse.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectsGetDiagnosticsResponse.java new file mode 100644 index 000000000000..7baddc2fff1c --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectsGetDiagnosticsResponse.java @@ -0,0 +1,142 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 InterconnectsGetDiagnosticsResponse implements ApiMessage { + private final InterconnectDiagnostics result; + + private InterconnectsGetDiagnosticsResponse() { + this.result = null; + } + + private InterconnectsGetDiagnosticsResponse(InterconnectDiagnostics result) { + this.result = result; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("result")) { + return result; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public InterconnectDiagnostics getResult() { + return result; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InterconnectsGetDiagnosticsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InterconnectsGetDiagnosticsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InterconnectsGetDiagnosticsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InterconnectsGetDiagnosticsResponse(); + } + + public static class Builder { + private InterconnectDiagnostics result; + + Builder() {} + + public Builder mergeFrom(InterconnectsGetDiagnosticsResponse other) { + if (other == InterconnectsGetDiagnosticsResponse.getDefaultInstance()) return this; + if (other.getResult() != null) { + this.result = other.result; + } + return this; + } + + Builder(InterconnectsGetDiagnosticsResponse source) { + this.result = source.result; + } + + public InterconnectDiagnostics getResult() { + return result; + } + + public Builder setResult(InterconnectDiagnostics result) { + this.result = result; + return this; + } + + public InterconnectsGetDiagnosticsResponse build() { + return new InterconnectsGetDiagnosticsResponse(result); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setResult(this.result); + return newBuilder; + } + } + + @Override + public String toString() { + return "InterconnectsGetDiagnosticsResponse{" + "result=" + result + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InterconnectsGetDiagnosticsResponse) { + InterconnectsGetDiagnosticsResponse that = (InterconnectsGetDiagnosticsResponse) o; + return Objects.equals(this.result, that.getResult()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(result); + } +} 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 b23b8319adb5..e0ffbd5d4594 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 @@ -622,7 +622,7 @@ public final UnaryCallable listLi * } * * - * @param resource Name of the resource for this request. + * @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 */ @@ -653,7 +653,7 @@ public final TestPermissionsResponse testIamPermissionsLicense( * } * * - * @param resource Name of the resource for this request. + * @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 */ 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 902a70b047ce..db051b8d822e 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 @@ -258,7 +258,7 @@ public final UnaryCallable getLicenseCod * } * * - * @param resource Name of the resource for this request. + * @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 */ @@ -289,7 +289,7 @@ public final TestPermissionsResponse testIamPermissionsLicenseCode( * } * * - * @param resource Name of the resource for this request. + * @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 */ 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 65b229358925..b9e46ac61683 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 @@ -954,7 +954,7 @@ public final Operation setLabelsRegionDisk(SetLabelsRegionDiskHttpRequest reques * } * * - * @param resource Name of the resource for this request. + * @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 */ @@ -985,7 +985,7 @@ public final TestPermissionsResponse testIamPermissionsRegionDisk( * } * * - * @param resource Name of the resource for this request. + * @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 */ 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 9ec4e4d39af4..09d1c6158c21 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 @@ -158,7 +158,7 @@ public RegionInstanceGroupManagerStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to remove the specified instances from the managed instance group. + * Flags the specified instances to be immediately removed from the managed instance group. * Abandoning an instance does not delete the instance, but it does remove the instance from any * target pools that are applied by the managed instance group. This method reduces the targetSize * of the managed instance group by the number of instances that you abandon. This operation is @@ -204,7 +204,7 @@ public final Operation abandonInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to remove the specified instances from the managed instance group. + * Flags the specified instances to be immediately removed from the managed instance group. * Abandoning an instance does not delete the instance, but it does remove the instance from any * target pools that are applied by the managed instance group. This method reduces the targetSize * of the managed instance group by the number of instances that you abandon. This operation is @@ -249,7 +249,7 @@ public final Operation abandonInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to remove the specified instances from the managed instance group. + * Flags the specified instances to be immediately removed from the managed instance group. * Abandoning an instance does not delete the instance, but it does remove the instance from any * target pools that are applied by the managed instance group. This method reduces the targetSize * of the managed instance group by the number of instances that you abandon. This operation is @@ -288,7 +288,7 @@ public final Operation abandonInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to remove the specified instances from the managed instance group. + * Flags the specified instances to be immediately removed from the managed instance group. * Abandoning an instance does not delete the instance, but it does remove the instance from any * target pools that are applied by the managed instance group. This method reduces the targetSize * of the managed instance group by the number of instances that you abandon. This operation is @@ -429,12 +429,12 @@ public final Operation deleteRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to delete the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately deleted. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you - * delete. This operation is marked as DONE when the action is scheduled even if the instances are - * still being deleted. You must separately verify the status of the deleting action with the - * listmanagedinstances method. + * delete. The deleteInstances operation is marked DONE if the deleteInstances request is + * successful. The underlying actions take additional time. You must separately verify the status + * of the deleting action with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -474,12 +474,12 @@ public final Operation deleteInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to delete the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately deleted. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you - * delete. This operation is marked as DONE when the action is scheduled even if the instances are - * still being deleted. You must separately verify the status of the deleting action with the - * listmanagedinstances method. + * delete. The deleteInstances operation is marked DONE if the deleteInstances request is + * successful. The underlying actions take additional time. You must separately verify the status + * of the deleting action with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -518,12 +518,12 @@ public final Operation deleteInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to delete the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately deleted. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you - * delete. This operation is marked as DONE when the action is scheduled even if the instances are - * still being deleted. You must separately verify the status of the deleting action with the - * listmanagedinstances method. + * delete. The deleteInstances operation is marked DONE if the deleteInstances request is + * successful. The underlying actions take additional time. You must separately verify the status + * of the deleting action with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -556,12 +556,12 @@ public final Operation deleteInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to delete the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately deleted. The * instances are also removed from any target pools of which they were a member. This method * reduces the targetSize of the managed instance group by the number of instances that you - * delete. This operation is marked as DONE when the action is scheduled even if the instances are - * still being deleted. You must separately verify the status of the deleting action with the - * listmanagedinstances method. + * delete. The deleteInstances operation is marked DONE if the deleteInstances request is + * successful. The underlying actions take additional time. You must separately verify the status + * of the deleting action with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -697,10 +697,10 @@ public final InstanceGroupManager getRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a managed instance group using the information that you specify in the request. After - * the group is created, it schedules an action to create instances in the group using the - * specified instance template. This operation is marked as DONE when the group is created even if - * the instances in the group have not yet been created. You must separately verify the status of - * the individual instances with the listmanagedinstances method. + * the group is created, instances in the group are created using the specified instance template. + * This operation is marked as DONE when the group is created even if the instances in the group + * have not yet been created. You must separately verify the status of the individual instances + * with the listmanagedinstances method. * *

A regional managed instance group can contain up to 2000 instances. * @@ -736,10 +736,10 @@ public final Operation insertRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a managed instance group using the information that you specify in the request. After - * the group is created, it schedules an action to create instances in the group using the - * specified instance template. This operation is marked as DONE when the group is created even if - * the instances in the group have not yet been created. You must separately verify the status of - * the individual instances with the listmanagedinstances method. + * the group is created, instances in the group are created using the specified instance template. + * This operation is marked as DONE when the group is created even if the instances in the group + * have not yet been created. You must separately verify the status of the individual instances + * with the listmanagedinstances method. * *

A regional managed instance group can contain up to 2000 instances. * @@ -775,10 +775,10 @@ public final Operation insertRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a managed instance group using the information that you specify in the request. After - * the group is created, it schedules an action to create instances in the group using the - * specified instance template. This operation is marked as DONE when the group is created even if - * the instances in the group have not yet been created. You must separately verify the status of - * the individual instances with the listmanagedinstances method. + * the group is created, instances in the group are created using the specified instance template. + * This operation is marked as DONE when the group is created even if the instances in the group + * have not yet been created. You must separately verify the status of the individual instances + * with the listmanagedinstances method. * *

A regional managed instance group can contain up to 2000 instances. * @@ -808,10 +808,10 @@ public final Operation insertRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a managed instance group using the information that you specify in the request. After - * the group is created, it schedules an action to create instances in the group using the - * specified instance template. This operation is marked as DONE when the group is created even if - * the instances in the group have not yet been created. You must separately verify the status of - * the individual instances with the listmanagedinstances method. + * the group is created, instances in the group are created using the specified instance template. + * This operation is marked as DONE when the group is created even if the instances in the group + * have not yet been created. You must separately verify the status of the individual instances + * with the listmanagedinstances method. * *

A regional managed instance group can contain up to 2000 instances. * @@ -1093,11 +1093,11 @@ public final ListRegionInstanceGroupManagersPagedResponse listRegionInstanceGrou // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to recreate the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately recreated. The * instances are deleted and recreated using the current instance template for the managed - * instance group. This operation is marked as DONE when the action is scheduled even if the - * instances have not yet been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. + * instance group. This operation is marked as DONE when the flag is set even if the instances + * have not yet been recreated. You must separately verify the status of the recreating action + * with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -1137,11 +1137,11 @@ public final Operation recreateInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to recreate the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately recreated. The * instances are deleted and recreated using the current instance template for the managed - * instance group. This operation is marked as DONE when the action is scheduled even if the - * instances have not yet been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. + * instance group. This operation is marked as DONE when the flag is set even if the instances + * have not yet been recreated. You must separately verify the status of the recreating action + * with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -1180,11 +1180,11 @@ public final Operation recreateInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to recreate the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately recreated. The * instances are deleted and recreated using the current instance template for the managed - * instance group. This operation is marked as DONE when the action is scheduled even if the - * instances have not yet been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. + * instance group. This operation is marked as DONE when the flag is set even if the instances + * have not yet been recreated. You must separately verify the status of the recreating action + * with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -1217,11 +1217,11 @@ public final Operation recreateInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Schedules a group action to recreate the specified instances in the managed instance group. The + * Flags the specified instances in the managed instance group to be immediately recreated. The * instances are deleted and recreated using the current instance template for the managed - * instance group. This operation is marked as DONE when the action is scheduled even if the - * instances have not yet been recreated. You must separately verify the status of the recreating - * action with the listmanagedinstances method. + * instance group. This operation is marked as DONE when the flag is set even if the instances + * have not yet been recreated. You must separately verify the status of the recreating action + * with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take * up to 60 seconds after the connection draining duration has elapsed before the VM instance is @@ -1253,11 +1253,12 @@ public final Operation recreateInstancesRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Changes the intended size for the managed instance group. If you increase the size, the group - * schedules actions to create new instances using the current instance template. If you decrease - * the size, the group schedules delete actions on one or more instances. The resize operation is - * marked DONE when the resize actions are scheduled even if the group has not yet added or - * deleted any instances. You must separately verify the status of the creating or deleting + * Changes the intended size of the managed instance group. If you increase the size, the group + * creates new instances using the current instance template. If you decrease the size, the group + * deletes one or more instances. + * + *

The resize operation is marked DONE if the resize request is successful. The underlying + * actions take additional time. You must separately verify the status of the creating or deleting * actions with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take @@ -1293,11 +1294,12 @@ public final Operation resizeRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Changes the intended size for the managed instance group. If you increase the size, the group - * schedules actions to create new instances using the current instance template. If you decrease - * the size, the group schedules delete actions on one or more instances. The resize operation is - * marked DONE when the resize actions are scheduled even if the group has not yet added or - * deleted any instances. You must separately verify the status of the creating or deleting + * Changes the intended size of the managed instance group. If you increase the size, the group + * creates new instances using the current instance template. If you decrease the size, the group + * deletes one or more instances. + * + *

The resize operation is marked DONE if the resize request is successful. The underlying + * actions take additional time. You must separately verify the status of the creating or deleting * actions with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take @@ -1332,11 +1334,12 @@ public final Operation resizeRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Changes the intended size for the managed instance group. If you increase the size, the group - * schedules actions to create new instances using the current instance template. If you decrease - * the size, the group schedules delete actions on one or more instances. The resize operation is - * marked DONE when the resize actions are scheduled even if the group has not yet added or - * deleted any instances. You must separately verify the status of the creating or deleting + * Changes the intended size of the managed instance group. If you increase the size, the group + * creates new instances using the current instance template. If you decrease the size, the group + * deletes one or more instances. + * + *

The resize operation is marked DONE if the resize request is successful. The underlying + * actions take additional time. You must separately verify the status of the creating or deleting * actions with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take @@ -1368,11 +1371,12 @@ public final Operation resizeRegionInstanceGroupManager( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Changes the intended size for the managed instance group. If you increase the size, the group - * schedules actions to create new instances using the current instance template. If you decrease - * the size, the group schedules delete actions on one or more instances. The resize operation is - * marked DONE when the resize actions are scheduled even if the group has not yet added or - * deleted any instances. You must separately verify the status of the creating or deleting + * Changes the intended size of the managed instance group. If you increase the size, the group + * creates new instances using the current instance template. If you decrease the size, the group + * deletes one or more instances. + * + *

The resize operation is marked DONE if the resize request is successful. The underlying + * actions take additional time. You must separately verify the status of the creating or deleting * actions with the listmanagedinstances method. * *

If the group is part of a backend service that has enabled connection draining, it can take diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Router.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Router.java index 73968f41e528..aaa3248506cf 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Router.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Router.java @@ -34,6 +34,7 @@ public final class Router implements ApiMessage { private final List interfaces; private final String kind; private final String name; + private final List nats; private final String network; private final String region; private final String selfLink; @@ -47,6 +48,7 @@ private Router() { this.interfaces = null; this.kind = null; this.name = null; + this.nats = null; this.network = null; this.region = null; this.selfLink = null; @@ -61,6 +63,7 @@ private Router( List interfaces, String kind, String name, + List nats, String network, String region, String selfLink) { @@ -72,6 +75,7 @@ private Router( this.interfaces = interfaces; this.kind = kind; this.name = name; + this.nats = nats; this.network = network; this.region = region; this.selfLink = selfLink; @@ -103,6 +107,9 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("name")) { return name; } + if (fieldName.equals("nats")) { + return nats; + } if (fieldName.equals("network")) { return network; } @@ -159,6 +166,10 @@ public String getName() { return name; } + public List getNatsList() { + return nats; + } + public String getNetwork() { return network; } @@ -202,6 +213,7 @@ public static class Builder { private List interfaces; private String kind; private String name; + private List nats; private String network; private String region; private String selfLink; @@ -234,6 +246,9 @@ public Builder mergeFrom(Router other) { if (other.getName() != null) { this.name = other.name; } + if (other.getNatsList() != null) { + this.nats = other.nats; + } if (other.getNetwork() != null) { this.network = other.network; } @@ -255,6 +270,7 @@ public Builder mergeFrom(Router other) { this.interfaces = source.interfaces; this.kind = source.kind; this.name = source.name; + this.nats = source.nats; this.network = source.network; this.region = source.region; this.selfLink = source.selfLink; @@ -354,6 +370,26 @@ public Builder setName(String name) { return this; } + public List getNatsList() { + return nats; + } + + public Builder addAllNats(List nats) { + if (this.nats == null) { + this.nats = new LinkedList<>(); + } + this.nats.addAll(nats); + return this; + } + + public Builder addNats(RouterNat nats) { + if (this.nats == null) { + this.nats = new LinkedList<>(); + } + this.nats.add(nats); + return this; + } + public String getNetwork() { return network; } @@ -392,6 +428,7 @@ public Router build() { interfaces, kind, name, + nats, network, region, selfLink); @@ -407,6 +444,7 @@ public Builder clone() { newBuilder.addAllInterfaces(this.interfaces); newBuilder.setKind(this.kind); newBuilder.setName(this.name); + newBuilder.addAllNats(this.nats); newBuilder.setNetwork(this.network); newBuilder.setRegion(this.region); newBuilder.setSelfLink(this.selfLink); @@ -441,6 +479,9 @@ public String toString() { + "name=" + name + ", " + + "nats=" + + nats + + ", " + "network=" + network + ", " @@ -467,6 +508,7 @@ public boolean equals(Object o) { && Objects.equals(this.interfaces, that.getInterfacesList()) && Objects.equals(this.kind, that.getKind()) && Objects.equals(this.name, that.getName()) + && Objects.equals(this.nats, that.getNatsList()) && Objects.equals(this.network, that.getNetwork()) && Objects.equals(this.region, that.getRegion()) && Objects.equals(this.selfLink, that.getSelfLink()); @@ -485,6 +527,7 @@ public int hashCode() { interfaces, kind, name, + nats, network, region, selfLink); diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterNat.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterNat.java new file mode 100644 index 000000000000..665c7e2608ac --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterNat.java @@ -0,0 +1,462 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 RouterNat implements ApiMessage { + private final Integer icmpIdleTimeoutSec; + private final Integer minPortsPerVm; + private final String name; + private final String natIpAllocateOption; + private final List natIps; + private final String sourceSubnetworkIpRangesToNat; + private final List subnetworks; + private final Integer tcpEstablishedIdleTimeoutSec; + private final Integer tcpTransitoryIdleTimeoutSec; + private final Integer udpIdleTimeoutSec; + + private RouterNat() { + this.icmpIdleTimeoutSec = null; + this.minPortsPerVm = null; + this.name = null; + this.natIpAllocateOption = null; + this.natIps = null; + this.sourceSubnetworkIpRangesToNat = null; + this.subnetworks = null; + this.tcpEstablishedIdleTimeoutSec = null; + this.tcpTransitoryIdleTimeoutSec = null; + this.udpIdleTimeoutSec = null; + } + + private RouterNat( + Integer icmpIdleTimeoutSec, + Integer minPortsPerVm, + String name, + String natIpAllocateOption, + List natIps, + String sourceSubnetworkIpRangesToNat, + List subnetworks, + Integer tcpEstablishedIdleTimeoutSec, + Integer tcpTransitoryIdleTimeoutSec, + Integer udpIdleTimeoutSec) { + this.icmpIdleTimeoutSec = icmpIdleTimeoutSec; + this.minPortsPerVm = minPortsPerVm; + this.name = name; + this.natIpAllocateOption = natIpAllocateOption; + this.natIps = natIps; + this.sourceSubnetworkIpRangesToNat = sourceSubnetworkIpRangesToNat; + this.subnetworks = subnetworks; + this.tcpEstablishedIdleTimeoutSec = tcpEstablishedIdleTimeoutSec; + this.tcpTransitoryIdleTimeoutSec = tcpTransitoryIdleTimeoutSec; + this.udpIdleTimeoutSec = udpIdleTimeoutSec; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("icmpIdleTimeoutSec")) { + return icmpIdleTimeoutSec; + } + if (fieldName.equals("minPortsPerVm")) { + return minPortsPerVm; + } + if (fieldName.equals("name")) { + return name; + } + if (fieldName.equals("natIpAllocateOption")) { + return natIpAllocateOption; + } + if (fieldName.equals("natIps")) { + return natIps; + } + if (fieldName.equals("sourceSubnetworkIpRangesToNat")) { + return sourceSubnetworkIpRangesToNat; + } + if (fieldName.equals("subnetworks")) { + return subnetworks; + } + if (fieldName.equals("tcpEstablishedIdleTimeoutSec")) { + return tcpEstablishedIdleTimeoutSec; + } + if (fieldName.equals("tcpTransitoryIdleTimeoutSec")) { + return tcpTransitoryIdleTimeoutSec; + } + if (fieldName.equals("udpIdleTimeoutSec")) { + return udpIdleTimeoutSec; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public Integer getIcmpIdleTimeoutSec() { + return icmpIdleTimeoutSec; + } + + public Integer getMinPortsPerVm() { + return minPortsPerVm; + } + + public String getName() { + return name; + } + + public String getNatIpAllocateOption() { + return natIpAllocateOption; + } + + public List getNatIpsList() { + return natIps; + } + + public String getSourceSubnetworkIpRangesToNat() { + return sourceSubnetworkIpRangesToNat; + } + + public List getSubnetworksList() { + return subnetworks; + } + + public Integer getTcpEstablishedIdleTimeoutSec() { + return tcpEstablishedIdleTimeoutSec; + } + + public Integer getTcpTransitoryIdleTimeoutSec() { + return tcpTransitoryIdleTimeoutSec; + } + + public Integer getUdpIdleTimeoutSec() { + return udpIdleTimeoutSec; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(RouterNat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static RouterNat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final RouterNat DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new RouterNat(); + } + + public static class Builder { + private Integer icmpIdleTimeoutSec; + private Integer minPortsPerVm; + private String name; + private String natIpAllocateOption; + private List natIps; + private String sourceSubnetworkIpRangesToNat; + private List subnetworks; + private Integer tcpEstablishedIdleTimeoutSec; + private Integer tcpTransitoryIdleTimeoutSec; + private Integer udpIdleTimeoutSec; + + Builder() {} + + public Builder mergeFrom(RouterNat other) { + if (other == RouterNat.getDefaultInstance()) return this; + if (other.getIcmpIdleTimeoutSec() != null) { + this.icmpIdleTimeoutSec = other.icmpIdleTimeoutSec; + } + if (other.getMinPortsPerVm() != null) { + this.minPortsPerVm = other.minPortsPerVm; + } + if (other.getName() != null) { + this.name = other.name; + } + if (other.getNatIpAllocateOption() != null) { + this.natIpAllocateOption = other.natIpAllocateOption; + } + if (other.getNatIpsList() != null) { + this.natIps = other.natIps; + } + if (other.getSourceSubnetworkIpRangesToNat() != null) { + this.sourceSubnetworkIpRangesToNat = other.sourceSubnetworkIpRangesToNat; + } + if (other.getSubnetworksList() != null) { + this.subnetworks = other.subnetworks; + } + if (other.getTcpEstablishedIdleTimeoutSec() != null) { + this.tcpEstablishedIdleTimeoutSec = other.tcpEstablishedIdleTimeoutSec; + } + if (other.getTcpTransitoryIdleTimeoutSec() != null) { + this.tcpTransitoryIdleTimeoutSec = other.tcpTransitoryIdleTimeoutSec; + } + if (other.getUdpIdleTimeoutSec() != null) { + this.udpIdleTimeoutSec = other.udpIdleTimeoutSec; + } + return this; + } + + Builder(RouterNat source) { + this.icmpIdleTimeoutSec = source.icmpIdleTimeoutSec; + this.minPortsPerVm = source.minPortsPerVm; + this.name = source.name; + this.natIpAllocateOption = source.natIpAllocateOption; + this.natIps = source.natIps; + this.sourceSubnetworkIpRangesToNat = source.sourceSubnetworkIpRangesToNat; + this.subnetworks = source.subnetworks; + this.tcpEstablishedIdleTimeoutSec = source.tcpEstablishedIdleTimeoutSec; + this.tcpTransitoryIdleTimeoutSec = source.tcpTransitoryIdleTimeoutSec; + this.udpIdleTimeoutSec = source.udpIdleTimeoutSec; + } + + public Integer getIcmpIdleTimeoutSec() { + return icmpIdleTimeoutSec; + } + + public Builder setIcmpIdleTimeoutSec(Integer icmpIdleTimeoutSec) { + this.icmpIdleTimeoutSec = icmpIdleTimeoutSec; + return this; + } + + public Integer getMinPortsPerVm() { + return minPortsPerVm; + } + + public Builder setMinPortsPerVm(Integer minPortsPerVm) { + this.minPortsPerVm = minPortsPerVm; + return this; + } + + public String getName() { + return name; + } + + public Builder setName(String name) { + this.name = name; + return this; + } + + public String getNatIpAllocateOption() { + return natIpAllocateOption; + } + + public Builder setNatIpAllocateOption(String natIpAllocateOption) { + this.natIpAllocateOption = natIpAllocateOption; + return this; + } + + public List getNatIpsList() { + return natIps; + } + + public Builder addAllNatIps(List natIps) { + if (this.natIps == null) { + this.natIps = new LinkedList<>(); + } + this.natIps.addAll(natIps); + return this; + } + + public Builder addNatIps(String natIps) { + if (this.natIps == null) { + this.natIps = new LinkedList<>(); + } + this.natIps.add(natIps); + return this; + } + + public String getSourceSubnetworkIpRangesToNat() { + return sourceSubnetworkIpRangesToNat; + } + + public Builder setSourceSubnetworkIpRangesToNat(String sourceSubnetworkIpRangesToNat) { + this.sourceSubnetworkIpRangesToNat = sourceSubnetworkIpRangesToNat; + return this; + } + + public List getSubnetworksList() { + return subnetworks; + } + + public Builder addAllSubnetworks(List subnetworks) { + if (this.subnetworks == null) { + this.subnetworks = new LinkedList<>(); + } + this.subnetworks.addAll(subnetworks); + return this; + } + + public Builder addSubnetworks(RouterNatSubnetworkToNat subnetworks) { + if (this.subnetworks == null) { + this.subnetworks = new LinkedList<>(); + } + this.subnetworks.add(subnetworks); + return this; + } + + public Integer getTcpEstablishedIdleTimeoutSec() { + return tcpEstablishedIdleTimeoutSec; + } + + public Builder setTcpEstablishedIdleTimeoutSec(Integer tcpEstablishedIdleTimeoutSec) { + this.tcpEstablishedIdleTimeoutSec = tcpEstablishedIdleTimeoutSec; + return this; + } + + public Integer getTcpTransitoryIdleTimeoutSec() { + return tcpTransitoryIdleTimeoutSec; + } + + public Builder setTcpTransitoryIdleTimeoutSec(Integer tcpTransitoryIdleTimeoutSec) { + this.tcpTransitoryIdleTimeoutSec = tcpTransitoryIdleTimeoutSec; + return this; + } + + public Integer getUdpIdleTimeoutSec() { + return udpIdleTimeoutSec; + } + + public Builder setUdpIdleTimeoutSec(Integer udpIdleTimeoutSec) { + this.udpIdleTimeoutSec = udpIdleTimeoutSec; + return this; + } + + public RouterNat build() { + + return new RouterNat( + icmpIdleTimeoutSec, + minPortsPerVm, + name, + natIpAllocateOption, + natIps, + sourceSubnetworkIpRangesToNat, + subnetworks, + tcpEstablishedIdleTimeoutSec, + tcpTransitoryIdleTimeoutSec, + udpIdleTimeoutSec); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setIcmpIdleTimeoutSec(this.icmpIdleTimeoutSec); + newBuilder.setMinPortsPerVm(this.minPortsPerVm); + newBuilder.setName(this.name); + newBuilder.setNatIpAllocateOption(this.natIpAllocateOption); + newBuilder.addAllNatIps(this.natIps); + newBuilder.setSourceSubnetworkIpRangesToNat(this.sourceSubnetworkIpRangesToNat); + newBuilder.addAllSubnetworks(this.subnetworks); + newBuilder.setTcpEstablishedIdleTimeoutSec(this.tcpEstablishedIdleTimeoutSec); + newBuilder.setTcpTransitoryIdleTimeoutSec(this.tcpTransitoryIdleTimeoutSec); + newBuilder.setUdpIdleTimeoutSec(this.udpIdleTimeoutSec); + return newBuilder; + } + } + + @Override + public String toString() { + return "RouterNat{" + + "icmpIdleTimeoutSec=" + + icmpIdleTimeoutSec + + ", " + + "minPortsPerVm=" + + minPortsPerVm + + ", " + + "name=" + + name + + ", " + + "natIpAllocateOption=" + + natIpAllocateOption + + ", " + + "natIps=" + + natIps + + ", " + + "sourceSubnetworkIpRangesToNat=" + + sourceSubnetworkIpRangesToNat + + ", " + + "subnetworks=" + + subnetworks + + ", " + + "tcpEstablishedIdleTimeoutSec=" + + tcpEstablishedIdleTimeoutSec + + ", " + + "tcpTransitoryIdleTimeoutSec=" + + tcpTransitoryIdleTimeoutSec + + ", " + + "udpIdleTimeoutSec=" + + udpIdleTimeoutSec + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof RouterNat) { + RouterNat that = (RouterNat) o; + return Objects.equals(this.icmpIdleTimeoutSec, that.getIcmpIdleTimeoutSec()) + && Objects.equals(this.minPortsPerVm, that.getMinPortsPerVm()) + && Objects.equals(this.name, that.getName()) + && Objects.equals(this.natIpAllocateOption, that.getNatIpAllocateOption()) + && Objects.equals(this.natIps, that.getNatIpsList()) + && Objects.equals( + this.sourceSubnetworkIpRangesToNat, that.getSourceSubnetworkIpRangesToNat()) + && Objects.equals(this.subnetworks, that.getSubnetworksList()) + && Objects.equals( + this.tcpEstablishedIdleTimeoutSec, that.getTcpEstablishedIdleTimeoutSec()) + && Objects.equals(this.tcpTransitoryIdleTimeoutSec, that.getTcpTransitoryIdleTimeoutSec()) + && Objects.equals(this.udpIdleTimeoutSec, that.getUdpIdleTimeoutSec()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + icmpIdleTimeoutSec, + minPortsPerVm, + name, + natIpAllocateOption, + natIps, + sourceSubnetworkIpRangesToNat, + subnetworks, + tcpEstablishedIdleTimeoutSec, + tcpTransitoryIdleTimeoutSec, + udpIdleTimeoutSec); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterNatSubnetworkToNat.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterNatSubnetworkToNat.java new file mode 100644 index 000000000000..197907b6d0c3 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterNatSubnetworkToNat.java @@ -0,0 +1,228 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 RouterNatSubnetworkToNat implements ApiMessage { + private final String name; + private final List secondaryIpRangeNames; + private final List sourceIpRangesToNat; + + private RouterNatSubnetworkToNat() { + this.name = null; + this.secondaryIpRangeNames = null; + this.sourceIpRangesToNat = null; + } + + private RouterNatSubnetworkToNat( + String name, List secondaryIpRangeNames, List sourceIpRangesToNat) { + this.name = name; + this.secondaryIpRangeNames = secondaryIpRangeNames; + this.sourceIpRangesToNat = sourceIpRangesToNat; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("name")) { + return name; + } + if (fieldName.equals("secondaryIpRangeNames")) { + return secondaryIpRangeNames; + } + if (fieldName.equals("sourceIpRangesToNat")) { + return sourceIpRangesToNat; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getName() { + return name; + } + + public List getSecondaryIpRangeNamesList() { + return secondaryIpRangeNames; + } + + public List getSourceIpRangesToNatList() { + return sourceIpRangesToNat; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(RouterNatSubnetworkToNat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static RouterNatSubnetworkToNat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final RouterNatSubnetworkToNat DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new RouterNatSubnetworkToNat(); + } + + public static class Builder { + private String name; + private List secondaryIpRangeNames; + private List sourceIpRangesToNat; + + Builder() {} + + public Builder mergeFrom(RouterNatSubnetworkToNat other) { + if (other == RouterNatSubnetworkToNat.getDefaultInstance()) return this; + if (other.getName() != null) { + this.name = other.name; + } + if (other.getSecondaryIpRangeNamesList() != null) { + this.secondaryIpRangeNames = other.secondaryIpRangeNames; + } + if (other.getSourceIpRangesToNatList() != null) { + this.sourceIpRangesToNat = other.sourceIpRangesToNat; + } + return this; + } + + Builder(RouterNatSubnetworkToNat source) { + this.name = source.name; + this.secondaryIpRangeNames = source.secondaryIpRangeNames; + this.sourceIpRangesToNat = source.sourceIpRangesToNat; + } + + public String getName() { + return name; + } + + public Builder setName(String name) { + this.name = name; + return this; + } + + public List getSecondaryIpRangeNamesList() { + return secondaryIpRangeNames; + } + + public Builder addAllSecondaryIpRangeNames(List secondaryIpRangeNames) { + if (this.secondaryIpRangeNames == null) { + this.secondaryIpRangeNames = new LinkedList<>(); + } + this.secondaryIpRangeNames.addAll(secondaryIpRangeNames); + return this; + } + + public Builder addSecondaryIpRangeNames(String secondaryIpRangeNames) { + if (this.secondaryIpRangeNames == null) { + this.secondaryIpRangeNames = new LinkedList<>(); + } + this.secondaryIpRangeNames.add(secondaryIpRangeNames); + return this; + } + + public List getSourceIpRangesToNatList() { + return sourceIpRangesToNat; + } + + public Builder addAllSourceIpRangesToNat(List sourceIpRangesToNat) { + if (this.sourceIpRangesToNat == null) { + this.sourceIpRangesToNat = new LinkedList<>(); + } + this.sourceIpRangesToNat.addAll(sourceIpRangesToNat); + return this; + } + + public Builder addSourceIpRangesToNat(String sourceIpRangesToNat) { + if (this.sourceIpRangesToNat == null) { + this.sourceIpRangesToNat = new LinkedList<>(); + } + this.sourceIpRangesToNat.add(sourceIpRangesToNat); + return this; + } + + public RouterNatSubnetworkToNat build() { + + return new RouterNatSubnetworkToNat(name, secondaryIpRangeNames, sourceIpRangesToNat); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setName(this.name); + newBuilder.addAllSecondaryIpRangeNames(this.secondaryIpRangeNames); + newBuilder.addAllSourceIpRangesToNat(this.sourceIpRangesToNat); + return newBuilder; + } + } + + @Override + public String toString() { + return "RouterNatSubnetworkToNat{" + + "name=" + + name + + ", " + + "secondaryIpRangeNames=" + + secondaryIpRangeNames + + ", " + + "sourceIpRangesToNat=" + + sourceIpRangesToNat + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof RouterNatSubnetworkToNat) { + RouterNatSubnetworkToNat that = (RouterNatSubnetworkToNat) o; + return Objects.equals(this.name, that.getName()) + && Objects.equals(this.secondaryIpRangeNames, that.getSecondaryIpRangeNamesList()) + && Objects.equals(this.sourceIpRangesToNat, that.getSourceIpRangesToNatList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(name, secondaryIpRangeNames, sourceIpRangesToNat); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterStatus.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterStatus.java index c40e63a03cbe..f2fde05238c0 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterStatus.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterStatus.java @@ -29,12 +29,14 @@ public final class RouterStatus implements ApiMessage { private final List bestRoutes; private final List bestRoutesForRouter; private final List bgpPeerStatus; + private final List natStatus; private final String network; private RouterStatus() { this.bestRoutes = null; this.bestRoutesForRouter = null; this.bgpPeerStatus = null; + this.natStatus = null; this.network = null; } @@ -42,10 +44,12 @@ private RouterStatus( List bestRoutes, List bestRoutesForRouter, List bgpPeerStatus, + List natStatus, String network) { this.bestRoutes = bestRoutes; this.bestRoutesForRouter = bestRoutesForRouter; this.bgpPeerStatus = bgpPeerStatus; + this.natStatus = natStatus; this.network = network; } @@ -60,6 +64,9 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("bgpPeerStatus")) { return bgpPeerStatus; } + if (fieldName.equals("natStatus")) { + return natStatus; + } if (fieldName.equals("network")) { return network; } @@ -90,6 +97,10 @@ public List getBgpPeerStatusList() { return bgpPeerStatus; } + public List getNatStatusList() { + return natStatus; + } + public String getNetwork() { return network; } @@ -120,6 +131,7 @@ public static class Builder { private List bestRoutes; private List bestRoutesForRouter; private List bgpPeerStatus; + private List natStatus; private String network; Builder() {} @@ -135,6 +147,9 @@ public Builder mergeFrom(RouterStatus other) { if (other.getBgpPeerStatusList() != null) { this.bgpPeerStatus = other.bgpPeerStatus; } + if (other.getNatStatusList() != null) { + this.natStatus = other.natStatus; + } if (other.getNetwork() != null) { this.network = other.network; } @@ -145,6 +160,7 @@ public Builder mergeFrom(RouterStatus other) { this.bestRoutes = source.bestRoutes; this.bestRoutesForRouter = source.bestRoutesForRouter; this.bgpPeerStatus = source.bgpPeerStatus; + this.natStatus = source.natStatus; this.network = source.network; } @@ -208,6 +224,26 @@ public Builder addBgpPeerStatus(RouterStatusBgpPeerStatus bgpPeerStatus) { return this; } + public List getNatStatusList() { + return natStatus; + } + + public Builder addAllNatStatus(List natStatus) { + if (this.natStatus == null) { + this.natStatus = new LinkedList<>(); + } + this.natStatus.addAll(natStatus); + return this; + } + + public Builder addNatStatus(RouterStatusNatStatus natStatus) { + if (this.natStatus == null) { + this.natStatus = new LinkedList<>(); + } + this.natStatus.add(natStatus); + return this; + } + public String getNetwork() { return network; } @@ -219,7 +255,7 @@ public Builder setNetwork(String network) { public RouterStatus build() { - return new RouterStatus(bestRoutes, bestRoutesForRouter, bgpPeerStatus, network); + return new RouterStatus(bestRoutes, bestRoutesForRouter, bgpPeerStatus, natStatus, network); } public Builder clone() { @@ -227,6 +263,7 @@ public Builder clone() { newBuilder.addAllBestRoutes(this.bestRoutes); newBuilder.addAllBestRoutesForRouter(this.bestRoutesForRouter); newBuilder.addAllBgpPeerStatus(this.bgpPeerStatus); + newBuilder.addAllNatStatus(this.natStatus); newBuilder.setNetwork(this.network); return newBuilder; } @@ -244,6 +281,9 @@ public String toString() { + "bgpPeerStatus=" + bgpPeerStatus + ", " + + "natStatus=" + + natStatus + + ", " + "network=" + network + "}"; @@ -259,6 +299,7 @@ public boolean equals(Object o) { return Objects.equals(this.bestRoutes, that.getBestRoutesList()) && Objects.equals(this.bestRoutesForRouter, that.getBestRoutesForRouterList()) && Objects.equals(this.bgpPeerStatus, that.getBgpPeerStatusList()) + && Objects.equals(this.natStatus, that.getNatStatusList()) && Objects.equals(this.network, that.getNetwork()); } return false; @@ -266,6 +307,6 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(bestRoutes, bestRoutesForRouter, bgpPeerStatus, network); + return Objects.hash(bestRoutes, bestRoutesForRouter, bgpPeerStatus, natStatus, network); } } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatus.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatus.java new file mode 100644 index 000000000000..6e06fe1c15df --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatus.java @@ -0,0 +1,345 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 RouterStatusNatStatus implements ApiMessage { + private final List autoAllocatedNatIps; + private final Integer minExtraNatIpsNeeded; + private final String name; + private final Integer numVmEndpointsWithNatMappings; + private final List userAllocatedNatIpResources; + private final List userAllocatedNatIps; + + private RouterStatusNatStatus() { + this.autoAllocatedNatIps = null; + this.minExtraNatIpsNeeded = null; + this.name = null; + this.numVmEndpointsWithNatMappings = null; + this.userAllocatedNatIpResources = null; + this.userAllocatedNatIps = null; + } + + private RouterStatusNatStatus( + List autoAllocatedNatIps, + Integer minExtraNatIpsNeeded, + String name, + Integer numVmEndpointsWithNatMappings, + List userAllocatedNatIpResources, + List userAllocatedNatIps) { + this.autoAllocatedNatIps = autoAllocatedNatIps; + this.minExtraNatIpsNeeded = minExtraNatIpsNeeded; + this.name = name; + this.numVmEndpointsWithNatMappings = numVmEndpointsWithNatMappings; + this.userAllocatedNatIpResources = userAllocatedNatIpResources; + this.userAllocatedNatIps = userAllocatedNatIps; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("autoAllocatedNatIps")) { + return autoAllocatedNatIps; + } + if (fieldName.equals("minExtraNatIpsNeeded")) { + return minExtraNatIpsNeeded; + } + if (fieldName.equals("name")) { + return name; + } + if (fieldName.equals("numVmEndpointsWithNatMappings")) { + return numVmEndpointsWithNatMappings; + } + if (fieldName.equals("userAllocatedNatIpResources")) { + return userAllocatedNatIpResources; + } + if (fieldName.equals("userAllocatedNatIps")) { + return userAllocatedNatIps; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getAutoAllocatedNatIpsList() { + return autoAllocatedNatIps; + } + + public Integer getMinExtraNatIpsNeeded() { + return minExtraNatIpsNeeded; + } + + public String getName() { + return name; + } + + public Integer getNumVmEndpointsWithNatMappings() { + return numVmEndpointsWithNatMappings; + } + + public List getUserAllocatedNatIpResourcesList() { + return userAllocatedNatIpResources; + } + + public List getUserAllocatedNatIpsList() { + return userAllocatedNatIps; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(RouterStatusNatStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static RouterStatusNatStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final RouterStatusNatStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new RouterStatusNatStatus(); + } + + public static class Builder { + private List autoAllocatedNatIps; + private Integer minExtraNatIpsNeeded; + private String name; + private Integer numVmEndpointsWithNatMappings; + private List userAllocatedNatIpResources; + private List userAllocatedNatIps; + + Builder() {} + + public Builder mergeFrom(RouterStatusNatStatus other) { + if (other == RouterStatusNatStatus.getDefaultInstance()) return this; + if (other.getAutoAllocatedNatIpsList() != null) { + this.autoAllocatedNatIps = other.autoAllocatedNatIps; + } + if (other.getMinExtraNatIpsNeeded() != null) { + this.minExtraNatIpsNeeded = other.minExtraNatIpsNeeded; + } + if (other.getName() != null) { + this.name = other.name; + } + if (other.getNumVmEndpointsWithNatMappings() != null) { + this.numVmEndpointsWithNatMappings = other.numVmEndpointsWithNatMappings; + } + if (other.getUserAllocatedNatIpResourcesList() != null) { + this.userAllocatedNatIpResources = other.userAllocatedNatIpResources; + } + if (other.getUserAllocatedNatIpsList() != null) { + this.userAllocatedNatIps = other.userAllocatedNatIps; + } + return this; + } + + Builder(RouterStatusNatStatus source) { + this.autoAllocatedNatIps = source.autoAllocatedNatIps; + this.minExtraNatIpsNeeded = source.minExtraNatIpsNeeded; + this.name = source.name; + this.numVmEndpointsWithNatMappings = source.numVmEndpointsWithNatMappings; + this.userAllocatedNatIpResources = source.userAllocatedNatIpResources; + this.userAllocatedNatIps = source.userAllocatedNatIps; + } + + public List getAutoAllocatedNatIpsList() { + return autoAllocatedNatIps; + } + + public Builder addAllAutoAllocatedNatIps(List autoAllocatedNatIps) { + if (this.autoAllocatedNatIps == null) { + this.autoAllocatedNatIps = new LinkedList<>(); + } + this.autoAllocatedNatIps.addAll(autoAllocatedNatIps); + return this; + } + + public Builder addAutoAllocatedNatIps(String autoAllocatedNatIps) { + if (this.autoAllocatedNatIps == null) { + this.autoAllocatedNatIps = new LinkedList<>(); + } + this.autoAllocatedNatIps.add(autoAllocatedNatIps); + return this; + } + + public Integer getMinExtraNatIpsNeeded() { + return minExtraNatIpsNeeded; + } + + public Builder setMinExtraNatIpsNeeded(Integer minExtraNatIpsNeeded) { + this.minExtraNatIpsNeeded = minExtraNatIpsNeeded; + return this; + } + + public String getName() { + return name; + } + + public Builder setName(String name) { + this.name = name; + return this; + } + + public Integer getNumVmEndpointsWithNatMappings() { + return numVmEndpointsWithNatMappings; + } + + public Builder setNumVmEndpointsWithNatMappings(Integer numVmEndpointsWithNatMappings) { + this.numVmEndpointsWithNatMappings = numVmEndpointsWithNatMappings; + return this; + } + + public List getUserAllocatedNatIpResourcesList() { + return userAllocatedNatIpResources; + } + + public Builder addAllUserAllocatedNatIpResources(List userAllocatedNatIpResources) { + if (this.userAllocatedNatIpResources == null) { + this.userAllocatedNatIpResources = new LinkedList<>(); + } + this.userAllocatedNatIpResources.addAll(userAllocatedNatIpResources); + return this; + } + + public Builder addUserAllocatedNatIpResources(String userAllocatedNatIpResources) { + if (this.userAllocatedNatIpResources == null) { + this.userAllocatedNatIpResources = new LinkedList<>(); + } + this.userAllocatedNatIpResources.add(userAllocatedNatIpResources); + return this; + } + + public List getUserAllocatedNatIpsList() { + return userAllocatedNatIps; + } + + public Builder addAllUserAllocatedNatIps(List userAllocatedNatIps) { + if (this.userAllocatedNatIps == null) { + this.userAllocatedNatIps = new LinkedList<>(); + } + this.userAllocatedNatIps.addAll(userAllocatedNatIps); + return this; + } + + public Builder addUserAllocatedNatIps(String userAllocatedNatIps) { + if (this.userAllocatedNatIps == null) { + this.userAllocatedNatIps = new LinkedList<>(); + } + this.userAllocatedNatIps.add(userAllocatedNatIps); + return this; + } + + public RouterStatusNatStatus build() { + + return new RouterStatusNatStatus( + autoAllocatedNatIps, + minExtraNatIpsNeeded, + name, + numVmEndpointsWithNatMappings, + userAllocatedNatIpResources, + userAllocatedNatIps); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllAutoAllocatedNatIps(this.autoAllocatedNatIps); + newBuilder.setMinExtraNatIpsNeeded(this.minExtraNatIpsNeeded); + newBuilder.setName(this.name); + newBuilder.setNumVmEndpointsWithNatMappings(this.numVmEndpointsWithNatMappings); + newBuilder.addAllUserAllocatedNatIpResources(this.userAllocatedNatIpResources); + newBuilder.addAllUserAllocatedNatIps(this.userAllocatedNatIps); + return newBuilder; + } + } + + @Override + public String toString() { + return "RouterStatusNatStatus{" + + "autoAllocatedNatIps=" + + autoAllocatedNatIps + + ", " + + "minExtraNatIpsNeeded=" + + minExtraNatIpsNeeded + + ", " + + "name=" + + name + + ", " + + "numVmEndpointsWithNatMappings=" + + numVmEndpointsWithNatMappings + + ", " + + "userAllocatedNatIpResources=" + + userAllocatedNatIpResources + + ", " + + "userAllocatedNatIps=" + + userAllocatedNatIps + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof RouterStatusNatStatus) { + RouterStatusNatStatus that = (RouterStatusNatStatus) o; + return Objects.equals(this.autoAllocatedNatIps, that.getAutoAllocatedNatIpsList()) + && Objects.equals(this.minExtraNatIpsNeeded, that.getMinExtraNatIpsNeeded()) + && Objects.equals(this.name, that.getName()) + && Objects.equals( + this.numVmEndpointsWithNatMappings, that.getNumVmEndpointsWithNatMappings()) + && Objects.equals( + this.userAllocatedNatIpResources, that.getUserAllocatedNatIpResourcesList()) + && Objects.equals(this.userAllocatedNatIps, that.getUserAllocatedNatIpsList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + autoAllocatedNatIps, + minExtraNatIpsNeeded, + name, + numVmEndpointsWithNatMappings, + userAllocatedNatIpResources, + userAllocatedNatIps); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappings.java new file mode 100644 index 000000000000..259102ee3f0e --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappings.java @@ -0,0 +1,190 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 VmEndpointNatMappings implements ApiMessage { + private final String instanceName; + private final List interfaceNatMappings; + + private VmEndpointNatMappings() { + this.instanceName = null; + this.interfaceNatMappings = null; + } + + private VmEndpointNatMappings( + String instanceName, List interfaceNatMappings) { + this.instanceName = instanceName; + this.interfaceNatMappings = interfaceNatMappings; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("instanceName")) { + return instanceName; + } + if (fieldName.equals("interfaceNatMappings")) { + return interfaceNatMappings; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getInstanceName() { + return instanceName; + } + + public List getInterfaceNatMappingsList() { + return interfaceNatMappings; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(VmEndpointNatMappings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static VmEndpointNatMappings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final VmEndpointNatMappings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new VmEndpointNatMappings(); + } + + public static class Builder { + private String instanceName; + private List interfaceNatMappings; + + Builder() {} + + public Builder mergeFrom(VmEndpointNatMappings other) { + if (other == VmEndpointNatMappings.getDefaultInstance()) return this; + if (other.getInstanceName() != null) { + this.instanceName = other.instanceName; + } + if (other.getInterfaceNatMappingsList() != null) { + this.interfaceNatMappings = other.interfaceNatMappings; + } + return this; + } + + Builder(VmEndpointNatMappings source) { + this.instanceName = source.instanceName; + this.interfaceNatMappings = source.interfaceNatMappings; + } + + public String getInstanceName() { + return instanceName; + } + + public Builder setInstanceName(String instanceName) { + this.instanceName = instanceName; + return this; + } + + public List getInterfaceNatMappingsList() { + return interfaceNatMappings; + } + + public Builder addAllInterfaceNatMappings( + List interfaceNatMappings) { + if (this.interfaceNatMappings == null) { + this.interfaceNatMappings = new LinkedList<>(); + } + this.interfaceNatMappings.addAll(interfaceNatMappings); + return this; + } + + public Builder addInterfaceNatMappings( + VmEndpointNatMappingsInterfaceNatMappings interfaceNatMappings) { + if (this.interfaceNatMappings == null) { + this.interfaceNatMappings = new LinkedList<>(); + } + this.interfaceNatMappings.add(interfaceNatMappings); + return this; + } + + public VmEndpointNatMappings build() { + + return new VmEndpointNatMappings(instanceName, interfaceNatMappings); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setInstanceName(this.instanceName); + newBuilder.addAllInterfaceNatMappings(this.interfaceNatMappings); + return newBuilder; + } + } + + @Override + public String toString() { + return "VmEndpointNatMappings{" + + "instanceName=" + + instanceName + + ", " + + "interfaceNatMappings=" + + interfaceNatMappings + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof VmEndpointNatMappings) { + VmEndpointNatMappings that = (VmEndpointNatMappings) o; + return Objects.equals(this.instanceName, that.getInstanceName()) + && Objects.equals(this.interfaceNatMappings, that.getInterfaceNatMappingsList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(instanceName, interfaceNatMappings); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappings.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappings.java new file mode 100644 index 000000000000..ab2840be4991 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappings.java @@ -0,0 +1,251 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 VmEndpointNatMappingsInterfaceNatMappings implements ApiMessage { + private final List natIpPortRanges; + private final Integer numTotalNatPorts; + private final String sourceAliasIpRange; + private final String sourceVirtualIp; + + private VmEndpointNatMappingsInterfaceNatMappings() { + this.natIpPortRanges = null; + this.numTotalNatPorts = null; + this.sourceAliasIpRange = null; + this.sourceVirtualIp = null; + } + + private VmEndpointNatMappingsInterfaceNatMappings( + List natIpPortRanges, + Integer numTotalNatPorts, + String sourceAliasIpRange, + String sourceVirtualIp) { + this.natIpPortRanges = natIpPortRanges; + this.numTotalNatPorts = numTotalNatPorts; + this.sourceAliasIpRange = sourceAliasIpRange; + this.sourceVirtualIp = sourceVirtualIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("natIpPortRanges")) { + return natIpPortRanges; + } + if (fieldName.equals("numTotalNatPorts")) { + return numTotalNatPorts; + } + if (fieldName.equals("sourceAliasIpRange")) { + return sourceAliasIpRange; + } + if (fieldName.equals("sourceVirtualIp")) { + return sourceVirtualIp; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public List getNatIpPortRangesList() { + return natIpPortRanges; + } + + public Integer getNumTotalNatPorts() { + return numTotalNatPorts; + } + + public String getSourceAliasIpRange() { + return sourceAliasIpRange; + } + + public String getSourceVirtualIp() { + return sourceVirtualIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(VmEndpointNatMappingsInterfaceNatMappings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static VmEndpointNatMappingsInterfaceNatMappings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final VmEndpointNatMappingsInterfaceNatMappings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new VmEndpointNatMappingsInterfaceNatMappings(); + } + + public static class Builder { + private List natIpPortRanges; + private Integer numTotalNatPorts; + private String sourceAliasIpRange; + private String sourceVirtualIp; + + Builder() {} + + public Builder mergeFrom(VmEndpointNatMappingsInterfaceNatMappings other) { + if (other == VmEndpointNatMappingsInterfaceNatMappings.getDefaultInstance()) return this; + if (other.getNatIpPortRangesList() != null) { + this.natIpPortRanges = other.natIpPortRanges; + } + if (other.getNumTotalNatPorts() != null) { + this.numTotalNatPorts = other.numTotalNatPorts; + } + if (other.getSourceAliasIpRange() != null) { + this.sourceAliasIpRange = other.sourceAliasIpRange; + } + if (other.getSourceVirtualIp() != null) { + this.sourceVirtualIp = other.sourceVirtualIp; + } + return this; + } + + Builder(VmEndpointNatMappingsInterfaceNatMappings source) { + this.natIpPortRanges = source.natIpPortRanges; + this.numTotalNatPorts = source.numTotalNatPorts; + this.sourceAliasIpRange = source.sourceAliasIpRange; + this.sourceVirtualIp = source.sourceVirtualIp; + } + + public List getNatIpPortRangesList() { + return natIpPortRanges; + } + + public Builder addAllNatIpPortRanges(List natIpPortRanges) { + if (this.natIpPortRanges == null) { + this.natIpPortRanges = new LinkedList<>(); + } + this.natIpPortRanges.addAll(natIpPortRanges); + return this; + } + + public Builder addNatIpPortRanges(String natIpPortRanges) { + if (this.natIpPortRanges == null) { + this.natIpPortRanges = new LinkedList<>(); + } + this.natIpPortRanges.add(natIpPortRanges); + return this; + } + + public Integer getNumTotalNatPorts() { + return numTotalNatPorts; + } + + public Builder setNumTotalNatPorts(Integer numTotalNatPorts) { + this.numTotalNatPorts = numTotalNatPorts; + return this; + } + + public String getSourceAliasIpRange() { + return sourceAliasIpRange; + } + + public Builder setSourceAliasIpRange(String sourceAliasIpRange) { + this.sourceAliasIpRange = sourceAliasIpRange; + return this; + } + + public String getSourceVirtualIp() { + return sourceVirtualIp; + } + + public Builder setSourceVirtualIp(String sourceVirtualIp) { + this.sourceVirtualIp = sourceVirtualIp; + return this; + } + + public VmEndpointNatMappingsInterfaceNatMappings build() { + + return new VmEndpointNatMappingsInterfaceNatMappings( + natIpPortRanges, numTotalNatPorts, sourceAliasIpRange, sourceVirtualIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllNatIpPortRanges(this.natIpPortRanges); + newBuilder.setNumTotalNatPorts(this.numTotalNatPorts); + newBuilder.setSourceAliasIpRange(this.sourceAliasIpRange); + newBuilder.setSourceVirtualIp(this.sourceVirtualIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "VmEndpointNatMappingsInterfaceNatMappings{" + + "natIpPortRanges=" + + natIpPortRanges + + ", " + + "numTotalNatPorts=" + + numTotalNatPorts + + ", " + + "sourceAliasIpRange=" + + sourceAliasIpRange + + ", " + + "sourceVirtualIp=" + + sourceVirtualIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof VmEndpointNatMappingsInterfaceNatMappings) { + VmEndpointNatMappingsInterfaceNatMappings that = + (VmEndpointNatMappingsInterfaceNatMappings) o; + return Objects.equals(this.natIpPortRanges, that.getNatIpPortRangesList()) + && Objects.equals(this.numTotalNatPorts, that.getNumTotalNatPorts()) + && Objects.equals(this.sourceAliasIpRange, that.getSourceAliasIpRange()) + && Objects.equals(this.sourceVirtualIp, that.getSourceVirtualIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(natIpPortRanges, numTotalNatPorts, sourceAliasIpRange, sourceVirtualIp); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsList.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsList.java new file mode 100644 index 000000000000..7cc878c60579 --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsList.java @@ -0,0 +1,309 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 VmEndpointNatMappingsList implements ApiMessage { + private final String id; + private final String kind; + private final String nextPageToken; + private final List result; + private final String selfLink; + private final Warning warning; + + private VmEndpointNatMappingsList() { + this.id = null; + this.kind = null; + this.nextPageToken = null; + this.result = null; + this.selfLink = null; + this.warning = null; + } + + private VmEndpointNatMappingsList( + String id, + String kind, + String nextPageToken, + List result, + String selfLink, + Warning warning) { + this.id = id; + this.kind = kind; + this.nextPageToken = nextPageToken; + this.result = result; + this.selfLink = selfLink; + this.warning = warning; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("id")) { + return id; + } + if (fieldName.equals("kind")) { + return kind; + } + if (fieldName.equals("nextPageToken")) { + return nextPageToken; + } + if (fieldName.equals("result")) { + return result; + } + if (fieldName.equals("selfLink")) { + return selfLink; + } + if (fieldName.equals("warning")) { + return warning; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getId() { + return id; + } + + public String getKind() { + return kind; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public List getResultList() { + return result; + } + + public String getSelfLink() { + return selfLink; + } + + public Warning getWarning() { + return warning; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(VmEndpointNatMappingsList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static VmEndpointNatMappingsList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final VmEndpointNatMappingsList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new VmEndpointNatMappingsList(); + } + + public static class Builder { + private String id; + private String kind; + private String nextPageToken; + private List result; + private String selfLink; + private Warning warning; + + Builder() {} + + public Builder mergeFrom(VmEndpointNatMappingsList other) { + if (other == VmEndpointNatMappingsList.getDefaultInstance()) return this; + if (other.getId() != null) { + this.id = other.id; + } + if (other.getKind() != null) { + this.kind = other.kind; + } + if (other.getNextPageToken() != null) { + this.nextPageToken = other.nextPageToken; + } + if (other.getResultList() != null) { + this.result = other.result; + } + if (other.getSelfLink() != null) { + this.selfLink = other.selfLink; + } + if (other.getWarning() != null) { + this.warning = other.warning; + } + return this; + } + + Builder(VmEndpointNatMappingsList source) { + this.id = source.id; + this.kind = source.kind; + this.nextPageToken = source.nextPageToken; + this.result = source.result; + this.selfLink = source.selfLink; + this.warning = source.warning; + } + + public String getId() { + return id; + } + + public Builder setId(String id) { + this.id = id; + return this; + } + + public String getKind() { + return kind; + } + + public Builder setKind(String kind) { + this.kind = kind; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + public Builder setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public List getResultList() { + return result; + } + + public Builder addAllResult(List result) { + if (this.result == null) { + this.result = new LinkedList<>(); + } + this.result.addAll(result); + return this; + } + + public Builder addResult(VmEndpointNatMappings result) { + if (this.result == null) { + this.result = new LinkedList<>(); + } + this.result.add(result); + return this; + } + + public String getSelfLink() { + return selfLink; + } + + public Builder setSelfLink(String selfLink) { + this.selfLink = selfLink; + return this; + } + + public Warning getWarning() { + return warning; + } + + public Builder setWarning(Warning warning) { + this.warning = warning; + return this; + } + + public VmEndpointNatMappingsList build() { + + return new VmEndpointNatMappingsList(id, kind, nextPageToken, result, selfLink, warning); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setId(this.id); + newBuilder.setKind(this.kind); + newBuilder.setNextPageToken(this.nextPageToken); + newBuilder.addAllResult(this.result); + newBuilder.setSelfLink(this.selfLink); + newBuilder.setWarning(this.warning); + return newBuilder; + } + } + + @Override + public String toString() { + return "VmEndpointNatMappingsList{" + + "id=" + + id + + ", " + + "kind=" + + kind + + ", " + + "nextPageToken=" + + nextPageToken + + ", " + + "result=" + + result + + ", " + + "selfLink=" + + selfLink + + ", " + + "warning=" + + warning + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof VmEndpointNatMappingsList) { + VmEndpointNatMappingsList that = (VmEndpointNatMappingsList) o; + return Objects.equals(this.id, that.getId()) + && Objects.equals(this.kind, that.getKind()) + && Objects.equals(this.nextPageToken, that.getNextPageToken()) + && Objects.equals(this.result, that.getResultList()) + && Objects.equals(this.selfLink, that.getSelfLink()) + && Objects.equals(this.warning, that.getWarning()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(id, kind, nextPageToken, result, selfLink, warning); + } +}