diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Instance.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Instance.java index f4a9705d21c6..db87714459cf 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Instance.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Instance.java @@ -34,6 +34,7 @@ public final class Instance implements ApiMessage { private final String description; private final List disks; private final List guestAccelerators; + private final String hostname; private final String id; private final String kind; private final String labelFingerprint; @@ -60,6 +61,7 @@ private Instance() { this.description = null; this.disks = null; this.guestAccelerators = null; + this.hostname = null; this.id = null; this.kind = null; this.labelFingerprint = null; @@ -87,6 +89,7 @@ private Instance( String description, List disks, List guestAccelerators, + String hostname, String id, String kind, String labelFingerprint, @@ -111,6 +114,7 @@ private Instance( this.description = description; this.disks = disks; this.guestAccelerators = guestAccelerators; + this.hostname = hostname; this.id = id; this.kind = kind; this.labelFingerprint = labelFingerprint; @@ -153,6 +157,9 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("guestAccelerators")) { return guestAccelerators; } + if (fieldName.equals("hostname")) { + return hostname; + } if (fieldName.equals("id")) { return id; } @@ -247,6 +254,10 @@ public List getGuestAcceleratorsList() { return guestAccelerators; } + public String getHostname() { + return hostname; + } + public String getId() { return id; } @@ -345,6 +356,7 @@ public static class Builder { private String description; private List disks; private List guestAccelerators; + private String hostname; private String id; private String kind; private String labelFingerprint; @@ -388,6 +400,9 @@ public Builder mergeFrom(Instance other) { if (other.getGuestAcceleratorsList() != null) { this.guestAccelerators = other.guestAccelerators; } + if (other.getHostname() != null) { + this.hostname = other.hostname; + } if (other.getId() != null) { this.id = other.id; } @@ -450,6 +465,7 @@ public Builder mergeFrom(Instance other) { this.description = source.description; this.disks = source.disks; this.guestAccelerators = source.guestAccelerators; + this.hostname = source.hostname; this.id = source.id; this.kind = source.kind; this.labelFingerprint = source.labelFingerprint; @@ -554,6 +570,15 @@ public Builder addGuestAccelerators(AcceleratorConfig guestAccelerators) { return this; } + public String getHostname() { + return hostname; + } + + public Builder setHostname(String hostname) { + this.hostname = hostname; + return this; + } + public String getId() { return id; } @@ -739,6 +764,7 @@ public Instance build() { description, disks, guestAccelerators, + hostname, id, kind, labelFingerprint, @@ -767,6 +793,7 @@ public Builder clone() { newBuilder.setDescription(this.description); newBuilder.addAllDisks(this.disks); newBuilder.addAllGuestAccelerators(this.guestAccelerators); + newBuilder.setHostname(this.hostname); newBuilder.setId(this.id); newBuilder.setKind(this.kind); newBuilder.setLabelFingerprint(this.labelFingerprint); @@ -812,6 +839,9 @@ public String toString() { + "guestAccelerators=" + guestAccelerators + ", " + + "hostname=" + + hostname + + ", " + "id=" + id + ", " @@ -879,6 +909,7 @@ public boolean equals(Object o) { && Objects.equals(this.description, that.getDescription()) && Objects.equals(this.disks, that.getDisksList()) && Objects.equals(this.guestAccelerators, that.getGuestAcceleratorsList()) + && Objects.equals(this.hostname, that.getHostname()) && Objects.equals(this.id, that.getId()) && Objects.equals(this.kind, that.getKind()) && Objects.equals(this.labelFingerprint, that.getLabelFingerprint()) @@ -910,6 +941,7 @@ public int hashCode() { description, disks, guestAccelerators, + hostname, id, kind, labelFingerprint, diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java index ed6aa863574e..1a445955a6da 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java @@ -26,6 +26,7 @@ @Generated("by GAPIC") @BetaApi public final class InstanceGroupManager implements ApiMessage { + private final List autoHealingPolicies; private final String baseInstanceName; private final String creationTimestamp; private final InstanceGroupManagerActionsSummary currentActions; @@ -45,6 +46,7 @@ public final class InstanceGroupManager implements ApiMessage { private final String zone; private InstanceGroupManager() { + this.autoHealingPolicies = null; this.baseInstanceName = null; this.creationTimestamp = null; this.currentActions = null; @@ -65,6 +67,7 @@ private InstanceGroupManager() { } private InstanceGroupManager( + List autoHealingPolicies, String baseInstanceName, String creationTimestamp, InstanceGroupManagerActionsSummary currentActions, @@ -82,6 +85,7 @@ private InstanceGroupManager( List targetPools, Integer targetSize, String zone) { + this.autoHealingPolicies = autoHealingPolicies; this.baseInstanceName = baseInstanceName; this.creationTimestamp = creationTimestamp; this.currentActions = currentActions; @@ -103,6 +107,9 @@ private InstanceGroupManager( @Override public Object getFieldValue(String fieldName) { + if (fieldName.equals("autoHealingPolicies")) { + return autoHealingPolicies; + } if (fieldName.equals("baseInstanceName")) { return baseInstanceName; } @@ -169,6 +176,10 @@ public List getFieldMask() { return null; } + public List getAutoHealingPoliciesList() { + return autoHealingPolicies; + } + public String getBaseInstanceName() { return baseInstanceName; } @@ -260,6 +271,7 @@ public static InstanceGroupManager getDefaultInstance() { } public static class Builder { + private List autoHealingPolicies; private String baseInstanceName; private String creationTimestamp; private InstanceGroupManagerActionsSummary currentActions; @@ -282,6 +294,9 @@ public static class Builder { public Builder mergeFrom(InstanceGroupManager other) { if (other == InstanceGroupManager.getDefaultInstance()) return this; + if (other.getAutoHealingPoliciesList() != null) { + this.autoHealingPolicies = other.autoHealingPolicies; + } if (other.getBaseInstanceName() != null) { this.baseInstanceName = other.baseInstanceName; } @@ -337,6 +352,7 @@ public Builder mergeFrom(InstanceGroupManager other) { } Builder(InstanceGroupManager source) { + this.autoHealingPolicies = source.autoHealingPolicies; this.baseInstanceName = source.baseInstanceName; this.creationTimestamp = source.creationTimestamp; this.currentActions = source.currentActions; @@ -356,6 +372,28 @@ public Builder mergeFrom(InstanceGroupManager other) { this.zone = source.zone; } + public List getAutoHealingPoliciesList() { + return autoHealingPolicies; + } + + public Builder addAllAutoHealingPolicies( + List autoHealingPolicies) { + if (this.autoHealingPolicies == null) { + this.autoHealingPolicies = new LinkedList<>(); + } + this.autoHealingPolicies.addAll(autoHealingPolicies); + return this; + } + + public Builder addAutoHealingPolicies( + InstanceGroupManagerAutoHealingPolicy autoHealingPolicies) { + if (this.autoHealingPolicies == null) { + this.autoHealingPolicies = new LinkedList<>(); + } + this.autoHealingPolicies.add(autoHealingPolicies); + return this; + } + public String getBaseInstanceName() { return baseInstanceName; } @@ -534,6 +572,7 @@ public Builder setZone(String zone) { public InstanceGroupManager build() { return new InstanceGroupManager( + autoHealingPolicies, baseInstanceName, creationTimestamp, currentActions, @@ -555,6 +594,7 @@ public InstanceGroupManager build() { public Builder clone() { Builder newBuilder = new Builder(); + newBuilder.addAllAutoHealingPolicies(this.autoHealingPolicies); newBuilder.setBaseInstanceName(this.baseInstanceName); newBuilder.setCreationTimestamp(this.creationTimestamp); newBuilder.setCurrentActions(this.currentActions); @@ -579,6 +619,9 @@ public Builder clone() { @Override public String toString() { return "InstanceGroupManager{" + + "autoHealingPolicies=" + + autoHealingPolicies + + ", " + "baseInstanceName=" + baseInstanceName + ", " @@ -639,7 +682,8 @@ public boolean equals(Object o) { } if (o instanceof InstanceGroupManager) { InstanceGroupManager that = (InstanceGroupManager) o; - return Objects.equals(this.baseInstanceName, that.getBaseInstanceName()) + return Objects.equals(this.autoHealingPolicies, that.getAutoHealingPoliciesList()) + && Objects.equals(this.baseInstanceName, that.getBaseInstanceName()) && Objects.equals(this.creationTimestamp, that.getCreationTimestamp()) && Objects.equals(this.currentActions, that.getCurrentActions()) && Objects.equals(this.description, that.getDescription()) @@ -663,6 +707,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + autoHealingPolicies, baseInstanceName, creationTimestamp, currentActions, diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAutoHealingPolicy.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAutoHealingPolicy.java new file mode 100644 index 000000000000..b6913aa6f81c --- /dev/null +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAutoHealingPolicy.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 InstanceGroupManagerAutoHealingPolicy implements ApiMessage { + private final String healthCheck; + private final Integer initialDelaySec; + + private InstanceGroupManagerAutoHealingPolicy() { + this.healthCheck = null; + this.initialDelaySec = null; + } + + private InstanceGroupManagerAutoHealingPolicy(String healthCheck, Integer initialDelaySec) { + this.healthCheck = healthCheck; + this.initialDelaySec = initialDelaySec; + } + + @Override + public Object getFieldValue(String fieldName) { + if (fieldName.equals("healthCheck")) { + return healthCheck; + } + if (fieldName.equals("initialDelaySec")) { + return initialDelaySec; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + public List getFieldMask() { + return null; + } + + public String getHealthCheck() { + return healthCheck; + } + + public Integer getInitialDelaySec() { + return initialDelaySec; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InstanceGroupManagerAutoHealingPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InstanceGroupManagerAutoHealingPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InstanceGroupManagerAutoHealingPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InstanceGroupManagerAutoHealingPolicy(); + } + + public static class Builder { + private String healthCheck; + private Integer initialDelaySec; + + Builder() {} + + public Builder mergeFrom(InstanceGroupManagerAutoHealingPolicy other) { + if (other == InstanceGroupManagerAutoHealingPolicy.getDefaultInstance()) return this; + if (other.getHealthCheck() != null) { + this.healthCheck = other.healthCheck; + } + if (other.getInitialDelaySec() != null) { + this.initialDelaySec = other.initialDelaySec; + } + return this; + } + + Builder(InstanceGroupManagerAutoHealingPolicy source) { + this.healthCheck = source.healthCheck; + this.initialDelaySec = source.initialDelaySec; + } + + public String getHealthCheck() { + return healthCheck; + } + + public Builder setHealthCheck(String healthCheck) { + this.healthCheck = healthCheck; + return this; + } + + public Integer getInitialDelaySec() { + return initialDelaySec; + } + + public Builder setInitialDelaySec(Integer initialDelaySec) { + this.initialDelaySec = initialDelaySec; + return this; + } + + public InstanceGroupManagerAutoHealingPolicy build() { + + return new InstanceGroupManagerAutoHealingPolicy(healthCheck, initialDelaySec); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setHealthCheck(this.healthCheck); + newBuilder.setInitialDelaySec(this.initialDelaySec); + return newBuilder; + } + } + + @Override + public String toString() { + return "InstanceGroupManagerAutoHealingPolicy{" + + "healthCheck=" + + healthCheck + + ", " + + "initialDelaySec=" + + initialDelaySec + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InstanceGroupManagerAutoHealingPolicy) { + InstanceGroupManagerAutoHealingPolicy that = (InstanceGroupManagerAutoHealingPolicy) o; + return Objects.equals(this.healthCheck, that.getHealthCheck()) + && Objects.equals(this.initialDelaySec, that.getInitialDelaySec()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(healthCheck, initialDelaySec); + } +} diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceTemplateClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceTemplateClient.java index 3f85bf192fcb..cfdb8d7cc3f8 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceTemplateClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceTemplateClient.java @@ -156,7 +156,8 @@ public InstanceTemplateStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Deletes the specified instance template. Deleting an instance template is permanent and cannot - * be undone. It's not possible to delete templates which are in use by an instance group. + * be undone. It is not possible to delete templates that are already in use by a managed instance + * group. * *

Sample code: * @@ -184,7 +185,8 @@ public final Operation deleteInstanceTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Deletes the specified instance template. Deleting an instance template is permanent and cannot - * be undone. It's not possible to delete templates which are in use by an instance group. + * be undone. It is not possible to delete templates that are already in use by a managed instance + * group. * *

Sample code: * @@ -211,7 +213,8 @@ public final Operation deleteInstanceTemplate(String instanceTemplate) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Deletes the specified instance template. Deleting an instance template is permanent and cannot - * be undone. It's not possible to delete templates which are in use by an instance group. + * be undone. It is not possible to delete templates that are already in use by a managed instance + * group. * *

Sample code: * @@ -236,7 +239,8 @@ public final Operation deleteInstanceTemplate(DeleteInstanceTemplateHttpRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Deletes the specified instance template. Deleting an instance template is permanent and cannot - * be undone. It's not possible to delete templates which are in use by an instance group. + * be undone. It is not possible to delete templates that are already in use by a managed instance + * group. * *

Sample code: * @@ -593,8 +597,7 @@ public final Operation insertInstanceTemplate(InsertInstanceTemplateHttpRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves a list of instance templates that are contained within the specified project and - * zone. + * Retrieves a list of instance templates that are contained within the specified project. * *

Sample code: * @@ -621,8 +624,7 @@ public final ListInstanceTemplatesPagedResponse listInstanceTemplates(ProjectNam // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves a list of instance templates that are contained within the specified project and - * zone. + * Retrieves a list of instance templates that are contained within the specified project. * *

Sample code: * @@ -647,8 +649,7 @@ public final ListInstanceTemplatesPagedResponse listInstanceTemplates(String pro // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves a list of instance templates that are contained within the specified project and - * zone. + * Retrieves a list of instance templates that are contained within the specified project. * *

Sample code: * @@ -675,8 +676,7 @@ public final ListInstanceTemplatesPagedResponse listInstanceTemplates( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves a list of instance templates that are contained within the specified project and - * zone. + * Retrieves a list of instance templates that are contained within the specified project. * *

Sample code: * @@ -702,8 +702,7 @@ public final ListInstanceTemplatesPagedResponse listInstanceTemplates( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Retrieves a list of instance templates that are contained within the specified project and - * zone. + * Retrieves a list of instance templates that are contained within the specified project. * *

Sample code: * diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectLocation.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectLocation.java index 8e4b43ac2442..dfdcc35b6fa7 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectLocation.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectLocation.java @@ -40,6 +40,7 @@ public final class InterconnectLocation implements ApiMessage { private final String peeringdbFacilityId; private final List regionInfos; private final String selfLink; + private final String status; private InterconnectLocation() { this.address = null; @@ -56,6 +57,7 @@ private InterconnectLocation() { this.peeringdbFacilityId = null; this.regionInfos = null; this.selfLink = null; + this.status = null; } private InterconnectLocation( @@ -72,7 +74,8 @@ private InterconnectLocation( String name, String peeringdbFacilityId, List regionInfos, - String selfLink) { + String selfLink, + String status) { this.address = address; this.availabilityZone = availabilityZone; this.city = city; @@ -87,6 +90,7 @@ private InterconnectLocation( this.peeringdbFacilityId = peeringdbFacilityId; this.regionInfos = regionInfos; this.selfLink = selfLink; + this.status = status; } @Override @@ -133,6 +137,9 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("selfLink")) { return selfLink; } + if (fieldName.equals("status")) { + return status; + } return null; } @@ -204,6 +211,10 @@ public String getSelfLink() { return selfLink; } + public String getStatus() { + return status; + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } @@ -241,6 +252,7 @@ public static class Builder { private String peeringdbFacilityId; private List regionInfos; private String selfLink; + private String status; Builder() {} @@ -288,6 +300,9 @@ public Builder mergeFrom(InterconnectLocation other) { if (other.getSelfLink() != null) { this.selfLink = other.selfLink; } + if (other.getStatus() != null) { + this.status = other.status; + } return this; } @@ -306,6 +321,7 @@ public Builder mergeFrom(InterconnectLocation other) { this.peeringdbFacilityId = source.peeringdbFacilityId; this.regionInfos = source.regionInfos; this.selfLink = source.selfLink; + this.status = source.status; } public String getAddress() { @@ -445,6 +461,15 @@ public Builder setSelfLink(String selfLink) { return this; } + public String getStatus() { + return status; + } + + public Builder setStatus(String status) { + this.status = status; + return this; + } + public InterconnectLocation build() { return new InterconnectLocation( @@ -461,7 +486,8 @@ public InterconnectLocation build() { name, peeringdbFacilityId, regionInfos, - selfLink); + selfLink, + status); } public Builder clone() { @@ -480,6 +506,7 @@ public Builder clone() { newBuilder.setPeeringdbFacilityId(this.peeringdbFacilityId); newBuilder.addAllRegionInfos(this.regionInfos); newBuilder.setSelfLink(this.selfLink); + newBuilder.setStatus(this.status); return newBuilder; } } @@ -528,6 +555,9 @@ public String toString() { + ", " + "selfLink=" + selfLink + + ", " + + "status=" + + status + "}"; } @@ -551,7 +581,8 @@ public boolean equals(Object o) { && Objects.equals(this.name, that.getName()) && Objects.equals(this.peeringdbFacilityId, that.getPeeringdbFacilityId()) && Objects.equals(this.regionInfos, that.getRegionInfosList()) - && Objects.equals(this.selfLink, that.getSelfLink()); + && Objects.equals(this.selfLink, that.getSelfLink()) + && Objects.equals(this.status, that.getStatus()); } return false; } @@ -572,6 +603,7 @@ public int hashCode() { name, peeringdbFacilityId, regionInfos, - selfLink); + selfLink, + status); } } diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java index 832217d070fb..980786a857a0 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java @@ -1348,7 +1348,7 @@ public final Policy setIamPolicyNodeGroup(SetIamPolicyNodeGroupHttpRequest reque * } * * - * @param nodeGroup Name of the NodeGroup resource to delete. + * @param nodeGroup Name of the NodeGroup resource to update. * @param nodeGroupsSetNodeTemplateRequestResource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1379,7 +1379,7 @@ public final Operation setNodeTemplateNodeGroup( * } * * - * @param nodeGroup Name of the NodeGroup resource to delete. + * @param nodeGroup Name of the NodeGroup resource to update. * @param nodeGroupsSetNodeTemplateRequestResource * @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/Quota.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Quota.java index 0001cdcba466..321b03560fdc 100644 --- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Quota.java +++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/Quota.java @@ -27,17 +27,20 @@ public final class Quota implements ApiMessage { private final Double limit; private final String metric; + private final String owner; private final Double usage; private Quota() { this.limit = null; this.metric = null; + this.owner = null; this.usage = null; } - private Quota(Double limit, String metric, Double usage) { + private Quota(Double limit, String metric, String owner, Double usage) { this.limit = limit; this.metric = metric; + this.owner = owner; this.usage = usage; } @@ -49,6 +52,9 @@ public Object getFieldValue(String fieldName) { if (fieldName.equals("metric")) { return metric; } + if (fieldName.equals("owner")) { + return owner; + } if (fieldName.equals("usage")) { return usage; } @@ -75,6 +81,10 @@ public String getMetric() { return metric; } + public String getOwner() { + return owner; + } + public Double getUsage() { return usage; } @@ -104,6 +114,7 @@ public static Quota getDefaultInstance() { public static class Builder { private Double limit; private String metric; + private String owner; private Double usage; Builder() {} @@ -116,6 +127,9 @@ public Builder mergeFrom(Quota other) { if (other.getMetric() != null) { this.metric = other.metric; } + if (other.getOwner() != null) { + this.owner = other.owner; + } if (other.getUsage() != null) { this.usage = other.usage; } @@ -125,6 +139,7 @@ public Builder mergeFrom(Quota other) { Builder(Quota source) { this.limit = source.limit; this.metric = source.metric; + this.owner = source.owner; this.usage = source.usage; } @@ -146,6 +161,15 @@ public Builder setMetric(String metric) { return this; } + public String getOwner() { + return owner; + } + + public Builder setOwner(String owner) { + this.owner = owner; + return this; + } + public Double getUsage() { return usage; } @@ -157,13 +181,14 @@ public Builder setUsage(Double usage) { public Quota build() { - return new Quota(limit, metric, usage); + return new Quota(limit, metric, owner, usage); } public Builder clone() { Builder newBuilder = new Builder(); newBuilder.setLimit(this.limit); newBuilder.setMetric(this.metric); + newBuilder.setOwner(this.owner); newBuilder.setUsage(this.usage); return newBuilder; } @@ -171,7 +196,8 @@ public Builder clone() { @Override public String toString() { - return "Quota{" + "limit=" + limit + ", " + "metric=" + metric + ", " + "usage=" + usage + "}"; + return "Quota{" + "limit=" + limit + ", " + "metric=" + metric + ", " + "owner=" + owner + ", " + + "usage=" + usage + "}"; } @Override @@ -183,6 +209,7 @@ public boolean equals(Object o) { Quota that = (Quota) o; return Objects.equals(this.limit, that.getLimit()) && Objects.equals(this.metric, that.getMetric()) + && Objects.equals(this.owner, that.getOwner()) && Objects.equals(this.usage, that.getUsage()); } return false; @@ -190,6 +217,6 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(limit, metric, usage); + return Objects.hash(limit, metric, owner, usage); } } diff --git a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java index 35683f38a24c..6f15af28ae58 100644 --- a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java +++ b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java @@ -679,6 +679,7 @@ public void getInstanceTest() { String creationTimestamp = "creationTimestamp567396278"; Boolean deletionProtection = true; String description = "description-1724546052"; + String hostname = "hostname-299803597"; String id = "id3355"; String kind = "kind3292052"; String labelFingerprint = "labelFingerprint714995737"; @@ -698,6 +699,7 @@ public void getInstanceTest() { .setCreationTimestamp(creationTimestamp) .setDeletionProtection(deletionProtection) .setDescription(description) + .setHostname(hostname) .setId(id) .setKind(kind) .setLabelFingerprint(labelFingerprint) diff --git a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InterconnectLocationClientTest.java b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InterconnectLocationClientTest.java index 356a3a0f83c4..489b69546dab 100644 --- a/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InterconnectLocationClientTest.java +++ b/google-cloud-clients/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/InterconnectLocationClientTest.java @@ -94,6 +94,7 @@ public void getInterconnectLocationTest() { String name = "name3373707"; String peeringdbFacilityId = "peeringdbFacilityId-303818"; String selfLink = "selfLink-1691268851"; + String status = "status-892481550"; InterconnectLocation expectedResponse = InterconnectLocation.newBuilder() .setAddress(address.toString()) @@ -109,6 +110,7 @@ public void getInterconnectLocationTest() { .setName(name) .setPeeringdbFacilityId(peeringdbFacilityId) .setSelfLink(selfLink) + .setStatus(status) .build(); mockService.addResponse(expectedResponse); diff --git a/google-cloud-clients/google-cloud-compute/synth.metadata b/google-cloud-clients/google-cloud-compute/synth.metadata index d270120aa795..c9c3aef4a486 100644 --- a/google-cloud-clients/google-cloud-compute/synth.metadata +++ b/google-cloud-clients/google-cloud-compute/synth.metadata @@ -1,18 +1,18 @@ { - "updateTime": "2018-12-11T08:36:44.801706Z", + "updateTime": "2019-01-11T08:36:38.993872Z", "sources": [ { "git": { "name": "discovery-artifact-manager", "remote": "https://github.com/googleapis/discovery-artifact-manager.git", - "sha": "0c2b7d9787d601bce81e5f8f2d1ad320d67c3792" + "sha": "8349004ea788d5abad27dc84761eb94ea3e6fc86" } }, { "generator": { "name": "artman", - "version": "0.16.2", - "dockerImage": "googleapis/artman@sha256:2f6b261ee7fe1aedf238991c93a20b3820de37a343d0cacf3e3e9555c2aaf2ea" + "version": "0.16.5", + "dockerImage": "googleapis/artman@sha256:5a96c2c5c6f9570cc9556b63dc9ce1838777fd9166b5b64e43ad8e0ecee2fe2c" } } ]