diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 44b91746f..d500a9a91 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -20,17 +20,22 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. +# include common functions +source ${scriptDir}/common.sh + # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -T 1C +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C # if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 000000000..a3bbc5f67 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# set -eo pipefail + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + echo "${command}" + ${command} + exit_code=$? + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 067a72222..0aade871c 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -15,7 +15,13 @@ set -eo pipefail -cd github/java-compute/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java java -version @@ -24,8 +30,9 @@ echo $JOB_TYPE export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh index 364b36d00..759ab4e2c 100755 --- a/.kokoro/linkage-monitor.sh +++ b/.kokoro/linkage-monitor.sh @@ -17,18 +17,26 @@ set -eo pipefail # Display commands being run. set -x -cd github/java-compute/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true # Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR JAR=linkage-monitor-latest-all-deps.jar diff --git a/README.md b/README.md index 72c308623..6a25e2837 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 4.2.0 + 4.3.0 pom import diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index 0a4f7e08d..328f22c37 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -22,4 +22,19 @@ com/google/cloud/compute/v1/SubnetworkClient com.google.cloud.compute.v1.Operation patchSubnetwork(java.lang.String, com.google.cloud.compute.v1.Subnetwork, java.util.List) + + 7004 + com/google/cloud/compute/v1/RegionSslCertificateClient + * insertRegionSslCertificate* + + + 7004 + com/google/cloud/compute/v1/SslCertificateClient + * insertSslCertificate* + + + 7004 + com/google/cloud/compute/v1/*Client + * aggregatedList* + diff --git a/renovate.json b/renovate.json index fc6412701..360b6ea87 100644 --- a/renovate.json +++ b/renovate.json @@ -56,7 +56,9 @@ }, { "packagePatterns": [ - "^com.google.cloud:libraries-bom" + "^com.google.cloud:google-cloud-compute", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" ], "semanticCommitType": "chore", "semanticCommitScope": "deps" @@ -75,4 +77,4 @@ } ], "semanticCommits": true -} +} \ No newline at end of file diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 000000000..9d26b83b2 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + compute-install-without-bom + jar + Google Compute Engine Install Without Bom + https://github.com/googleapis/java-compute + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-compute + 0.117.0-alpha + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 000000000..7baa2d90f --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-compute-samples + 0.0.1-SNAPSHOT + pom + Google Compute Engine Samples Parent + https://github.com/googleapis/java-compute + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 000000000..6b63bf831 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + compute-snapshot + jar + Google Compute Engine Snapshot Samples + https://github.com/googleapis/java-compute + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-compute + 0.117.0-alpha + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 000000000..2189d11ac --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + com.google.cloud + compute-snippets + jar + Google Compute Engine Snippets + https://github.com/googleapis/java-compute + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + + com.google.cloud + libraries-bom + 4.3.0 + pom + import + + + + + + + com.google.cloud + google-cloud-compute + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java b/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java index 690d7ebef..2392993d0 100644 --- a/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java +++ b/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java @@ -162,21 +162,29 @@ public AcceleratorTypeStub getStub() { * *

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (AcceleratorTypesScopedList element : acceleratorTypeClient.aggregatedListAcceleratorTypes(project).iterateAll()) {
+   *   for (AcceleratorTypesScopedList element : acceleratorTypeClient.aggregatedListAcceleratorTypes(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAcceleratorTypes( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListAcceleratorTypes(request); @@ -190,21 +198,31 @@ public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAccelerat * *

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (AcceleratorTypesScopedList element : acceleratorTypeClient.aggregatedListAcceleratorTypes(project.toString()).iterateAll()) {
+   *   for (AcceleratorTypesScopedList element : acceleratorTypeClient.aggregatedListAcceleratorTypes(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAcceleratorTypes( - String project) { + Boolean includeAllScopes, String project) { AggregatedListAcceleratorTypesHttpRequest request = - AggregatedListAcceleratorTypesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListAcceleratorTypesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListAcceleratorTypes(request); } @@ -216,8 +234,10 @@ public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAccelerat * *

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (AcceleratorTypesScopedList element : acceleratorTypeClient.aggregatedListAcceleratorTypes(request).iterateAll()) {
@@ -243,8 +263,10 @@ public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAccelerat
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListAcceleratorTypesPagedResponse> future = acceleratorTypeClient.aggregatedListAcceleratorTypesPagedCallable().futureCall(request);
@@ -270,8 +292,10 @@ public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAccelerat
    *
    * 

    * try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesInstanceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesInstanceHttpRequest.java
new file mode 100644
index 000000000..bf454e0b0
--- /dev/null
+++ b/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesInstanceHttpRequest.java
@@ -0,0 +1,547 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.instances.addResourcePolicies. Adds existing resource policies
+ * to an instance. You can only add one policy right now which will be applied to this instance for
+ * scheduling live migrations.
+ */
+public final class AddResourcePoliciesInstanceHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String instance;
+  private final InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource;
+  private final String key;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String requestId;
+  private final String userIp;
+
+  private AddResourcePoliciesInstanceHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.instance = null;
+    this.instancesAddResourcePoliciesRequestResource = null;
+    this.key = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.requestId = null;
+    this.userIp = null;
+  }
+
+  private AddResourcePoliciesInstanceHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String instance,
+      InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource,
+      String key,
+      String prettyPrint,
+      String quotaUser,
+      String requestId,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.instance = instance;
+    this.instancesAddResourcePoliciesRequestResource = instancesAddResourcePoliciesRequestResource;
+    this.key = key;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.requestId = requestId;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("instance".equals(fieldName)) {
+      return instance;
+    }
+    if ("instancesAddResourcePoliciesRequestResource".equals(fieldName)) {
+      return instancesAddResourcePoliciesRequestResource;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("requestId".equals(fieldName)) {
+      return requestId;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public InstancesAddResourcePoliciesRequest getApiMessageRequestBody() {
+    return instancesAddResourcePoliciesRequestResource;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /**
+   * The instance name for this request. It must have the format
+   * `{project}/zones/{zone}/instances/{instance}/addResourcePolicies`. \`{instance}\` must start
+   * with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`),
+   * * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs
+   * (\`%\`). It must be between 3 and 255 characters in length, and it * must not start with
+   * \`"goog"\`.
+   */
+  public String getInstance() {
+    return instance;
+  }
+
+  public InstancesAddResourcePoliciesRequest getInstancesAddResourcePoliciesRequestResource() {
+    return instancesAddResourcePoliciesRequestResource;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /**
+   * An optional request ID to identify requests. Specify a unique request ID so that if you must
+   * retry your request, the server will know to ignore the request if it has already been
+   * completed.
+   *
+   * 

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(AddResourcePoliciesInstanceHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static AddResourcePoliciesInstanceHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final AddResourcePoliciesInstanceHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new AddResourcePoliciesInstanceHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String instance; + private InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource; + private String key; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(AddResourcePoliciesInstanceHttpRequest other) { + if (other == AddResourcePoliciesInstanceHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getInstance() != null) { + this.instance = other.instance; + } + if (other.getInstancesAddResourcePoliciesRequestResource() != null) { + this.instancesAddResourcePoliciesRequestResource = + other.instancesAddResourcePoliciesRequestResource; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(AddResourcePoliciesInstanceHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.instance = source.instance; + this.instancesAddResourcePoliciesRequestResource = + source.instancesAddResourcePoliciesRequestResource; + this.key = source.key; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** + * The instance name for this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/addResourcePolicies`. \`{instance}\` must start + * with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), + * * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * + * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not start + * with \`"goog"\`. + */ + public String getInstance() { + return instance; + } + + /** + * The instance name for this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/addResourcePolicies`. \`{instance}\` must start + * with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), + * * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * + * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not start + * with \`"goog"\`. + */ + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public InstancesAddResourcePoliciesRequest getInstancesAddResourcePoliciesRequestResource() { + return instancesAddResourcePoliciesRequestResource; + } + + public Builder setInstancesAddResourcePoliciesRequestResource( + InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource) { + this.instancesAddResourcePoliciesRequestResource = + instancesAddResourcePoliciesRequestResource; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public AddResourcePoliciesInstanceHttpRequest build() { + String missing = ""; + + if (instance == null) { + missing += " instance"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new AddResourcePoliciesInstanceHttpRequest( + access_token, + callback, + fields, + instance, + instancesAddResourcePoliciesRequestResource, + key, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setInstance(this.instance); + newBuilder.setInstancesAddResourcePoliciesRequestResource( + this.instancesAddResourcePoliciesRequestResource); + newBuilder.setKey(this.key); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "AddResourcePoliciesInstanceHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "instance=" + + instance + + ", " + + "instancesAddResourcePoliciesRequestResource=" + + instancesAddResourcePoliciesRequestResource + + ", " + + "key=" + + key + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AddResourcePoliciesInstanceHttpRequest) { + AddResourcePoliciesInstanceHttpRequest that = (AddResourcePoliciesInstanceHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.instance, that.getInstance()) + && Objects.equals( + this.instancesAddResourcePoliciesRequestResource, + that.getInstancesAddResourcePoliciesRequestResource()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + instance, + instancesAddResourcePoliciesRequestResource, + key, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/AddressClient.java b/src/main/java/com/google/cloud/compute/v1/AddressClient.java index aa285d317..b6dd2e5b4 100644 --- a/src/main/java/com/google/cloud/compute/v1/AddressClient.java +++ b/src/main/java/com/google/cloud/compute/v1/AddressClient.java @@ -159,20 +159,29 @@ public AddressStub getStub() { * *


    * try (AddressClient addressClient = AddressClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (AddressesScopedList element : addressClient.aggregatedListAddresses(project).iterateAll()) {
+   *   for (AddressesScopedList element : addressClient.aggregatedListAddresses(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListAddressesPagedResponse aggregatedListAddresses(ProjectName project) { + public final AggregatedListAddressesPagedResponse aggregatedListAddresses( + Boolean includeAllScopes, ProjectName project) { AggregatedListAddressesHttpRequest request = AggregatedListAddressesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListAddresses(request); @@ -186,20 +195,31 @@ public final AggregatedListAddressesPagedResponse aggregatedListAddresses(Projec * *

    * try (AddressClient addressClient = AddressClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (AddressesScopedList element : addressClient.aggregatedListAddresses(project.toString()).iterateAll()) {
+   *   for (AddressesScopedList element : addressClient.aggregatedListAddresses(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListAddressesPagedResponse aggregatedListAddresses(String project) { + public final AggregatedListAddressesPagedResponse aggregatedListAddresses( + Boolean includeAllScopes, String project) { AggregatedListAddressesHttpRequest request = - AggregatedListAddressesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListAddressesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListAddresses(request); } @@ -211,8 +231,10 @@ public final AggregatedListAddressesPagedResponse aggregatedListAddresses(String * *

    * try (AddressClient addressClient = AddressClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAddressesHttpRequest request = AggregatedListAddressesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (AddressesScopedList element : addressClient.aggregatedListAddresses(request).iterateAll()) {
@@ -238,8 +260,10 @@ public final AggregatedListAddressesPagedResponse aggregatedListAddresses(
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAddressesHttpRequest request = AggregatedListAddressesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListAddressesPagedResponse> future = addressClient.aggregatedListAddressesPagedCallable().futureCall(request);
@@ -265,8 +289,10 @@ public final AggregatedListAddressesPagedResponse aggregatedListAddresses(
    *
    * 

    * try (AddressClient addressClient = AddressClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAddressesHttpRequest request = AggregatedListAddressesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListAcceleratorTypesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListAcceleratorTypesHttpRequest.java
index a3024401b..567d04710 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListAcceleratorTypesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListAcceleratorTypesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListAcceleratorTypesHttpRequest implements ApiMessa
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListAcceleratorTypesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListAcceleratorTypesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListAcceleratorTypesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListAcceleratorTypesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListAcceleratorTypesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListAcceleratorTypesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListAddressesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListAddressesHttpRequest.java
index 26b39fd4f..a377d590e 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListAddressesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListAddressesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListAddressesHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListAddressesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListAddressesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListAddressesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListAddressesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListAddressesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListAddressesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListAutoscalersHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListAutoscalersHttpRequest.java
index 1ad4ef60c..a80a857c8 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListAutoscalersHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListAutoscalersHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListAutoscalersHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListAutoscalersHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListAutoscalersHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListAutoscalersHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListAutoscalersHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListAutoscalersHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListAutoscalersHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListBackendServicesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListBackendServicesHttpRequest.java
index 59a868652..73f7101b1 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListBackendServicesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListBackendServicesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListBackendServicesHttpRequest implements ApiMessag
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListBackendServicesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListBackendServicesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListBackendServicesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListBackendServicesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListBackendServicesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListBackendServicesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListDiskTypesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListDiskTypesHttpRequest.java
index 8113424ef..4a0f85645 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListDiskTypesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListDiskTypesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListDiskTypesHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListDiskTypesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListDiskTypesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListDiskTypesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListDiskTypesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListDiskTypesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListDiskTypesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListDisksHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListDisksHttpRequest.java
index 982ae11a7..b98116231 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListDisksHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListDisksHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListDisksHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListDisksHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListDisksHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListDisksHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListDisksHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListDisksHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListDisksHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListForwardingRulesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListForwardingRulesHttpRequest.java
index 223a40ebb..5efc98002 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListForwardingRulesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListForwardingRulesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListForwardingRulesHttpRequest implements ApiMessag
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListForwardingRulesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListForwardingRulesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListForwardingRulesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListForwardingRulesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListForwardingRulesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListForwardingRulesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListGlobalOperationsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListGlobalOperationsHttpRequest.java
index fb876c439..4bb51dfc4 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListGlobalOperationsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListGlobalOperationsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListGlobalOperationsHttpRequest implements ApiMessa
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListGlobalOperationsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListGlobalOperationsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListGlobalOperationsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListGlobalOperationsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListGlobalOperationsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListGlobalOperationsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListHealthChecksHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListHealthChecksHttpRequest.java
index a4ec05cbe..807789304 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListHealthChecksHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListHealthChecksHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListHealthChecksHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListHealthChecksHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListHealthChecksHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListHealthChecksHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListHealthChecksHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListHealthChecksHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListHealthChecksHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupManagersHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupManagersHttpRequest.java
index 615ef10c1..04ff87184 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupManagersHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupManagersHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListInstanceGroupManagersHttpRequest implements Api
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListInstanceGroupManagersHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListInstanceGroupManagersHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListInstanceGroupManagersHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListInstanceGroupManagersHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListInstanceGroupManagersHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListInstanceGroupManagersHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupsHttpRequest.java
index f4346051f..1577ae45c 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListInstanceGroupsHttpRequest implements ApiMessage
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListInstanceGroupsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListInstanceGroupsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListInstanceGroupsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListInstanceGroupsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListInstanceGroupsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListInstanceGroupsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListInstancesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListInstancesHttpRequest.java
index b06df624a..4134c4346 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListInstancesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListInstancesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListInstancesHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListInstancesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListInstancesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListInstancesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListInstancesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListInstancesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListInstancesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListInterconnectAttachmentsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListInterconnectAttachmentsHttpRequest.java
index 85f25deef..6fa121991 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListInterconnectAttachmentsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListInterconnectAttachmentsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListInterconnectAttachmentsHttpRequest implements A
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListInterconnectAttachmentsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListInterconnectAttachmentsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListInterconnectAttachmentsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -298,6 +317,9 @@ public Builder mergeFrom(AggregatedListInterconnectAttachmentsHttpRequest other)
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -330,6 +352,7 @@ public Builder mergeFrom(AggregatedListInterconnectAttachmentsHttpRequest other)
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -422,6 +445,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -573,6 +619,7 @@ public AggregatedListInterconnectAttachmentsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -589,6 +636,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -616,6 +664,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -654,6 +705,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -673,6 +725,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListMachineTypesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListMachineTypesHttpRequest.java
index b5ec87e49..c0b8dea73 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListMachineTypesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListMachineTypesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListMachineTypesHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListMachineTypesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListMachineTypesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListMachineTypesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListMachineTypesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListMachineTypesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListMachineTypesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsHttpRequest.java
index 43327b931..f808ae766 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListNetworkEndpointGroupsHttpRequest implements Api
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListNetworkEndpointGroupsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListNetworkEndpointGroupsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListNetworkEndpointGroupsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListNetworkEndpointGroupsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListNetworkEndpointGroupsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListNetworkEndpointGroupsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeGroupsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeGroupsHttpRequest.java
index ad34cf431..9f80ef060 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeGroupsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeGroupsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListNodeGroupsHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListNodeGroupsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListNodeGroupsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListNodeGroupsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListNodeGroupsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListNodeGroupsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListNodeGroupsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTemplatesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTemplatesHttpRequest.java
index 45cef9ec8..64091b789 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTemplatesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTemplatesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListNodeTemplatesHttpRequest implements ApiMessage
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListNodeTemplatesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListNodeTemplatesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListNodeTemplatesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListNodeTemplatesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListNodeTemplatesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListNodeTemplatesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTypesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTypesHttpRequest.java
index b200df552..007309b72 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTypesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTypesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListNodeTypesHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListNodeTypesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListNodeTypesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListNodeTypesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListNodeTypesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListNodeTypesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListNodeTypesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListPacketMirroringsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListPacketMirroringsHttpRequest.java
index 2ddcaee4e..fea60e75e 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListPacketMirroringsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListPacketMirroringsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListPacketMirroringsHttpRequest implements ApiMessa
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListPacketMirroringsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListPacketMirroringsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListPacketMirroringsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListPacketMirroringsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListPacketMirroringsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListPacketMirroringsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListRegionCommitmentsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListRegionCommitmentsHttpRequest.java
index 28e61e22e..daf3539b4 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListRegionCommitmentsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListRegionCommitmentsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListRegionCommitmentsHttpRequest implements ApiMess
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListRegionCommitmentsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListRegionCommitmentsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListRegionCommitmentsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListRegionCommitmentsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListRegionCommitmentsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListRegionCommitmentsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListReservationsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListReservationsHttpRequest.java
index 46d49d421..ccaba7199 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListReservationsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListReservationsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListReservationsHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListReservationsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListReservationsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListReservationsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListReservationsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListReservationsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListReservationsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListResourcePoliciesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListResourcePoliciesHttpRequest.java
index e3b23380e..6db609491 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListResourcePoliciesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListResourcePoliciesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListResourcePoliciesHttpRequest implements ApiMessa
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListResourcePoliciesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListResourcePoliciesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListResourcePoliciesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListResourcePoliciesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListResourcePoliciesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListResourcePoliciesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListRoutersHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListRoutersHttpRequest.java
index ef6f2d415..3e3bee662 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListRoutersHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListRoutersHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListRoutersHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListRoutersHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListRoutersHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListRoutersHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListRoutersHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListRoutersHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListRoutersHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListSslCertificatesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListSslCertificatesHttpRequest.java
index 75ca39693..0e1cfebf9 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListSslCertificatesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListSslCertificatesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListSslCertificatesHttpRequest implements ApiMessag
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListSslCertificatesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListSslCertificatesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListSslCertificatesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListSslCertificatesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListSslCertificatesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListSslCertificatesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListSubnetworksHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListSubnetworksHttpRequest.java
index d9f6cc19d..880974ed8 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListSubnetworksHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListSubnetworksHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListSubnetworksHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListSubnetworksHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListSubnetworksHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListSubnetworksHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListSubnetworksHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListSubnetworksHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListSubnetworksHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpProxiesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpProxiesHttpRequest.java
index 65e5d2098..414da453b 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpProxiesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpProxiesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListTargetHttpProxiesHttpRequest implements ApiMess
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListTargetHttpProxiesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListTargetHttpProxiesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListTargetHttpProxiesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListTargetHttpProxiesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListTargetHttpProxiesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListTargetHttpProxiesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpsProxiesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpsProxiesHttpRequest.java
index 142ac139c..d50cfd7c5 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpsProxiesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpsProxiesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListTargetHttpsProxiesHttpRequest implements ApiMes
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListTargetHttpsProxiesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListTargetHttpsProxiesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListTargetHttpsProxiesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListTargetHttpsProxiesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListTargetHttpsProxiesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListTargetHttpsProxiesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetInstancesHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetInstancesHttpRequest.java
index 1349f8bb1..ff0fd30f1 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetInstancesHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetInstancesHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListTargetInstancesHttpRequest implements ApiMessag
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListTargetInstancesHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListTargetInstancesHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListTargetInstancesHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListTargetInstancesHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListTargetInstancesHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListTargetInstancesHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetPoolsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetPoolsHttpRequest.java
index b605777da..9bbd28405 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetPoolsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetPoolsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListTargetPoolsHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListTargetPoolsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListTargetPoolsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListTargetPoolsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListTargetPoolsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListTargetPoolsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListTargetPoolsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetVpnGatewaysHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetVpnGatewaysHttpRequest.java
index 8ea5b87b4..a0ab3dd9d 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetVpnGatewaysHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetVpnGatewaysHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListTargetVpnGatewaysHttpRequest implements ApiMess
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListTargetVpnGatewaysHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListTargetVpnGatewaysHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListTargetVpnGatewaysHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListTargetVpnGatewaysHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListTargetVpnGatewaysHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListTargetVpnGatewaysHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -653,6 +704,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -672,6 +724,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListUrlMapsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListUrlMapsHttpRequest.java
index 3f454766e..fc64ee31c 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListUrlMapsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListUrlMapsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListUrlMapsHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListUrlMapsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListUrlMapsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListUrlMapsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListUrlMapsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListUrlMapsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListUrlMapsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnGatewaysHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnGatewaysHttpRequest.java
index 9d3bfb3b0..53550d401 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnGatewaysHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnGatewaysHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListVpnGatewaysHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListVpnGatewaysHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListVpnGatewaysHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListVpnGatewaysHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListVpnGatewaysHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListVpnGatewaysHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListVpnGatewaysHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnTunnelsHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnTunnelsHttpRequest.java
index 801f9642e..859554cdf 100644
--- a/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnTunnelsHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnTunnelsHttpRequest.java
@@ -33,6 +33,7 @@ public final class AggregatedListVpnTunnelsHttpRequest implements ApiMessage {
   private final String callback;
   private final String fields;
   private final String filter;
+  private final Boolean includeAllScopes;
   private final String key;
   private final Integer maxResults;
   private final String orderBy;
@@ -47,6 +48,7 @@ private AggregatedListVpnTunnelsHttpRequest() {
     this.callback = null;
     this.fields = null;
     this.filter = null;
+    this.includeAllScopes = null;
     this.key = null;
     this.maxResults = null;
     this.orderBy = null;
@@ -62,6 +64,7 @@ private AggregatedListVpnTunnelsHttpRequest(
       String callback,
       String fields,
       String filter,
+      Boolean includeAllScopes,
       String key,
       Integer maxResults,
       String orderBy,
@@ -74,6 +77,7 @@ private AggregatedListVpnTunnelsHttpRequest(
     this.callback = callback;
     this.fields = fields;
     this.filter = filter;
+    this.includeAllScopes = includeAllScopes;
     this.key = key;
     this.maxResults = maxResults;
     this.orderBy = orderBy;
@@ -98,6 +102,9 @@ public Object getFieldValue(String fieldName) {
     if ("filter".equals(fieldName)) {
       return filter;
     }
+    if ("includeAllScopes".equals(fieldName)) {
+      return includeAllScopes;
+    }
     if ("key".equals(fieldName)) {
       return key;
     }
@@ -181,6 +188,17 @@ public String getFilter() {
     return filter;
   }
 
+  /**
+   * Indicates whether every visible scope for each scope type (zone, region, global) should be
+   * included in the response. For new resource types added after this field, the flag has no effect
+   * as new resource types will always include every visible scope for each scope type in response.
+   * For resource types which predate this field, if this flag is omitted or false, only scopes of
+   * the scope types where the resource type is expected to be found will be included.
+   */
+  public Boolean getIncludeAllScopes() {
+    return includeAllScopes;
+  }
+
   /** API key. Required unless you provide an OAuth 2.0 token. */
   public String getKey() {
     return key;
@@ -272,6 +290,7 @@ public static class Builder {
     private String callback;
     private String fields;
     private String filter;
+    private Boolean includeAllScopes;
     private String key;
     private Integer maxResults;
     private String orderBy;
@@ -297,6 +316,9 @@ public Builder mergeFrom(AggregatedListVpnTunnelsHttpRequest other) {
       if (other.getFilter() != null) {
         this.filter = other.filter;
       }
+      if (other.getIncludeAllScopes() != null) {
+        this.includeAllScopes = other.includeAllScopes;
+      }
       if (other.getKey() != null) {
         this.key = other.key;
       }
@@ -329,6 +351,7 @@ public Builder mergeFrom(AggregatedListVpnTunnelsHttpRequest other) {
       this.callback = source.callback;
       this.fields = source.fields;
       this.filter = source.filter;
+      this.includeAllScopes = source.includeAllScopes;
       this.key = source.key;
       this.maxResults = source.maxResults;
       this.orderBy = source.orderBy;
@@ -421,6 +444,29 @@ public Builder setFilter(String filter) {
       return this;
     }
 
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Boolean getIncludeAllScopes() {
+      return includeAllScopes;
+    }
+
+    /**
+     * Indicates whether every visible scope for each scope type (zone, region, global) should be
+     * included in the response. For new resource types added after this field, the flag has no
+     * effect as new resource types will always include every visible scope for each scope type in
+     * response. For resource types which predate this field, if this flag is omitted or false, only
+     * scopes of the scope types where the resource type is expected to be found will be included.
+     */
+    public Builder setIncludeAllScopes(Boolean includeAllScopes) {
+      this.includeAllScopes = includeAllScopes;
+      return this;
+    }
+
     /** API key. Required unless you provide an OAuth 2.0 token. */
     public String getKey() {
       return key;
@@ -572,6 +618,7 @@ public AggregatedListVpnTunnelsHttpRequest build() {
           callback,
           fields,
           filter,
+          includeAllScopes,
           key,
           maxResults,
           orderBy,
@@ -588,6 +635,7 @@ public Builder clone() {
       newBuilder.setCallback(this.callback);
       newBuilder.setFields(this.fields);
       newBuilder.setFilter(this.filter);
+      newBuilder.setIncludeAllScopes(this.includeAllScopes);
       newBuilder.setKey(this.key);
       newBuilder.setMaxResults(this.maxResults);
       newBuilder.setOrderBy(this.orderBy);
@@ -615,6 +663,9 @@ public String toString() {
         + "filter="
         + filter
         + ", "
+        + "includeAllScopes="
+        + includeAllScopes
+        + ", "
         + "key="
         + key
         + ", "
@@ -652,6 +703,7 @@ public boolean equals(Object o) {
           && Objects.equals(this.callback, that.getCallback())
           && Objects.equals(this.fields, that.getFields())
           && Objects.equals(this.filter, that.getFilter())
+          && Objects.equals(this.includeAllScopes, that.getIncludeAllScopes())
           && Objects.equals(this.key, that.getKey())
           && Objects.equals(this.maxResults, that.getMaxResults())
           && Objects.equals(this.orderBy, that.getOrderBy())
@@ -671,6 +723,7 @@ public int hashCode() {
         callback,
         fields,
         filter,
+        includeAllScopes,
         key,
         maxResults,
         orderBy,
diff --git a/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest.java
new file mode 100644
index 000000000..6236b83bd
--- /dev/null
+++ b/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest.java
@@ -0,0 +1,487 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.instanceGroupManagers.applyUpdatesToInstances. Applies changes
+ * to selected instances on the managed instance group. This method can be used to apply new
+ * overrides and/or new versions.
+ */
+public final class ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String instanceGroupManager;
+  private final InstanceGroupManagersApplyUpdatesRequest
+      instanceGroupManagersApplyUpdatesRequestResource;
+  private final String key;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String userIp;
+
+  private ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.instanceGroupManager = null;
+    this.instanceGroupManagersApplyUpdatesRequestResource = null;
+    this.key = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.userIp = null;
+  }
+
+  private ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String instanceGroupManager,
+      InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource,
+      String key,
+      String prettyPrint,
+      String quotaUser,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.instanceGroupManager = instanceGroupManager;
+    this.instanceGroupManagersApplyUpdatesRequestResource =
+        instanceGroupManagersApplyUpdatesRequestResource;
+    this.key = key;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("instanceGroupManager".equals(fieldName)) {
+      return instanceGroupManager;
+    }
+    if ("instanceGroupManagersApplyUpdatesRequestResource".equals(fieldName)) {
+      return instanceGroupManagersApplyUpdatesRequestResource;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public InstanceGroupManagersApplyUpdatesRequest getApiMessageRequestBody() {
+    return instanceGroupManagersApplyUpdatesRequestResource;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /**
+   * The name of the managed instance group, should conform to RFC1035. It must have the format
+   * `{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances`.
+   * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+   * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+   * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+   * in length, and it * must not start with \`"goog"\`.
+   */
+  public String getInstanceGroupManager() {
+    return instanceGroupManager;
+  }
+
+  /** InstanceGroupManagers.applyUpdatesToInstances */
+  public InstanceGroupManagersApplyUpdatesRequest
+      getInstanceGroupManagersApplyUpdatesRequestResource() {
+    return instanceGroupManagersApplyUpdatesRequestResource;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /** IP address of the end user for whom the API call is being made. */
+  public String getUserIp() {
+    return userIp;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(
+      ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest();
+  }
+
+  public static class Builder {
+    private String access_token;
+    private String callback;
+    private String fields;
+    private String instanceGroupManager;
+    private InstanceGroupManagersApplyUpdatesRequest
+        instanceGroupManagersApplyUpdatesRequestResource;
+    private String key;
+    private String prettyPrint;
+    private String quotaUser;
+    private String userIp;
+
+    Builder() {}
+
+    public Builder mergeFrom(ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest other) {
+      if (other == ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest.getDefaultInstance())
+        return this;
+      if (other.getAccessToken() != null) {
+        this.access_token = other.access_token;
+      }
+      if (other.getCallback() != null) {
+        this.callback = other.callback;
+      }
+      if (other.getFields() != null) {
+        this.fields = other.fields;
+      }
+      if (other.getInstanceGroupManager() != null) {
+        this.instanceGroupManager = other.instanceGroupManager;
+      }
+      if (other.getInstanceGroupManagersApplyUpdatesRequestResource() != null) {
+        this.instanceGroupManagersApplyUpdatesRequestResource =
+            other.instanceGroupManagersApplyUpdatesRequestResource;
+      }
+      if (other.getKey() != null) {
+        this.key = other.key;
+      }
+      if (other.getPrettyPrint() != null) {
+        this.prettyPrint = other.prettyPrint;
+      }
+      if (other.getQuotaUser() != null) {
+        this.quotaUser = other.quotaUser;
+      }
+      if (other.getUserIp() != null) {
+        this.userIp = other.userIp;
+      }
+      return this;
+    }
+
+    Builder(ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest source) {
+      this.access_token = source.access_token;
+      this.callback = source.callback;
+      this.fields = source.fields;
+      this.instanceGroupManager = source.instanceGroupManager;
+      this.instanceGroupManagersApplyUpdatesRequestResource =
+          source.instanceGroupManagersApplyUpdatesRequestResource;
+      this.key = source.key;
+      this.prettyPrint = source.prettyPrint;
+      this.quotaUser = source.quotaUser;
+      this.userIp = source.userIp;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public String getAccessToken() {
+      return access_token;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public Builder setAccessToken(String access_token) {
+      this.access_token = access_token;
+      return this;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public String getCallback() {
+      return callback;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public Builder setCallback(String callback) {
+      this.callback = callback;
+      return this;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public String getFields() {
+      return fields;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public Builder setFields(String fields) {
+      this.fields = fields;
+      return this;
+    }
+
+    /**
+     * The name of the managed instance group, should conform to RFC1035. It must have the format
+     * `{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances`.
+     * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+     * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+     * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+     * in length, and it * must not start with \`"goog"\`.
+     */
+    public String getInstanceGroupManager() {
+      return instanceGroupManager;
+    }
+
+    /**
+     * The name of the managed instance group, should conform to RFC1035. It must have the format
+     * `{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances`.
+     * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+     * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+     * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+     * in length, and it * must not start with \`"goog"\`.
+     */
+    public Builder setInstanceGroupManager(String instanceGroupManager) {
+      this.instanceGroupManager = instanceGroupManager;
+      return this;
+    }
+
+    /** InstanceGroupManagers.applyUpdatesToInstances */
+    public InstanceGroupManagersApplyUpdatesRequest
+        getInstanceGroupManagersApplyUpdatesRequestResource() {
+      return instanceGroupManagersApplyUpdatesRequestResource;
+    }
+
+    /** InstanceGroupManagers.applyUpdatesToInstances */
+    public Builder setInstanceGroupManagersApplyUpdatesRequestResource(
+        InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource) {
+      this.instanceGroupManagersApplyUpdatesRequestResource =
+          instanceGroupManagersApplyUpdatesRequestResource;
+      return this;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public String getKey() {
+      return key;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public Builder setKey(String key) {
+      this.key = key;
+      return this;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public String getPrettyPrint() {
+      return prettyPrint;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public Builder setPrettyPrint(String prettyPrint) {
+      this.prettyPrint = prettyPrint;
+      return this;
+    }
+
+    /** Alternative to userIp. */
+    public String getQuotaUser() {
+      return quotaUser;
+    }
+
+    /** Alternative to userIp. */
+    public Builder setQuotaUser(String quotaUser) {
+      this.quotaUser = quotaUser;
+      return this;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public String getUserIp() {
+      return userIp;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public Builder setUserIp(String userIp) {
+      this.userIp = userIp;
+      return this;
+    }
+
+    public ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest build() {
+      String missing = "";
+
+      if (instanceGroupManager == null) {
+        missing += " instanceGroupManager";
+      }
+
+      if (!missing.isEmpty()) {
+        throw new IllegalStateException("Missing required properties:" + missing);
+      }
+      return new ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest(
+          access_token,
+          callback,
+          fields,
+          instanceGroupManager,
+          instanceGroupManagersApplyUpdatesRequestResource,
+          key,
+          prettyPrint,
+          quotaUser,
+          userIp);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setAccessToken(this.access_token);
+      newBuilder.setCallback(this.callback);
+      newBuilder.setFields(this.fields);
+      newBuilder.setInstanceGroupManager(this.instanceGroupManager);
+      newBuilder.setInstanceGroupManagersApplyUpdatesRequestResource(
+          this.instanceGroupManagersApplyUpdatesRequestResource);
+      newBuilder.setKey(this.key);
+      newBuilder.setPrettyPrint(this.prettyPrint);
+      newBuilder.setQuotaUser(this.quotaUser);
+      newBuilder.setUserIp(this.userIp);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest{"
+        + "access_token="
+        + access_token
+        + ", "
+        + "callback="
+        + callback
+        + ", "
+        + "fields="
+        + fields
+        + ", "
+        + "instanceGroupManager="
+        + instanceGroupManager
+        + ", "
+        + "instanceGroupManagersApplyUpdatesRequestResource="
+        + instanceGroupManagersApplyUpdatesRequestResource
+        + ", "
+        + "key="
+        + key
+        + ", "
+        + "prettyPrint="
+        + prettyPrint
+        + ", "
+        + "quotaUser="
+        + quotaUser
+        + ", "
+        + "userIp="
+        + userIp
+        + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest) {
+      ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest that =
+          (ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest) o;
+      return Objects.equals(this.access_token, that.getAccessToken())
+          && Objects.equals(this.callback, that.getCallback())
+          && Objects.equals(this.fields, that.getFields())
+          && Objects.equals(this.instanceGroupManager, that.getInstanceGroupManager())
+          && Objects.equals(
+              this.instanceGroupManagersApplyUpdatesRequestResource,
+              that.getInstanceGroupManagersApplyUpdatesRequestResource())
+          && Objects.equals(this.key, that.getKey())
+          && Objects.equals(this.prettyPrint, that.getPrettyPrint())
+          && Objects.equals(this.quotaUser, that.getQuotaUser())
+          && Objects.equals(this.userIp, that.getUserIp());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(
+        access_token,
+        callback,
+        fields,
+        instanceGroupManager,
+        instanceGroupManagersApplyUpdatesRequestResource,
+        key,
+        prettyPrint,
+        quotaUser,
+        userIp);
+  }
+}
diff --git a/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest.java
new file mode 100644
index 000000000..128b3c250
--- /dev/null
+++ b/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest.java
@@ -0,0 +1,491 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.regionInstanceGroupManagers.applyUpdatesToInstances. Apply
+ * updates to selected instances the managed instance group.
+ */
+public final class ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest
+    implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final String instanceGroupManager;
+  private final String key;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final RegionInstanceGroupManagersApplyUpdatesRequest
+      regionInstanceGroupManagersApplyUpdatesRequestResource;
+  private final String userIp;
+
+  private ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.instanceGroupManager = null;
+    this.key = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.regionInstanceGroupManagersApplyUpdatesRequestResource = null;
+    this.userIp = null;
+  }
+
+  private ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      String instanceGroupManager,
+      String key,
+      String prettyPrint,
+      String quotaUser,
+      RegionInstanceGroupManagersApplyUpdatesRequest
+          regionInstanceGroupManagersApplyUpdatesRequestResource,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.instanceGroupManager = instanceGroupManager;
+    this.key = key;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.regionInstanceGroupManagersApplyUpdatesRequestResource =
+        regionInstanceGroupManagersApplyUpdatesRequestResource;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("instanceGroupManager".equals(fieldName)) {
+      return instanceGroupManager;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("regionInstanceGroupManagersApplyUpdatesRequestResource".equals(fieldName)) {
+      return regionInstanceGroupManagersApplyUpdatesRequestResource;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public RegionInstanceGroupManagersApplyUpdatesRequest getApiMessageRequestBody() {
+    return regionInstanceGroupManagersApplyUpdatesRequestResource;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  /**
+   * The name of the managed instance group, should conform to RFC1035. It must have the format
+   * `{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances`.
+   * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+   * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+   * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+   * in length, and it * must not start with \`"goog"\`.
+   */
+  public String getInstanceGroupManager() {
+    return instanceGroupManager;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /** InstanceGroupManagers.applyUpdatesToInstances */
+  public RegionInstanceGroupManagersApplyUpdatesRequest
+      getRegionInstanceGroupManagersApplyUpdatesRequestResource() {
+    return regionInstanceGroupManagersApplyUpdatesRequestResource;
+  }
+
+  /** IP address of the end user for whom the API call is being made. */
+  public String getUserIp() {
+    return userIp;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(
+      ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest
+      DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest();
+  }
+
+  public static class Builder {
+    private String access_token;
+    private String callback;
+    private String fields;
+    private String instanceGroupManager;
+    private String key;
+    private String prettyPrint;
+    private String quotaUser;
+    private RegionInstanceGroupManagersApplyUpdatesRequest
+        regionInstanceGroupManagersApplyUpdatesRequestResource;
+    private String userIp;
+
+    Builder() {}
+
+    public Builder mergeFrom(ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest other) {
+      if (other
+          == ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest.getDefaultInstance())
+        return this;
+      if (other.getAccessToken() != null) {
+        this.access_token = other.access_token;
+      }
+      if (other.getCallback() != null) {
+        this.callback = other.callback;
+      }
+      if (other.getFields() != null) {
+        this.fields = other.fields;
+      }
+      if (other.getInstanceGroupManager() != null) {
+        this.instanceGroupManager = other.instanceGroupManager;
+      }
+      if (other.getKey() != null) {
+        this.key = other.key;
+      }
+      if (other.getPrettyPrint() != null) {
+        this.prettyPrint = other.prettyPrint;
+      }
+      if (other.getQuotaUser() != null) {
+        this.quotaUser = other.quotaUser;
+      }
+      if (other.getRegionInstanceGroupManagersApplyUpdatesRequestResource() != null) {
+        this.regionInstanceGroupManagersApplyUpdatesRequestResource =
+            other.regionInstanceGroupManagersApplyUpdatesRequestResource;
+      }
+      if (other.getUserIp() != null) {
+        this.userIp = other.userIp;
+      }
+      return this;
+    }
+
+    Builder(ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest source) {
+      this.access_token = source.access_token;
+      this.callback = source.callback;
+      this.fields = source.fields;
+      this.instanceGroupManager = source.instanceGroupManager;
+      this.key = source.key;
+      this.prettyPrint = source.prettyPrint;
+      this.quotaUser = source.quotaUser;
+      this.regionInstanceGroupManagersApplyUpdatesRequestResource =
+          source.regionInstanceGroupManagersApplyUpdatesRequestResource;
+      this.userIp = source.userIp;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public String getAccessToken() {
+      return access_token;
+    }
+
+    /** OAuth 2.0 token for the current user. */
+    public Builder setAccessToken(String access_token) {
+      this.access_token = access_token;
+      return this;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public String getCallback() {
+      return callback;
+    }
+
+    /** Name of the JavaScript callback function that handles the response. */
+    public Builder setCallback(String callback) {
+      this.callback = callback;
+      return this;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public String getFields() {
+      return fields;
+    }
+
+    /** Selector specifying a subset of fields to include in the response. */
+    public Builder setFields(String fields) {
+      this.fields = fields;
+      return this;
+    }
+
+    /**
+     * The name of the managed instance group, should conform to RFC1035. It must have the format
+     * `{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances`.
+     * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+     * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+     * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+     * in length, and it * must not start with \`"goog"\`.
+     */
+    public String getInstanceGroupManager() {
+      return instanceGroupManager;
+    }
+
+    /**
+     * The name of the managed instance group, should conform to RFC1035. It must have the format
+     * `{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances`.
+     * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+     * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+     * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+     * in length, and it * must not start with \`"goog"\`.
+     */
+    public Builder setInstanceGroupManager(String instanceGroupManager) {
+      this.instanceGroupManager = instanceGroupManager;
+      return this;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public String getKey() {
+      return key;
+    }
+
+    /** API key. Required unless you provide an OAuth 2.0 token. */
+    public Builder setKey(String key) {
+      this.key = key;
+      return this;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public String getPrettyPrint() {
+      return prettyPrint;
+    }
+
+    /** Returns response with indentations and line breaks. */
+    public Builder setPrettyPrint(String prettyPrint) {
+      this.prettyPrint = prettyPrint;
+      return this;
+    }
+
+    /** Alternative to userIp. */
+    public String getQuotaUser() {
+      return quotaUser;
+    }
+
+    /** Alternative to userIp. */
+    public Builder setQuotaUser(String quotaUser) {
+      this.quotaUser = quotaUser;
+      return this;
+    }
+
+    /** InstanceGroupManagers.applyUpdatesToInstances */
+    public RegionInstanceGroupManagersApplyUpdatesRequest
+        getRegionInstanceGroupManagersApplyUpdatesRequestResource() {
+      return regionInstanceGroupManagersApplyUpdatesRequestResource;
+    }
+
+    /** InstanceGroupManagers.applyUpdatesToInstances */
+    public Builder setRegionInstanceGroupManagersApplyUpdatesRequestResource(
+        RegionInstanceGroupManagersApplyUpdatesRequest
+            regionInstanceGroupManagersApplyUpdatesRequestResource) {
+      this.regionInstanceGroupManagersApplyUpdatesRequestResource =
+          regionInstanceGroupManagersApplyUpdatesRequestResource;
+      return this;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public String getUserIp() {
+      return userIp;
+    }
+
+    /** IP address of the end user for whom the API call is being made. */
+    public Builder setUserIp(String userIp) {
+      this.userIp = userIp;
+      return this;
+    }
+
+    public ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest build() {
+      String missing = "";
+
+      if (instanceGroupManager == null) {
+        missing += " instanceGroupManager";
+      }
+
+      if (!missing.isEmpty()) {
+        throw new IllegalStateException("Missing required properties:" + missing);
+      }
+      return new ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest(
+          access_token,
+          callback,
+          fields,
+          instanceGroupManager,
+          key,
+          prettyPrint,
+          quotaUser,
+          regionInstanceGroupManagersApplyUpdatesRequestResource,
+          userIp);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setAccessToken(this.access_token);
+      newBuilder.setCallback(this.callback);
+      newBuilder.setFields(this.fields);
+      newBuilder.setInstanceGroupManager(this.instanceGroupManager);
+      newBuilder.setKey(this.key);
+      newBuilder.setPrettyPrint(this.prettyPrint);
+      newBuilder.setQuotaUser(this.quotaUser);
+      newBuilder.setRegionInstanceGroupManagersApplyUpdatesRequestResource(
+          this.regionInstanceGroupManagersApplyUpdatesRequestResource);
+      newBuilder.setUserIp(this.userIp);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest{"
+        + "access_token="
+        + access_token
+        + ", "
+        + "callback="
+        + callback
+        + ", "
+        + "fields="
+        + fields
+        + ", "
+        + "instanceGroupManager="
+        + instanceGroupManager
+        + ", "
+        + "key="
+        + key
+        + ", "
+        + "prettyPrint="
+        + prettyPrint
+        + ", "
+        + "quotaUser="
+        + quotaUser
+        + ", "
+        + "regionInstanceGroupManagersApplyUpdatesRequestResource="
+        + regionInstanceGroupManagersApplyUpdatesRequestResource
+        + ", "
+        + "userIp="
+        + userIp
+        + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest) {
+      ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest that =
+          (ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest) o;
+      return Objects.equals(this.access_token, that.getAccessToken())
+          && Objects.equals(this.callback, that.getCallback())
+          && Objects.equals(this.fields, that.getFields())
+          && Objects.equals(this.instanceGroupManager, that.getInstanceGroupManager())
+          && Objects.equals(this.key, that.getKey())
+          && Objects.equals(this.prettyPrint, that.getPrettyPrint())
+          && Objects.equals(this.quotaUser, that.getQuotaUser())
+          && Objects.equals(
+              this.regionInstanceGroupManagersApplyUpdatesRequestResource,
+              that.getRegionInstanceGroupManagersApplyUpdatesRequestResource())
+          && Objects.equals(this.userIp, that.getUserIp());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(
+        access_token,
+        callback,
+        fields,
+        instanceGroupManager,
+        key,
+        prettyPrint,
+        quotaUser,
+        regionInstanceGroupManagersApplyUpdatesRequestResource,
+        userIp);
+  }
+}
diff --git a/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.java
new file mode 100644
index 000000000..e7515c357
--- /dev/null
+++ b/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.java
@@ -0,0 +1,560 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.compute.v1;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.ApiMessage;
+import java.util.List;
+import java.util.Objects;
+import javax.annotation.Generated;
+import javax.annotation.Nullable;
+
+@Generated("by GAPIC")
+@BetaApi
+/**
+ * Request object for method compute.globalNetworkEndpointGroups.attachNetworkEndpoints. Attach a
+ * network endpoint to the specified network endpoint group.
+ */
+public final class AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest
+    implements ApiMessage {
+  private final String access_token;
+  private final String callback;
+  private final String fields;
+  private final GlobalNetworkEndpointGroupsAttachEndpointsRequest
+      globalNetworkEndpointGroupsAttachEndpointsRequestResource;
+  private final String key;
+  private final String networkEndpointGroup;
+  private final String prettyPrint;
+  private final String quotaUser;
+  private final String requestId;
+  private final String userIp;
+
+  private AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest() {
+    this.access_token = null;
+    this.callback = null;
+    this.fields = null;
+    this.globalNetworkEndpointGroupsAttachEndpointsRequestResource = null;
+    this.key = null;
+    this.networkEndpointGroup = null;
+    this.prettyPrint = null;
+    this.quotaUser = null;
+    this.requestId = null;
+    this.userIp = null;
+  }
+
+  private AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest(
+      String access_token,
+      String callback,
+      String fields,
+      GlobalNetworkEndpointGroupsAttachEndpointsRequest
+          globalNetworkEndpointGroupsAttachEndpointsRequestResource,
+      String key,
+      String networkEndpointGroup,
+      String prettyPrint,
+      String quotaUser,
+      String requestId,
+      String userIp) {
+    this.access_token = access_token;
+    this.callback = callback;
+    this.fields = fields;
+    this.globalNetworkEndpointGroupsAttachEndpointsRequestResource =
+        globalNetworkEndpointGroupsAttachEndpointsRequestResource;
+    this.key = key;
+    this.networkEndpointGroup = networkEndpointGroup;
+    this.prettyPrint = prettyPrint;
+    this.quotaUser = quotaUser;
+    this.requestId = requestId;
+    this.userIp = userIp;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("access_token".equals(fieldName)) {
+      return access_token;
+    }
+    if ("callback".equals(fieldName)) {
+      return callback;
+    }
+    if ("fields".equals(fieldName)) {
+      return fields;
+    }
+    if ("globalNetworkEndpointGroupsAttachEndpointsRequestResource".equals(fieldName)) {
+      return globalNetworkEndpointGroupsAttachEndpointsRequestResource;
+    }
+    if ("key".equals(fieldName)) {
+      return key;
+    }
+    if ("networkEndpointGroup".equals(fieldName)) {
+      return networkEndpointGroup;
+    }
+    if ("prettyPrint".equals(fieldName)) {
+      return prettyPrint;
+    }
+    if ("quotaUser".equals(fieldName)) {
+      return quotaUser;
+    }
+    if ("requestId".equals(fieldName)) {
+      return requestId;
+    }
+    if ("userIp".equals(fieldName)) {
+      return userIp;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public GlobalNetworkEndpointGroupsAttachEndpointsRequest getApiMessageRequestBody() {
+    return globalNetworkEndpointGroupsAttachEndpointsRequestResource;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** OAuth 2.0 token for the current user. */
+  public String getAccessToken() {
+    return access_token;
+  }
+
+  /** Name of the JavaScript callback function that handles the response. */
+  public String getCallback() {
+    return callback;
+  }
+
+  /** Selector specifying a subset of fields to include in the response. */
+  public String getFields() {
+    return fields;
+  }
+
+  public GlobalNetworkEndpointGroupsAttachEndpointsRequest
+      getGlobalNetworkEndpointGroupsAttachEndpointsRequestResource() {
+    return globalNetworkEndpointGroupsAttachEndpointsRequestResource;
+  }
+
+  /** API key. Required unless you provide an OAuth 2.0 token. */
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * The name of the network endpoint group where you are attaching network endpoints to. It should
+   * comply with RFC1035. It must have the format
+   * `{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints`.
+   * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`),
+   * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes
+   * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters
+   * in length, and it * must not start with \`"goog"\`.
+   */
+  public String getNetworkEndpointGroup() {
+    return networkEndpointGroup;
+  }
+
+  /** Returns response with indentations and line breaks. */
+  public String getPrettyPrint() {
+    return prettyPrint;
+  }
+
+  /** Alternative to userIp. */
+  public String getQuotaUser() {
+    return quotaUser;
+  }
+
+  /**
+   * An optional request ID to identify requests. Specify a unique request ID so that if you must
+   * retry your request, the server will know to ignore the request if it has already been
+   * completed.
+   *
+   * 

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private GlobalNetworkEndpointGroupsAttachEndpointsRequest + globalNetworkEndpointGroupsAttachEndpointsRequestResource; + private String key; + private String networkEndpointGroup; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest other) { + if (other == AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.getDefaultInstance()) + return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getGlobalNetworkEndpointGroupsAttachEndpointsRequestResource() != null) { + this.globalNetworkEndpointGroupsAttachEndpointsRequestResource = + other.globalNetworkEndpointGroupsAttachEndpointsRequestResource; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroup() != null) { + this.networkEndpointGroup = other.networkEndpointGroup; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.globalNetworkEndpointGroupsAttachEndpointsRequestResource = + source.globalNetworkEndpointGroupsAttachEndpointsRequestResource; + this.key = source.key; + this.networkEndpointGroup = source.networkEndpointGroup; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + public GlobalNetworkEndpointGroupsAttachEndpointsRequest + getGlobalNetworkEndpointGroupsAttachEndpointsRequestResource() { + return globalNetworkEndpointGroupsAttachEndpointsRequestResource; + } + + public Builder setGlobalNetworkEndpointGroupsAttachEndpointsRequestResource( + GlobalNetworkEndpointGroupsAttachEndpointsRequest + globalNetworkEndpointGroupsAttachEndpointsRequestResource) { + this.globalNetworkEndpointGroupsAttachEndpointsRequestResource = + globalNetworkEndpointGroupsAttachEndpointsRequestResource; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The name of the network endpoint group where you are attaching network endpoints to. It + * should comply with RFC1035. It must have the format + * `{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** + * The name of the network endpoint group where you are attaching network endpoints to. It + * should comply with RFC1035. It must have the format + * `{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (networkEndpointGroup == null) { + missing += " networkEndpointGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + globalNetworkEndpointGroupsAttachEndpointsRequestResource, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setGlobalNetworkEndpointGroupsAttachEndpointsRequestResource( + this.globalNetworkEndpointGroupsAttachEndpointsRequestResource); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "globalNetworkEndpointGroupsAttachEndpointsRequestResource=" + + globalNetworkEndpointGroupsAttachEndpointsRequestResource + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroup=" + + networkEndpointGroup + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest) { + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest that = + (AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals( + this.globalNetworkEndpointGroupsAttachEndpointsRequestResource, + that.getGlobalNetworkEndpointGroupsAttachEndpointsRequestResource()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + globalNetworkEndpointGroupsAttachEndpointsRequestResource, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java b/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java index 1a4267bc1..5d7f2e0bb 100644 --- a/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java +++ b/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java @@ -43,6 +43,7 @@ public final class AttachedDisk implements ApiMessage { private final String kind; private final List licenses; private final String mode; + private final InitialStateConfig shieldedInstanceInitialState; private final String source; private final String type; @@ -59,6 +60,7 @@ private AttachedDisk() { this.kind = null; this.licenses = null; this.mode = null; + this.shieldedInstanceInitialState = null; this.source = null; this.type = null; } @@ -76,6 +78,7 @@ private AttachedDisk( String kind, List licenses, String mode, + InitialStateConfig shieldedInstanceInitialState, String source, String type) { this.autoDelete = autoDelete; @@ -90,6 +93,7 @@ private AttachedDisk( this.kind = kind; this.licenses = licenses; this.mode = mode; + this.shieldedInstanceInitialState = shieldedInstanceInitialState; this.source = source; this.type = type; } @@ -132,6 +136,9 @@ public Object getFieldValue(String fieldName) { if ("mode".equals(fieldName)) { return mode; } + if ("shieldedInstanceInitialState".equals(fieldName)) { + return shieldedInstanceInitialState; + } if ("source".equals(fieldName)) { return source; } @@ -273,6 +280,11 @@ public String getMode() { return mode; } + /** [Output Only] shielded vm initial state stored on disk */ + public InitialStateConfig getShieldedInstanceInitialState() { + return shieldedInstanceInitialState; + } + /** * Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a * new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or @@ -330,6 +342,7 @@ public static class Builder { private String kind; private List licenses; private String mode; + private InitialStateConfig shieldedInstanceInitialState; private String source; private String type; @@ -373,6 +386,9 @@ public Builder mergeFrom(AttachedDisk other) { if (other.getMode() != null) { this.mode = other.mode; } + if (other.getShieldedInstanceInitialState() != null) { + this.shieldedInstanceInitialState = other.shieldedInstanceInitialState; + } if (other.getSource() != null) { this.source = other.source; } @@ -395,6 +411,7 @@ public Builder mergeFrom(AttachedDisk other) { this.kind = source.kind; this.licenses = source.licenses; this.mode = source.mode; + this.shieldedInstanceInitialState = source.shieldedInstanceInitialState; this.source = source.source; this.type = source.type; } @@ -666,6 +683,18 @@ public Builder setMode(String mode) { return this; } + /** [Output Only] shielded vm initial state stored on disk */ + public InitialStateConfig getShieldedInstanceInitialState() { + return shieldedInstanceInitialState; + } + + /** [Output Only] shielded vm initial state stored on disk */ + public Builder setShieldedInstanceInitialState( + InitialStateConfig shieldedInstanceInitialState) { + this.shieldedInstanceInitialState = shieldedInstanceInitialState; + return this; + } + /** * Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating * a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or @@ -727,6 +756,7 @@ public AttachedDisk build() { kind, licenses, mode, + shieldedInstanceInitialState, source, type); } @@ -745,6 +775,7 @@ public Builder clone() { newBuilder.setKind(this.kind); newBuilder.addAllLicenses(this.licenses); newBuilder.setMode(this.mode); + newBuilder.setShieldedInstanceInitialState(this.shieldedInstanceInitialState); newBuilder.setSource(this.source); newBuilder.setType(this.type); return newBuilder; @@ -790,6 +821,9 @@ public String toString() { + "mode=" + mode + ", " + + "shieldedInstanceInitialState=" + + shieldedInstanceInitialState + + ", " + "source=" + source + ", " @@ -817,6 +851,8 @@ public boolean equals(Object o) { && Objects.equals(this.kind, that.getKind()) && Objects.equals(this.licenses, that.getLicensesList()) && Objects.equals(this.mode, that.getMode()) + && Objects.equals( + this.shieldedInstanceInitialState, that.getShieldedInstanceInitialState()) && Objects.equals(this.source, that.getSource()) && Objects.equals(this.type, that.getType()); } @@ -838,6 +874,7 @@ public int hashCode() { kind, licenses, mode, + shieldedInstanceInitialState, source, type); } diff --git a/src/main/java/com/google/cloud/compute/v1/AttachedDiskInitializeParams.java b/src/main/java/com/google/cloud/compute/v1/AttachedDiskInitializeParams.java index 13ac38e5a..f11a29a1e 100644 --- a/src/main/java/com/google/cloud/compute/v1/AttachedDiskInitializeParams.java +++ b/src/main/java/com/google/cloud/compute/v1/AttachedDiskInitializeParams.java @@ -40,6 +40,7 @@ public final class AttachedDiskInitializeParams implements ApiMessage { private final String diskSizeGb; private final String diskType; private final Map labels; + private final String onUpdateAction; private final List resourcePolicies; private final String sourceImage; private final CustomerEncryptionKey sourceImageEncryptionKey; @@ -52,6 +53,7 @@ private AttachedDiskInitializeParams() { this.diskSizeGb = null; this.diskType = null; this.labels = null; + this.onUpdateAction = null; this.resourcePolicies = null; this.sourceImage = null; this.sourceImageEncryptionKey = null; @@ -65,6 +67,7 @@ private AttachedDiskInitializeParams( String diskSizeGb, String diskType, Map labels, + String onUpdateAction, List resourcePolicies, String sourceImage, CustomerEncryptionKey sourceImageEncryptionKey, @@ -75,6 +78,7 @@ private AttachedDiskInitializeParams( this.diskSizeGb = diskSizeGb; this.diskType = diskType; this.labels = labels; + this.onUpdateAction = onUpdateAction; this.resourcePolicies = resourcePolicies; this.sourceImage = sourceImage; this.sourceImageEncryptionKey = sourceImageEncryptionKey; @@ -99,6 +103,9 @@ public Object getFieldValue(String fieldName) { if ("labels".equals(fieldName)) { return labels; } + if ("onUpdateAction".equals(fieldName)) { + return onUpdateAction; + } if ("resourcePolicies".equals(fieldName)) { return resourcePolicies; } @@ -181,6 +188,14 @@ public Map getLabelsMap() { return labels; } + /** + * Specifies which action to take on instance update with this disk. Default is to use the + * existing disk. + */ + public String getOnUpdateAction() { + return onUpdateAction; + } + /** * Resource policies applied to this disk for automatic snapshot creations. Specified using the * full or partial URL. For instance template, specify only the resource policy name. @@ -273,6 +288,7 @@ public static class Builder { private String diskSizeGb; private String diskType; private Map labels; + private String onUpdateAction; private List resourcePolicies; private String sourceImage; private CustomerEncryptionKey sourceImageEncryptionKey; @@ -298,6 +314,9 @@ public Builder mergeFrom(AttachedDiskInitializeParams other) { if (other.getLabelsMap() != null) { this.labels = other.labels; } + if (other.getOnUpdateAction() != null) { + this.onUpdateAction = other.onUpdateAction; + } if (other.getResourcePoliciesList() != null) { this.resourcePolicies = other.resourcePolicies; } @@ -322,6 +341,7 @@ public Builder mergeFrom(AttachedDiskInitializeParams other) { this.diskSizeGb = source.diskSizeGb; this.diskType = source.diskType; this.labels = source.labels; + this.onUpdateAction = source.onUpdateAction; this.resourcePolicies = source.resourcePolicies; this.sourceImage = source.sourceImage; this.sourceImageEncryptionKey = source.sourceImageEncryptionKey; @@ -426,6 +446,23 @@ public Builder putAllLabels(Map labels) { return this; } + /** + * Specifies which action to take on instance update with this disk. Default is to use the + * existing disk. + */ + public String getOnUpdateAction() { + return onUpdateAction; + } + + /** + * Specifies which action to take on instance update with this disk. Default is to use the + * existing disk. + */ + public Builder setOnUpdateAction(String onUpdateAction) { + this.onUpdateAction = onUpdateAction; + return this; + } + /** * Resource policies applied to this disk for automatic snapshot creations. Specified using the * full or partial URL. For instance template, specify only the resource policy name. @@ -583,6 +620,7 @@ public AttachedDiskInitializeParams build() { diskSizeGb, diskType, labels, + onUpdateAction, resourcePolicies, sourceImage, sourceImageEncryptionKey, @@ -597,6 +635,7 @@ public Builder clone() { newBuilder.setDiskSizeGb(this.diskSizeGb); newBuilder.setDiskType(this.diskType); newBuilder.putAllLabels(this.labels); + newBuilder.setOnUpdateAction(this.onUpdateAction); newBuilder.addAllResourcePolicies(this.resourcePolicies); newBuilder.setSourceImage(this.sourceImage); newBuilder.setSourceImageEncryptionKey(this.sourceImageEncryptionKey); @@ -624,6 +663,9 @@ public String toString() { + "labels=" + labels + ", " + + "onUpdateAction=" + + onUpdateAction + + ", " + "resourcePolicies=" + resourcePolicies + ", " @@ -653,6 +695,7 @@ public boolean equals(Object o) { && Objects.equals(this.diskSizeGb, that.getDiskSizeGb()) && Objects.equals(this.diskType, that.getDiskType()) && Objects.equals(this.labels, that.getLabelsMap()) + && Objects.equals(this.onUpdateAction, that.getOnUpdateAction()) && Objects.equals(this.resourcePolicies, that.getResourcePoliciesList()) && Objects.equals(this.sourceImage, that.getSourceImage()) && Objects.equals(this.sourceImageEncryptionKey, that.getSourceImageEncryptionKey()) @@ -671,6 +714,7 @@ public int hashCode() { diskSizeGb, diskType, labels, + onUpdateAction, resourcePolicies, sourceImage, sourceImageEncryptionKey, diff --git a/src/main/java/com/google/cloud/compute/v1/Autoscaler.java b/src/main/java/com/google/cloud/compute/v1/Autoscaler.java index 748f2ebbc..ad819b96d 100644 --- a/src/main/java/com/google/cloud/compute/v1/Autoscaler.java +++ b/src/main/java/com/google/cloud/compute/v1/Autoscaler.java @@ -30,8 +30,8 @@ * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups of diff --git a/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java b/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java index d99c2318f..743ebb186 100644 --- a/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java +++ b/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java @@ -159,21 +159,29 @@ public AutoscalerStub getStub() { * *


    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (AutoscalersScopedList element : autoscalerClient.aggregatedListAutoscalers(project).iterateAll()) {
+   *   for (AutoscalersScopedList element : autoscalerClient.aggregatedListAutoscalers(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListAutoscalersHttpRequest request = AggregatedListAutoscalersHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListAutoscalers(request); @@ -187,20 +195,31 @@ public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers( * *

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (AutoscalersScopedList element : autoscalerClient.aggregatedListAutoscalers(project.toString()).iterateAll()) {
+   *   for (AutoscalersScopedList element : autoscalerClient.aggregatedListAutoscalers(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers(String project) { + public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers( + Boolean includeAllScopes, String project) { AggregatedListAutoscalersHttpRequest request = - AggregatedListAutoscalersHttpRequest.newBuilder().setProject(project).build(); + AggregatedListAutoscalersHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListAutoscalers(request); } @@ -212,8 +231,10 @@ public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers(St * *

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAutoscalersHttpRequest request = AggregatedListAutoscalersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (AutoscalersScopedList element : autoscalerClient.aggregatedListAutoscalers(request).iterateAll()) {
@@ -239,8 +260,10 @@ public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers(
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAutoscalersHttpRequest request = AggregatedListAutoscalersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListAutoscalersPagedResponse> future = autoscalerClient.aggregatedListAutoscalersPagedCallable().futureCall(request);
@@ -266,8 +289,10 @@ public final AggregatedListAutoscalersPagedResponse aggregatedListAutoscalers(
    *
    * 

    * try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListAutoscalersHttpRequest request = AggregatedListAutoscalersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -502,8 +527,8 @@ public final UnaryCallable getAutoscalerCa
    * @param zone Name of the zone for this request.
    * @param autoscalerResource Represents an Autoscaler resource.
    *     

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -540,8 +565,8 @@ public final Operation insertAutoscaler(ProjectZoneName zone, Autoscaler autosca * @param zone Name of the zone for this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -769,8 +794,8 @@ public final UnaryCallable listAutos * @param zone Name of the zone for this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -821,8 +846,8 @@ public final Operation patchAutoscaler( * @param zone Name of the zone for this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -930,8 +955,8 @@ public final UnaryCallable patchAutoscale * @param zone Name of the zone for this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -981,8 +1006,8 @@ public final Operation updateAutoscaler( * @param zone Name of the zone for this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. diff --git a/src/main/java/com/google/cloud/compute/v1/Backend.java b/src/main/java/com/google/cloud/compute/v1/Backend.java index f5370dec7..5b004fba6 100644 --- a/src/main/java/com/google/cloud/compute/v1/Backend.java +++ b/src/main/java/com/google/cloud/compute/v1/Backend.java @@ -29,6 +29,7 @@ public final class Backend implements ApiMessage { private final String balancingMode; private final Float capacityScaler; private final String description; + private final Boolean failover; private final String group; private final Integer maxConnections; private final Integer maxConnectionsPerEndpoint; @@ -42,6 +43,7 @@ private Backend() { this.balancingMode = null; this.capacityScaler = null; this.description = null; + this.failover = null; this.group = null; this.maxConnections = null; this.maxConnectionsPerEndpoint = null; @@ -56,6 +58,7 @@ private Backend( String balancingMode, Float capacityScaler, String description, + Boolean failover, String group, Integer maxConnections, Integer maxConnectionsPerEndpoint, @@ -67,6 +70,7 @@ private Backend( this.balancingMode = balancingMode; this.capacityScaler = capacityScaler; this.description = description; + this.failover = failover; this.group = group; this.maxConnections = maxConnections; this.maxConnectionsPerEndpoint = maxConnectionsPerEndpoint; @@ -88,6 +92,9 @@ public Object getFieldValue(String fieldName) { if ("description".equals(fieldName)) { return description; } + if ("failover".equals(fieldName)) { + return failover; + } if ("group".equals(fieldName)) { return group; } @@ -144,20 +151,21 @@ public List getFieldMask() { * protocol for the backend service is SSL, TCP, or UDP. * *

If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load - * balancers), you must also specify exactly one of the following parameters: maxConnections, - * maxConnectionsPerInstance, or maxConnectionsPerEndpoint. + * balancers), you must also specify exactly one of the following parameters: maxConnections + * (except for regional managed instance groups), maxConnectionsPerInstance, or + * maxConnectionsPerEndpoint. * *

If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load * balancers), you cannot specify any additional parameters. * *

- If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests * per second (RPS). You can use the RATE balancing mode if the protocol for the backend service - * is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate, - * maxRatePerInstance, or maxRatePerEndpoint. + * is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate (except for + * regional managed instance groups), maxRatePerInstance, or maxRatePerEndpoint. * - *

- If the load balancing mode is UTILIZATION, the load is spread based on the CPU utilization - * of instances in an instance group. You can use the UTILIZATION balancing mode if the - * loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or + *

- If the load balancing mode is UTILIZATION, the load is spread based on the backend + * utilization of instances in an instance group. You can use the UTILIZATION balancing mode if + * the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or * INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend * service protocol. */ @@ -184,6 +192,14 @@ public String getDescription() { return description; } + /** + * This field designates whether this is a failover backend. More than one failover backend can be + * configured for a given BackendService. + */ + public Boolean getFailover() { + return failover; + } + /** * The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type * of backend that a backend service supports depends on the backend service's @@ -205,8 +221,9 @@ public String getGroup() { } /** - * Defines a maximum target for simultaneous connections for the entire backend (instance group or - * NEG). If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the + * Defines a target maximum number of simultaneous connections that the backend can handle. Valid + * for network endpoint group and instance group backends (except for regional managed instance + * groups). If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the * backend's balancingMode is CONNECTION, and backend is attached to a backend service whose * loadBalancingScheme is EXTERNAL, you must specify either this parameter, * maxConnectionsPerInstance, or maxConnectionsPerEndpoint. @@ -220,7 +237,7 @@ public Integer getMaxConnections() { } /** - * Defines a maximum target for simultaneous connections for an endpoint of a NEG. This is + * Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is * multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of * target maximum simultaneous connections for the NEG. If the backend's balancingMode is * CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is @@ -235,11 +252,11 @@ public Integer getMaxConnectionsPerEndpoint() { } /** - * Defines a maximum target for simultaneous connections for a single VM in a backend instance - * group. This is multiplied by the number of instances in the instance group to implicitly - * calculate a target maximum number of simultaneous connections for the whole instance group. If - * the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's - * balancingMode is CONNECTION, and backend is attached to a backend service whose + * Defines a target maximum number of simultaneous connections for a single VM in a backend + * instance group. This is multiplied by the number of instances in the instance group to + * implicitly calculate a target maximum number of simultaneous connections for the whole instance + * group. If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the + * backend's balancingMode is CONNECTION, and backend is attached to a backend service whose * loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or * maxConnectionsPerEndpoint. * @@ -252,11 +269,16 @@ public Integer getMaxConnectionsPerInstance() { } /** - * The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION - * balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance - * must be set. + * Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid + * for network endpoint group and instance group backends (except for regional managed instance + * groups). Must not be defined if the backend is a managed instance group that uses autoscaling + * based on load balancing. * - *

This cannot be used for internal load balancing. + *

If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the + * backend's balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or + * maxRatePerEndpoint. + * + *

Not available if the backend's balancingMode is CONNECTION. */ public Integer getMaxRate() { return maxRate; @@ -267,8 +289,8 @@ public Integer getMaxRate() { * multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate * for the NEG. * - *

If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, or - * maxRatePerInstance. + *

If the backend's balancingMode is RATE, you must specify either this parameter, maxRate + * (except for regional managed instance groups), or maxRatePerInstance. * *

Not available if the backend's balancingMode is CONNECTION. */ @@ -282,8 +304,8 @@ public Float getMaxRatePerEndpoint() { * calculate a target maximum rate for the whole instance group. * *

If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the - * backend's balancingMode is RATE, you must specify either this parameter, maxRate, or - * maxRatePerEndpoint. + * backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for + * regional managed instance groups), or maxRatePerEndpoint. * *

Not available if the backend's balancingMode is CONNECTION. */ @@ -292,12 +314,12 @@ public Float getMaxRatePerInstance() { } /** - * Defines the maximum average CPU utilization of a backend VM in an instance group. The valid + * Defines the maximum average backend utilization of a backend VM in an instance group. The valid * range is [0.0, 1.0]. This is an optional parameter if the backend's balancingMode is * UTILIZATION. * - *

This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections, - * or maxConnectionsPerInstance. + *

This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections + * (except for regional managed instance groups), or maxConnectionsPerInstance. */ public Float getMaxUtilization() { return maxUtilization; @@ -329,6 +351,7 @@ public static class Builder { private String balancingMode; private Float capacityScaler; private String description; + private Boolean failover; private String group; private Integer maxConnections; private Integer maxConnectionsPerEndpoint; @@ -351,6 +374,9 @@ public Builder mergeFrom(Backend other) { if (other.getDescription() != null) { this.description = other.description; } + if (other.getFailover() != null) { + this.failover = other.failover; + } if (other.getGroup() != null) { this.group = other.group; } @@ -382,6 +408,7 @@ public Builder mergeFrom(Backend other) { this.balancingMode = source.balancingMode; this.capacityScaler = source.capacityScaler; this.description = source.description; + this.failover = source.failover; this.group = source.group; this.maxConnections = source.maxConnections; this.maxConnectionsPerEndpoint = source.maxConnectionsPerEndpoint; @@ -404,7 +431,8 @@ public Builder mergeFrom(Backend other) { * *

If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy * load balancers), you must also specify exactly one of the following parameters: - * maxConnections, maxConnectionsPerInstance, or maxConnectionsPerEndpoint. + * maxConnections (except for regional managed instance groups), maxConnectionsPerInstance, or + * maxConnectionsPerEndpoint. * *

If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load * balancers), you cannot specify any additional parameters. @@ -412,9 +440,10 @@ public Builder mergeFrom(Backend other) { *

- If the load balancing mode is RATE, the load is spread based on the rate of HTTP * requests per second (RPS). You can use the RATE balancing mode if the protocol for the * backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: - * maxRate, maxRatePerInstance, or maxRatePerEndpoint. + * maxRate (except for regional managed instance groups), maxRatePerInstance, or + * maxRatePerEndpoint. * - *

- If the load balancing mode is UTILIZATION, the load is spread based on the CPU + *

- If the load balancing mode is UTILIZATION, the load is spread based on the backend * utilization of instances in an instance group. You can use the UTILIZATION balancing mode if * the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or * INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the @@ -436,7 +465,8 @@ public String getBalancingMode() { * *

If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy * load balancers), you must also specify exactly one of the following parameters: - * maxConnections, maxConnectionsPerInstance, or maxConnectionsPerEndpoint. + * maxConnections (except for regional managed instance groups), maxConnectionsPerInstance, or + * maxConnectionsPerEndpoint. * *

If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load * balancers), you cannot specify any additional parameters. @@ -444,9 +474,10 @@ public String getBalancingMode() { *

- If the load balancing mode is RATE, the load is spread based on the rate of HTTP * requests per second (RPS). You can use the RATE balancing mode if the protocol for the * backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: - * maxRate, maxRatePerInstance, or maxRatePerEndpoint. + * maxRate (except for regional managed instance groups), maxRatePerInstance, or + * maxRatePerEndpoint. * - *

- If the load balancing mode is UTILIZATION, the load is spread based on the CPU + *

- If the load balancing mode is UTILIZATION, the load is spread based on the backend * utilization of instances in an instance group. You can use the UTILIZATION balancing mode if * the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or * INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the @@ -497,6 +528,23 @@ public Builder setDescription(String description) { return this; } + /** + * This field designates whether this is a failover backend. More than one failover backend can + * be configured for a given BackendService. + */ + public Boolean getFailover() { + return failover; + } + + /** + * This field designates whether this is a failover backend. More than one failover backend can + * be configured for a given BackendService. + */ + public Builder setFailover(Boolean failover) { + this.failover = failover; + return this; + } + /** * The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The * type of backend that a backend service supports depends on the backend service's @@ -539,10 +587,11 @@ public Builder setGroup(String group) { } /** - * Defines a maximum target for simultaneous connections for the entire backend (instance group - * or NEG). If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the - * backend's balancingMode is CONNECTION, and backend is attached to a backend service whose - * loadBalancingScheme is EXTERNAL, you must specify either this parameter, + * Defines a target maximum number of simultaneous connections that the backend can handle. + * Valid for network endpoint group and instance group backends (except for regional managed + * instance groups). If the backend's balancingMode is UTILIZATION, this is an optional + * parameter. If the backend's balancingMode is CONNECTION, and backend is attached to a backend + * service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, * maxConnectionsPerInstance, or maxConnectionsPerEndpoint. * *

Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is @@ -554,10 +603,11 @@ public Integer getMaxConnections() { } /** - * Defines a maximum target for simultaneous connections for the entire backend (instance group - * or NEG). If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the - * backend's balancingMode is CONNECTION, and backend is attached to a backend service whose - * loadBalancingScheme is EXTERNAL, you must specify either this parameter, + * Defines a target maximum number of simultaneous connections that the backend can handle. + * Valid for network endpoint group and instance group backends (except for regional managed + * instance groups). If the backend's balancingMode is UTILIZATION, this is an optional + * parameter. If the backend's balancingMode is CONNECTION, and backend is attached to a backend + * service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, * maxConnectionsPerInstance, or maxConnectionsPerEndpoint. * *

Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is @@ -570,7 +620,7 @@ public Builder setMaxConnections(Integer maxConnections) { } /** - * Defines a maximum target for simultaneous connections for an endpoint of a NEG. This is + * Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is * multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of * target maximum simultaneous connections for the NEG. If the backend's balancingMode is * CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is @@ -586,7 +636,7 @@ public Integer getMaxConnectionsPerEndpoint() { } /** - * Defines a maximum target for simultaneous connections for an endpoint of a NEG. This is + * Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is * multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of * target maximum simultaneous connections for the NEG. If the backend's balancingMode is * CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is @@ -603,13 +653,13 @@ public Builder setMaxConnectionsPerEndpoint(Integer maxConnectionsPerEndpoint) { } /** - * Defines a maximum target for simultaneous connections for a single VM in a backend instance - * group. This is multiplied by the number of instances in the instance group to implicitly - * calculate a target maximum number of simultaneous connections for the whole instance group. - * If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the - * backend's balancingMode is CONNECTION, and backend is attached to a backend service whose - * loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or - * maxConnectionsPerEndpoint. + * Defines a target maximum number of simultaneous connections for a single VM in a backend + * instance group. This is multiplied by the number of instances in the instance group to + * implicitly calculate a target maximum number of simultaneous connections for the whole + * instance group. If the backend's balancingMode is UTILIZATION, this is an optional parameter. + * If the backend's balancingMode is CONNECTION, and backend is attached to a backend service + * whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, + * maxConnections, or maxConnectionsPerEndpoint. * *

Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does * not support setting maxConnectionsPerInstance even though its backends require a balancing @@ -620,13 +670,13 @@ public Integer getMaxConnectionsPerInstance() { } /** - * Defines a maximum target for simultaneous connections for a single VM in a backend instance - * group. This is multiplied by the number of instances in the instance group to implicitly - * calculate a target maximum number of simultaneous connections for the whole instance group. - * If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the - * backend's balancingMode is CONNECTION, and backend is attached to a backend service whose - * loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or - * maxConnectionsPerEndpoint. + * Defines a target maximum number of simultaneous connections for a single VM in a backend + * instance group. This is multiplied by the number of instances in the instance group to + * implicitly calculate a target maximum number of simultaneous connections for the whole + * instance group. If the backend's balancingMode is UTILIZATION, this is an optional parameter. + * If the backend's balancingMode is CONNECTION, and backend is attached to a backend service + * whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, + * maxConnections, or maxConnectionsPerEndpoint. * *

Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does * not support setting maxConnectionsPerInstance even though its backends require a balancing @@ -638,22 +688,32 @@ public Builder setMaxConnectionsPerInstance(Integer maxConnectionsPerInstance) { } /** - * The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION - * balancing modes, but required if RATE mode. For RATE mode, either maxRate or - * maxRatePerInstance must be set. + * Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid + * for network endpoint group and instance group backends (except for regional managed instance + * groups). Must not be defined if the backend is a managed instance group that uses autoscaling + * based on load balancing. * - *

This cannot be used for internal load balancing. + *

If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the + * backend's balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or + * maxRatePerEndpoint. + * + *

Not available if the backend's balancingMode is CONNECTION. */ public Integer getMaxRate() { return maxRate; } /** - * The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION - * balancing modes, but required if RATE mode. For RATE mode, either maxRate or - * maxRatePerInstance must be set. + * Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid + * for network endpoint group and instance group backends (except for regional managed instance + * groups). Must not be defined if the backend is a managed instance group that uses autoscaling + * based on load balancing. * - *

This cannot be used for internal load balancing. + *

If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the + * backend's balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or + * maxRatePerEndpoint. + * + *

Not available if the backend's balancingMode is CONNECTION. */ public Builder setMaxRate(Integer maxRate) { this.maxRate = maxRate; @@ -665,8 +725,8 @@ public Builder setMaxRate(Integer maxRate) { * multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum * rate for the NEG. * - *

If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, - * or maxRatePerInstance. + *

If the backend's balancingMode is RATE, you must specify either this parameter, maxRate + * (except for regional managed instance groups), or maxRatePerInstance. * *

Not available if the backend's balancingMode is CONNECTION. */ @@ -679,8 +739,8 @@ public Float getMaxRatePerEndpoint() { * multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum * rate for the NEG. * - *

If the backend's balancingMode is RATE, you must specify either this parameter, maxRate, - * or maxRatePerInstance. + *

If the backend's balancingMode is RATE, you must specify either this parameter, maxRate + * (except for regional managed instance groups), or maxRatePerInstance. * *

Not available if the backend's balancingMode is CONNECTION. */ @@ -695,8 +755,8 @@ public Builder setMaxRatePerEndpoint(Float maxRatePerEndpoint) { * calculate a target maximum rate for the whole instance group. * *

If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the - * backend's balancingMode is RATE, you must specify either this parameter, maxRate, or - * maxRatePerEndpoint. + * backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for + * regional managed instance groups), or maxRatePerEndpoint. * *

Not available if the backend's balancingMode is CONNECTION. */ @@ -710,8 +770,8 @@ public Float getMaxRatePerInstance() { * calculate a target maximum rate for the whole instance group. * *

If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the - * backend's balancingMode is RATE, you must specify either this parameter, maxRate, or - * maxRatePerEndpoint. + * backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for + * regional managed instance groups), or maxRatePerEndpoint. * *

Not available if the backend's balancingMode is CONNECTION. */ @@ -721,24 +781,24 @@ public Builder setMaxRatePerInstance(Float maxRatePerInstance) { } /** - * Defines the maximum average CPU utilization of a backend VM in an instance group. The valid - * range is [0.0, 1.0]. This is an optional parameter if the backend's balancingMode is + * Defines the maximum average backend utilization of a backend VM in an instance group. The + * valid range is [0.0, 1.0]. This is an optional parameter if the backend's balancingMode is * UTILIZATION. * - *

This parameter can be used in conjunction with maxRate, maxRatePerInstance, - * maxConnections, or maxConnectionsPerInstance. + *

This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections + * (except for regional managed instance groups), or maxConnectionsPerInstance. */ public Float getMaxUtilization() { return maxUtilization; } /** - * Defines the maximum average CPU utilization of a backend VM in an instance group. The valid - * range is [0.0, 1.0]. This is an optional parameter if the backend's balancingMode is + * Defines the maximum average backend utilization of a backend VM in an instance group. The + * valid range is [0.0, 1.0]. This is an optional parameter if the backend's balancingMode is * UTILIZATION. * - *

This parameter can be used in conjunction with maxRate, maxRatePerInstance, - * maxConnections, or maxConnectionsPerInstance. + *

This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections + * (except for regional managed instance groups), or maxConnectionsPerInstance. */ public Builder setMaxUtilization(Float maxUtilization) { this.maxUtilization = maxUtilization; @@ -751,6 +811,7 @@ public Backend build() { balancingMode, capacityScaler, description, + failover, group, maxConnections, maxConnectionsPerEndpoint, @@ -766,6 +827,7 @@ public Builder clone() { newBuilder.setBalancingMode(this.balancingMode); newBuilder.setCapacityScaler(this.capacityScaler); newBuilder.setDescription(this.description); + newBuilder.setFailover(this.failover); newBuilder.setGroup(this.group); newBuilder.setMaxConnections(this.maxConnections); newBuilder.setMaxConnectionsPerEndpoint(this.maxConnectionsPerEndpoint); @@ -790,6 +852,9 @@ public String toString() { + "description=" + description + ", " + + "failover=" + + failover + + ", " + "group=" + group + ", " @@ -826,6 +891,7 @@ public boolean equals(Object o) { return Objects.equals(this.balancingMode, that.getBalancingMode()) && Objects.equals(this.capacityScaler, that.getCapacityScaler()) && Objects.equals(this.description, that.getDescription()) + && Objects.equals(this.failover, that.getFailover()) && Objects.equals(this.group, that.getGroup()) && Objects.equals(this.maxConnections, that.getMaxConnections()) && Objects.equals(this.maxConnectionsPerEndpoint, that.getMaxConnectionsPerEndpoint()) @@ -844,6 +910,7 @@ public int hashCode() { balancingMode, capacityScaler, description, + failover, group, maxConnections, maxConnectionsPerEndpoint, diff --git a/src/main/java/com/google/cloud/compute/v1/BackendService.java b/src/main/java/com/google/cloud/compute/v1/BackendService.java index 901a1ed42..b9b31fb53 100644 --- a/src/main/java/com/google/cloud/compute/v1/BackendService.java +++ b/src/main/java/com/google/cloud/compute/v1/BackendService.java @@ -33,8 +33,8 @@ * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -51,6 +51,7 @@ public final class BackendService implements ApiMessage { private final List customRequestHeaders; private final String description; private final Boolean enableCDN; + private final BackendServiceFailoverPolicy failoverPolicy; private final String fingerprint; private final List healthChecks; private final BackendServiceIAP iap; @@ -82,6 +83,7 @@ private BackendService() { this.customRequestHeaders = null; this.description = null; this.enableCDN = null; + this.failoverPolicy = null; this.fingerprint = null; this.healthChecks = null; this.iap = null; @@ -114,6 +116,7 @@ private BackendService( List customRequestHeaders, String description, Boolean enableCDN, + BackendServiceFailoverPolicy failoverPolicy, String fingerprint, List healthChecks, BackendServiceIAP iap, @@ -143,6 +146,7 @@ private BackendService( this.customRequestHeaders = customRequestHeaders; this.description = description; this.enableCDN = enableCDN; + this.failoverPolicy = failoverPolicy; this.fingerprint = fingerprint; this.healthChecks = healthChecks; this.iap = iap; @@ -196,6 +200,9 @@ public Object getFieldValue(String fieldName) { if ("enableCDN".equals(fieldName)) { return enableCDN; } + if ("failoverPolicy".equals(fieldName)) { + return failoverPolicy; + } if ("fingerprint".equals(fieldName)) { return fingerprint; } @@ -349,6 +356,14 @@ public Boolean getEnableCDN() { return enableCDN; } + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend + * instance group to be defined as a backup (failover) backend. + */ + public BackendServiceFailoverPolicy getFailoverPolicy() { + return failoverPolicy; + } + /** * Fingerprint of this resource. A hash of the contents stored in this object. This field is used * in optimistic locking. This field will be ignored when inserting a BackendService. An @@ -362,13 +377,11 @@ public String getFingerprint() { } /** - * The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this - * BackendService. Currently at most one health check can be specified. Health check is optional - * for Compute Engine backend services if there is no backend. A health check must not be - * specified when adding Internet Network Endpoint Group or Serverless Network Endpoint Group as - * backends. In all other cases, a health check is required for Compute Engine backend services. - * - *

For internal load balancing, a URL to a HealthCheck resource must be specified instead. + * The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) + * resource for health checking this backend service. Not all backend services support legacy + * health checks. See Load balancer guide. Currently at most one health check can be specified. + * Backend services with instance group or zonal NEG backends must have a health check. Backend + * services with internet NEG backends must not have a health check. A health check must */ public List getHealthChecksList() { return healthChecks; @@ -479,9 +492,9 @@ public Integer getPort() { /** * A named port on a backend instance group representing the port for communication to the backend - * VMs in that group. Required when the loadBalancingScheme is EXTERNAL and the backends are - * instance groups. The named port must be defined on each backend instance group. This parameter - * has no meaning if the backends are NEGs. + * VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or + * INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on + * each backend instance group. This parameter has no meaning if the backends are NEGs. * *

Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing). */ @@ -492,7 +505,7 @@ public String getPortName() { /** * The protocol this BackendService uses to communicate with backends. * - *

Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending on the chosen load + *

Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP. depending on the chosen load * balancer or Traffic Director configuration. Refer to the documentation for the load balancer or * for Traffic Director for more information. */ @@ -579,6 +592,7 @@ public static class Builder { private List customRequestHeaders; private String description; private Boolean enableCDN; + private BackendServiceFailoverPolicy failoverPolicy; private String fingerprint; private List healthChecks; private BackendServiceIAP iap; @@ -633,6 +647,9 @@ public Builder mergeFrom(BackendService other) { if (other.getEnableCDN() != null) { this.enableCDN = other.enableCDN; } + if (other.getFailoverPolicy() != null) { + this.failoverPolicy = other.failoverPolicy; + } if (other.getFingerprint() != null) { this.fingerprint = other.fingerprint; } @@ -704,6 +721,7 @@ public Builder mergeFrom(BackendService other) { this.customRequestHeaders = source.customRequestHeaders; this.description = source.description; this.enableCDN = source.enableCDN; + this.failoverPolicy = source.failoverPolicy; this.fingerprint = source.fingerprint; this.healthChecks = source.healthChecks; this.iap = source.iap; @@ -909,6 +927,23 @@ public Builder setEnableCDN(Boolean enableCDN) { return this; } + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one + * backend instance group to be defined as a backup (failover) backend. + */ + public BackendServiceFailoverPolicy getFailoverPolicy() { + return failoverPolicy; + } + + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one + * backend instance group to be defined as a backup (failover) backend. + */ + public Builder setFailoverPolicy(BackendServiceFailoverPolicy failoverPolicy) { + this.failoverPolicy = failoverPolicy; + return this; + } + /** * Fingerprint of this resource. A hash of the contents stored in this object. This field is * used in optimistic locking. This field will be ignored when inserting a BackendService. An @@ -935,26 +970,24 @@ public Builder setFingerprint(String fingerprint) { } /** - * The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this - * BackendService. Currently at most one health check can be specified. Health check is optional - * for Compute Engine backend services if there is no backend. A health check must not be - * specified when adding Internet Network Endpoint Group or Serverless Network Endpoint Group as - * backends. In all other cases, a health check is required for Compute Engine backend services. - * - *

For internal load balancing, a URL to a HealthCheck resource must be specified instead. + * The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks + * (legacy) resource for health checking this backend service. Not all backend services support + * legacy health checks. See Load balancer guide. Currently at most one health check can be + * specified. Backend services with instance group or zonal NEG backends must have a health + * check. Backend services with internet NEG backends must not have a health check. A health + * check must */ public List getHealthChecksList() { return healthChecks; } /** - * The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this - * BackendService. Currently at most one health check can be specified. Health check is optional - * for Compute Engine backend services if there is no backend. A health check must not be - * specified when adding Internet Network Endpoint Group or Serverless Network Endpoint Group as - * backends. In all other cases, a health check is required for Compute Engine backend services. - * - *

For internal load balancing, a URL to a HealthCheck resource must be specified instead. + * The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks + * (legacy) resource for health checking this backend service. Not all backend services support + * legacy health checks. See Load balancer guide. Currently at most one health check can be + * specified. Backend services with instance group or zonal NEG backends must have a health + * check. Backend services with internet NEG backends must not have a health check. A health + * check must */ public Builder addAllHealthChecks(List healthChecks) { if (this.healthChecks == null) { @@ -965,13 +998,12 @@ public Builder addAllHealthChecks(List healthChecks) { } /** - * The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this - * BackendService. Currently at most one health check can be specified. Health check is optional - * for Compute Engine backend services if there is no backend. A health check must not be - * specified when adding Internet Network Endpoint Group or Serverless Network Endpoint Group as - * backends. In all other cases, a health check is required for Compute Engine backend services. - * - *

For internal load balancing, a URL to a HealthCheck resource must be specified instead. + * The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks + * (legacy) resource for health checking this backend service. Not all backend services support + * legacy health checks. See Load balancer guide. Currently at most one health check can be + * specified. Backend services with instance group or zonal NEG backends must have a health + * check. Backend services with internet NEG backends must not have a health check. A health + * check must */ public Builder addHealthChecks(String healthChecks) { if (this.healthChecks == null) { @@ -1201,9 +1233,10 @@ public Builder setPort(Integer port) { /** * A named port on a backend instance group representing the port for communication to the - * backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL and the backends - * are instance groups. The named port must be defined on each backend instance group. This - * parameter has no meaning if the backends are NEGs. + * backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, + * INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named + * port must be defined on each backend instance group. This parameter has no meaning if the + * backends are NEGs. * *

Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load * Blaancing). @@ -1214,9 +1247,10 @@ public String getPortName() { /** * A named port on a backend instance group representing the port for communication to the - * backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL and the backends - * are instance groups. The named port must be defined on each backend instance group. This - * parameter has no meaning if the backends are NEGs. + * backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, + * INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named + * port must be defined on each backend instance group. This parameter has no meaning if the + * backends are NEGs. * *

Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load * Blaancing). @@ -1229,7 +1263,7 @@ public Builder setPortName(String portName) { /** * The protocol this BackendService uses to communicate with backends. * - *

Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending on the chosen load + *

Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP. depending on the chosen load * balancer or Traffic Director configuration. Refer to the documentation for the load balancer * or for Traffic Director for more information. */ @@ -1240,7 +1274,7 @@ public String getProtocol() { /** * The protocol this BackendService uses to communicate with backends. * - *

Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP, depending on the chosen load + *

Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP. depending on the chosen load * balancer or Traffic Director configuration. Refer to the documentation for the load balancer * or for Traffic Director for more information. */ @@ -1359,6 +1393,7 @@ public BackendService build() { customRequestHeaders, description, enableCDN, + failoverPolicy, fingerprint, healthChecks, iap, @@ -1392,6 +1427,7 @@ public Builder clone() { newBuilder.addAllCustomRequestHeaders(this.customRequestHeaders); newBuilder.setDescription(this.description); newBuilder.setEnableCDN(this.enableCDN); + newBuilder.setFailoverPolicy(this.failoverPolicy); newBuilder.setFingerprint(this.fingerprint); newBuilder.addAllHealthChecks(this.healthChecks); newBuilder.setIap(this.iap); @@ -1448,6 +1484,9 @@ public String toString() { + "enableCDN=" + enableCDN + ", " + + "failoverPolicy=" + + failoverPolicy + + ", " + "fingerprint=" + fingerprint + ", " @@ -1524,6 +1563,7 @@ public boolean equals(Object o) { && Objects.equals(this.customRequestHeaders, that.getCustomRequestHeadersList()) && Objects.equals(this.description, that.getDescription()) && Objects.equals(this.enableCDN, that.getEnableCDN()) + && Objects.equals(this.failoverPolicy, that.getFailoverPolicy()) && Objects.equals(this.fingerprint, that.getFingerprint()) && Objects.equals(this.healthChecks, that.getHealthChecksList()) && Objects.equals(this.iap, that.getIap()) @@ -1560,6 +1600,7 @@ public int hashCode() { customRequestHeaders, description, enableCDN, + failoverPolicy, fingerprint, healthChecks, iap, diff --git a/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java b/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java index ab2cb7aaf..e49d5dcd5 100644 --- a/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java +++ b/src/main/java/com/google/cloud/compute/v1/BackendServiceClient.java @@ -278,21 +278,29 @@ public final Operation addSignedUrlKeyBackendService( * *


    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (BackendServicesScopedList element : backendServiceClient.aggregatedListBackendServices(project).iterateAll()) {
+   *   for (BackendServicesScopedList element : backendServiceClient.aggregatedListBackendServices(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListBackendServicesPagedResponse aggregatedListBackendServices( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListBackendServicesHttpRequest request = AggregatedListBackendServicesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListBackendServices(request); @@ -307,21 +315,31 @@ public final AggregatedListBackendServicesPagedResponse aggregatedListBackendSer * *

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (BackendServicesScopedList element : backendServiceClient.aggregatedListBackendServices(project.toString()).iterateAll()) {
+   *   for (BackendServicesScopedList element : backendServiceClient.aggregatedListBackendServices(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListBackendServicesPagedResponse aggregatedListBackendServices( - String project) { + Boolean includeAllScopes, String project) { AggregatedListBackendServicesHttpRequest request = - AggregatedListBackendServicesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListBackendServicesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListBackendServices(request); } @@ -334,8 +352,10 @@ public final AggregatedListBackendServicesPagedResponse aggregatedListBackendSer * *

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListBackendServicesHttpRequest request = AggregatedListBackendServicesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (BackendServicesScopedList element : backendServiceClient.aggregatedListBackendServices(request).iterateAll()) {
@@ -362,8 +382,10 @@ public final AggregatedListBackendServicesPagedResponse aggregatedListBackendSer
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListBackendServicesHttpRequest request = AggregatedListBackendServicesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListBackendServicesPagedResponse> future = backendServiceClient.aggregatedListBackendServicesPagedCallable().futureCall(request);
@@ -390,8 +412,10 @@ public final AggregatedListBackendServicesPagedResponse aggregatedListBackendSer
    *
    * 

    * try (BackendServiceClient backendServiceClient = BackendServiceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListBackendServicesHttpRequest request = AggregatedListBackendServicesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -837,7 +861,7 @@ public final BackendServiceGroupHealth getHealthBackendService(
   /**
    * Creates a BackendService resource in the specified project using the data included in the
    * request. There are several restrictions and guidelines to keep in mind when creating a backend
-   * service. Read Restrictions and Guidelines for more information.
+   * service. Read Understanding backend services for more information.
    *
    * 

Sample code: * @@ -854,8 +878,8 @@ public final BackendServiceGroupHealth getHealthBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -875,7 +899,7 @@ public final Operation insertBackendService( /** * Creates a BackendService resource in the specified project using the data included in the * request. There are several restrictions and guidelines to keep in mind when creating a backend - * service. Read Restrictions and Guidelines for more information. + * service. Read Understanding backend services for more information. * *

Sample code: * @@ -892,8 +916,8 @@ public final Operation insertBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -913,7 +937,7 @@ public final Operation insertBackendService( /** * Creates a BackendService resource in the specified project using the data included in the * request. There are several restrictions and guidelines to keep in mind when creating a backend - * service. Read Restrictions and Guidelines for more information. + * service. Read Understanding backend services for more information. * *

Sample code: * @@ -941,7 +965,7 @@ public final Operation insertBackendService(InsertBackendServiceHttpRequest requ /** * Creates a BackendService resource in the specified project using the data included in the * request. There are several restrictions and guidelines to keep in mind when creating a backend - * service. Read Restrictions and Guidelines for more information. + * service. Read Understanding backend services for more information. * *

Sample code: * @@ -1106,9 +1130,9 @@ public final ListBackendServicesPagedResponse listBackendServices( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Patches the specified BackendService resource with the data included in the request. There are - * several restrictions and guidelines to keep in mind when updating a backend service. Read - * Restrictions and Guidelines for more information. This method supports PATCH semantics and uses - * the JSON merge patch format and processing rules. + * several Understanding backend services to keep in mind when updating a backend service. Read + * Understanding backend services for more information. This method supports PATCH semantics and + * uses the JSON merge patch format and processing rules. * *

Sample code: * @@ -1126,8 +1150,8 @@ public final ListBackendServicesPagedResponse listBackendServices( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @param fieldMask The fields that should be serialized (even if they have empty values). If the @@ -1153,9 +1177,9 @@ public final Operation patchBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Patches the specified BackendService resource with the data included in the request. There are - * several restrictions and guidelines to keep in mind when updating a backend service. Read - * Restrictions and Guidelines for more information. This method supports PATCH semantics and uses - * the JSON merge patch format and processing rules. + * several Understanding backend services to keep in mind when updating a backend service. Read + * Understanding backend services for more information. This method supports PATCH semantics and + * uses the JSON merge patch format and processing rules. * *

Sample code: * @@ -1173,8 +1197,8 @@ public final Operation patchBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @param fieldMask The fields that should be serialized (even if they have empty values). If the @@ -1198,9 +1222,9 @@ public final Operation patchBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Patches the specified BackendService resource with the data included in the request. There are - * several restrictions and guidelines to keep in mind when updating a backend service. Read - * Restrictions and Guidelines for more information. This method supports PATCH semantics and uses - * the JSON merge patch format and processing rules. + * several Understanding backend services to keep in mind when updating a backend service. Read + * Understanding backend services for more information. This method supports PATCH semantics and + * uses the JSON merge patch format and processing rules. * *

Sample code: * @@ -1229,9 +1253,9 @@ public final Operation patchBackendService(PatchBackendServiceHttpRequest reques // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Patches the specified BackendService resource with the data included in the request. There are - * several restrictions and guidelines to keep in mind when updating a backend service. Read - * Restrictions and Guidelines for more information. This method supports PATCH semantics and uses - * the JSON merge patch format and processing rules. + * several Understanding backend services to keep in mind when updating a backend service. Read + * Understanding backend services for more information. This method supports PATCH semantics and + * uses the JSON merge patch format and processing rules. * *

Sample code: * @@ -1374,8 +1398,8 @@ public final Operation setSecurityPolicyBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified BackendService resource with the data included in the request. There are - * several restrictions and guidelines to keep in mind when updating a backend service. Read - * Restrictions and Guidelines for more information. + * several Understanding backend services to keep in mind when updating a backend service. Read + * Understanding backend services for more information. * *

Sample code: * @@ -1393,8 +1417,8 @@ public final Operation setSecurityPolicyBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @param fieldMask The fields that should be serialized (even if they have empty values). If the @@ -1420,8 +1444,8 @@ public final Operation updateBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified BackendService resource with the data included in the request. There are - * several restrictions and guidelines to keep in mind when updating a backend service. Read - * Restrictions and Guidelines for more information. + * several Understanding backend services to keep in mind when updating a backend service. Read + * Understanding backend services for more information. * *

Sample code: * @@ -1439,8 +1463,8 @@ public final Operation updateBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @param fieldMask The fields that should be serialized (even if they have empty values). If the @@ -1464,8 +1488,8 @@ public final Operation updateBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified BackendService resource with the data included in the request. There are - * several restrictions and guidelines to keep in mind when updating a backend service. Read - * Restrictions and Guidelines for more information. + * several Understanding backend services to keep in mind when updating a backend service. Read + * Understanding backend services for more information. * *

Sample code: * @@ -1494,8 +1518,8 @@ public final Operation updateBackendService(UpdateBackendServiceHttpRequest requ // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified BackendService resource with the data included in the request. There are - * several restrictions and guidelines to keep in mind when updating a backend service. Read - * Restrictions and Guidelines for more information. + * several Understanding backend services to keep in mind when updating a backend service. Read + * Understanding backend services for more information. * *

Sample code: * diff --git a/src/main/java/com/google/cloud/compute/v1/BackendServiceFailoverPolicy.java b/src/main/java/com/google/cloud/compute/v1/BackendServiceFailoverPolicy.java new file mode 100644 index 000000000..5cae14a42 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/BackendServiceFailoverPolicy.java @@ -0,0 +1,280 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 +/** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. On failover or failback, this + * field indicates whether connection draining will be honored. GCP has a fixed connection draining + * timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool + * during failover and failback, immediately draining traffic. A setting of false allows existing + * TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of + * the connection draining timeout (10 minutes). + */ +public final class BackendServiceFailoverPolicy implements ApiMessage { + private final Boolean disableConnectionDrainOnFailover; + private final Boolean dropTrafficIfUnhealthy; + private final Float failoverRatio; + + private BackendServiceFailoverPolicy() { + this.disableConnectionDrainOnFailover = null; + this.dropTrafficIfUnhealthy = null; + this.failoverRatio = null; + } + + private BackendServiceFailoverPolicy( + Boolean disableConnectionDrainOnFailover, + Boolean dropTrafficIfUnhealthy, + Float failoverRatio) { + this.disableConnectionDrainOnFailover = disableConnectionDrainOnFailover; + this.dropTrafficIfUnhealthy = dropTrafficIfUnhealthy; + this.failoverRatio = failoverRatio; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("disableConnectionDrainOnFailover".equals(fieldName)) { + return disableConnectionDrainOnFailover; + } + if ("dropTrafficIfUnhealthy".equals(fieldName)) { + return dropTrafficIfUnhealthy; + } + if ("failoverRatio".equals(fieldName)) { + return failoverRatio; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** + * This can be set to true only if the protocol is TCP. + * + *

The default is false. + */ + public Boolean getDisableConnectionDrainOnFailover() { + return disableConnectionDrainOnFailover; + } + + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to + * the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set + * to false, connections are distributed among all primary VMs when all primary and all backup + * backend VMs are unhealthy. + * + *

The default is false. + */ + public Boolean getDropTrafficIfUnhealthy() { + return dropTrafficIfUnhealthy; + } + + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be + * in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number + * of healthy primary VMs equals zero. For all other values, the load balancer performs a failover + * when the total number of healthy primary VMs is less than this ratio. + */ + public Float getFailoverRatio() { + return failoverRatio; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(BackendServiceFailoverPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static BackendServiceFailoverPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final BackendServiceFailoverPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new BackendServiceFailoverPolicy(); + } + + public static class Builder { + private Boolean disableConnectionDrainOnFailover; + private Boolean dropTrafficIfUnhealthy; + private Float failoverRatio; + + Builder() {} + + public Builder mergeFrom(BackendServiceFailoverPolicy other) { + if (other == BackendServiceFailoverPolicy.getDefaultInstance()) return this; + if (other.getDisableConnectionDrainOnFailover() != null) { + this.disableConnectionDrainOnFailover = other.disableConnectionDrainOnFailover; + } + if (other.getDropTrafficIfUnhealthy() != null) { + this.dropTrafficIfUnhealthy = other.dropTrafficIfUnhealthy; + } + if (other.getFailoverRatio() != null) { + this.failoverRatio = other.failoverRatio; + } + return this; + } + + Builder(BackendServiceFailoverPolicy source) { + this.disableConnectionDrainOnFailover = source.disableConnectionDrainOnFailover; + this.dropTrafficIfUnhealthy = source.dropTrafficIfUnhealthy; + this.failoverRatio = source.failoverRatio; + } + + /** + * This can be set to true only if the protocol is TCP. + * + *

The default is false. + */ + public Boolean getDisableConnectionDrainOnFailover() { + return disableConnectionDrainOnFailover; + } + + /** + * This can be set to true only if the protocol is TCP. + * + *

The default is false. + */ + public Builder setDisableConnectionDrainOnFailover(Boolean disableConnectionDrainOnFailover) { + this.disableConnectionDrainOnFailover = disableConnectionDrainOnFailover; + return this; + } + + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections + * to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. + * If set to false, connections are distributed among all primary VMs when all primary and all + * backup backend VMs are unhealthy. + * + *

The default is false. + */ + public Boolean getDropTrafficIfUnhealthy() { + return dropTrafficIfUnhealthy; + } + + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections + * to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. + * If set to false, connections are distributed among all primary VMs when all primary and all + * backup backend VMs are unhealthy. + * + *

The default is false. + */ + public Builder setDropTrafficIfUnhealthy(Boolean dropTrafficIfUnhealthy) { + this.dropTrafficIfUnhealthy = dropTrafficIfUnhealthy; + return this; + } + + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must + * be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the + * number of healthy primary VMs equals zero. For all other values, the load balancer performs a + * failover when the total number of healthy primary VMs is less than this ratio. + */ + public Float getFailoverRatio() { + return failoverRatio; + } + + /** + * Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must + * be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the + * number of healthy primary VMs equals zero. For all other values, the load balancer performs a + * failover when the total number of healthy primary VMs is less than this ratio. + */ + public Builder setFailoverRatio(Float failoverRatio) { + this.failoverRatio = failoverRatio; + return this; + } + + public BackendServiceFailoverPolicy build() { + + return new BackendServiceFailoverPolicy( + disableConnectionDrainOnFailover, dropTrafficIfUnhealthy, failoverRatio); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setDisableConnectionDrainOnFailover(this.disableConnectionDrainOnFailover); + newBuilder.setDropTrafficIfUnhealthy(this.dropTrafficIfUnhealthy); + newBuilder.setFailoverRatio(this.failoverRatio); + return newBuilder; + } + } + + @Override + public String toString() { + return "BackendServiceFailoverPolicy{" + + "disableConnectionDrainOnFailover=" + + disableConnectionDrainOnFailover + + ", " + + "dropTrafficIfUnhealthy=" + + dropTrafficIfUnhealthy + + ", " + + "failoverRatio=" + + failoverRatio + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof BackendServiceFailoverPolicy) { + BackendServiceFailoverPolicy that = (BackendServiceFailoverPolicy) o; + return Objects.equals( + this.disableConnectionDrainOnFailover, that.getDisableConnectionDrainOnFailover()) + && Objects.equals(this.dropTrafficIfUnhealthy, that.getDropTrafficIfUnhealthy()) + && Objects.equals(this.failoverRatio, that.getFailoverRatio()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(disableConnectionDrainOnFailover, dropTrafficIfUnhealthy, failoverRatio); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKey.java b/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKey.java index 58944d230..6c705594c 100644 --- a/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKey.java +++ b/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKey.java @@ -27,17 +27,21 @@ /** Represents a customer-supplied encryption key */ public final class CustomerEncryptionKey implements ApiMessage { private final String kmsKeyName; + private final String kmsKeyServiceAccount; private final String rawKey; private final String sha256; private CustomerEncryptionKey() { this.kmsKeyName = null; + this.kmsKeyServiceAccount = null; this.rawKey = null; this.sha256 = null; } - private CustomerEncryptionKey(String kmsKeyName, String rawKey, String sha256) { + private CustomerEncryptionKey( + String kmsKeyName, String kmsKeyServiceAccount, String rawKey, String sha256) { this.kmsKeyName = kmsKeyName; + this.kmsKeyServiceAccount = kmsKeyServiceAccount; this.rawKey = rawKey; this.sha256 = sha256; } @@ -47,6 +51,9 @@ public Object getFieldValue(String fieldName) { if ("kmsKeyName".equals(fieldName)) { return kmsKeyName; } + if ("kmsKeyServiceAccount".equals(fieldName)) { + return kmsKeyServiceAccount; + } if ("rawKey".equals(fieldName)) { return rawKey; } @@ -79,6 +86,14 @@ public String getKmsKeyName() { return kmsKeyName; } + /** + * The service account being used for the encryption request for the given KMS key. If absent, the + * Compute Engine default service account is used. + */ + public String getKmsKeyServiceAccount() { + return kmsKeyServiceAccount; + } + /** * Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either * encrypt or decrypt this resource. @@ -119,6 +134,7 @@ public static CustomerEncryptionKey getDefaultInstance() { public static class Builder { private String kmsKeyName; + private String kmsKeyServiceAccount; private String rawKey; private String sha256; @@ -129,6 +145,9 @@ public Builder mergeFrom(CustomerEncryptionKey other) { if (other.getKmsKeyName() != null) { this.kmsKeyName = other.kmsKeyName; } + if (other.getKmsKeyServiceAccount() != null) { + this.kmsKeyServiceAccount = other.kmsKeyServiceAccount; + } if (other.getRawKey() != null) { this.rawKey = other.rawKey; } @@ -140,6 +159,7 @@ public Builder mergeFrom(CustomerEncryptionKey other) { Builder(CustomerEncryptionKey source) { this.kmsKeyName = source.kmsKeyName; + this.kmsKeyServiceAccount = source.kmsKeyServiceAccount; this.rawKey = source.rawKey; this.sha256 = source.sha256; } @@ -155,6 +175,23 @@ public Builder setKmsKeyName(String kmsKeyName) { return this; } + /** + * The service account being used for the encryption request for the given KMS key. If absent, + * the Compute Engine default service account is used. + */ + public String getKmsKeyServiceAccount() { + return kmsKeyServiceAccount; + } + + /** + * The service account being used for the encryption request for the given KMS key. If absent, + * the Compute Engine default service account is used. + */ + public Builder setKmsKeyServiceAccount(String kmsKeyServiceAccount) { + this.kmsKeyServiceAccount = kmsKeyServiceAccount; + return this; + } + /** * Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either * encrypt or decrypt this resource. @@ -191,12 +228,13 @@ public Builder setSha256(String sha256) { public CustomerEncryptionKey build() { - return new CustomerEncryptionKey(kmsKeyName, rawKey, sha256); + return new CustomerEncryptionKey(kmsKeyName, kmsKeyServiceAccount, rawKey, sha256); } public Builder clone() { Builder newBuilder = new Builder(); newBuilder.setKmsKeyName(this.kmsKeyName); + newBuilder.setKmsKeyServiceAccount(this.kmsKeyServiceAccount); newBuilder.setRawKey(this.rawKey); newBuilder.setSha256(this.sha256); return newBuilder; @@ -209,6 +247,9 @@ public String toString() { + "kmsKeyName=" + kmsKeyName + ", " + + "kmsKeyServiceAccount=" + + kmsKeyServiceAccount + + ", " + "rawKey=" + rawKey + ", " @@ -225,6 +266,7 @@ public boolean equals(Object o) { if (o instanceof CustomerEncryptionKey) { CustomerEncryptionKey that = (CustomerEncryptionKey) o; return Objects.equals(this.kmsKeyName, that.getKmsKeyName()) + && Objects.equals(this.kmsKeyServiceAccount, that.getKmsKeyServiceAccount()) && Objects.equals(this.rawKey, that.getRawKey()) && Objects.equals(this.sha256, that.getSha256()); } @@ -233,6 +275,6 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(kmsKeyName, rawKey, sha256); + return Objects.hash(kmsKeyName, kmsKeyServiceAccount, rawKey, sha256); } } diff --git a/src/main/java/com/google/cloud/compute/v1/DeleteGlobalNetworkEndpointGroupHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/DeleteGlobalNetworkEndpointGroupHttpRequest.java new file mode 100644 index 000000000..0fd029e7b --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/DeleteGlobalNetworkEndpointGroupHttpRequest.java @@ -0,0 +1,509 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.globalNetworkEndpointGroups.delete. Deletes the specified + * network endpoint group.Note that the NEG cannot be deleted if there are backend services + * referencing it. + */ +public final class DeleteGlobalNetworkEndpointGroupHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String key; + private final String networkEndpointGroup; + private final String prettyPrint; + private final String quotaUser; + private final String requestId; + private final String userIp; + + private DeleteGlobalNetworkEndpointGroupHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.key = null; + this.networkEndpointGroup = null; + this.prettyPrint = null; + this.quotaUser = null; + this.requestId = null; + this.userIp = null; + } + + private DeleteGlobalNetworkEndpointGroupHttpRequest( + String access_token, + String callback, + String fields, + String key, + String networkEndpointGroup, + String prettyPrint, + String quotaUser, + String requestId, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.key = key; + this.networkEndpointGroup = networkEndpointGroup; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.requestId = requestId; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("key".equals(fieldName)) { + return key; + } + if ("networkEndpointGroup".equals(fieldName)) { + return networkEndpointGroup; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("requestId".equals(fieldName)) { + return requestId; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The name of the network endpoint group to delete. It should comply with RFC1035. It must have + * the format `{project}/global/networkEndpointGroups/{networkEndpointGroup}`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(DeleteGlobalNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static DeleteGlobalNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final DeleteGlobalNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new DeleteGlobalNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String key; + private String networkEndpointGroup; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(DeleteGlobalNetworkEndpointGroupHttpRequest other) { + if (other == DeleteGlobalNetworkEndpointGroupHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroup() != null) { + this.networkEndpointGroup = other.networkEndpointGroup; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(DeleteGlobalNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.key = source.key; + this.networkEndpointGroup = source.networkEndpointGroup; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The name of the network endpoint group to delete. It should comply with RFC1035. It must have + * the format `{project}/global/networkEndpointGroups/{networkEndpointGroup}`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** + * The name of the network endpoint group to delete. It should comply with RFC1035. It must have + * the format `{project}/global/networkEndpointGroups/{networkEndpointGroup}`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public DeleteGlobalNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (networkEndpointGroup == null) { + missing += " networkEndpointGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new DeleteGlobalNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "DeleteGlobalNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroup=" + + networkEndpointGroup + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof DeleteGlobalNetworkEndpointGroupHttpRequest) { + DeleteGlobalNetworkEndpointGroupHttpRequest that = + (DeleteGlobalNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/DeleteLicenseHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/DeleteLicenseHttpRequest.java index 2d6668b25..d8eb556ad 100644 --- a/src/main/java/com/google/cloud/compute/v1/DeleteLicenseHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/DeleteLicenseHttpRequest.java @@ -24,7 +24,11 @@ @Generated("by GAPIC") @BetaApi -/** Request object for method compute.licenses.delete. Deletes the specified license. */ +/** + * Request object for method compute.licenses.delete. Deletes the specified license. Caution This + * resource is intended for use only by third-party partners who are creating Cloud Marketplace + * images. + */ public final class DeleteLicenseHttpRequest implements ApiMessage { private final String access_token; private final String callback; diff --git a/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.java new file mode 100644 index 000000000..bd11e7658 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.java @@ -0,0 +1,560 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.globalNetworkEndpointGroups.detachNetworkEndpoints. Detach the + * network endpoint from the specified network endpoint group. + */ +public final class DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest + implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource; + private final String key; + private final String networkEndpointGroup; + private final String prettyPrint; + private final String quotaUser; + private final String requestId; + private final String userIp; + + private DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.globalNetworkEndpointGroupsDetachEndpointsRequestResource = null; + this.key = null; + this.networkEndpointGroup = null; + this.prettyPrint = null; + this.quotaUser = null; + this.requestId = null; + this.userIp = null; + } + + private DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest( + String access_token, + String callback, + String fields, + GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource, + String key, + String networkEndpointGroup, + String prettyPrint, + String quotaUser, + String requestId, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.globalNetworkEndpointGroupsDetachEndpointsRequestResource = + globalNetworkEndpointGroupsDetachEndpointsRequestResource; + this.key = key; + this.networkEndpointGroup = networkEndpointGroup; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.requestId = requestId; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("globalNetworkEndpointGroupsDetachEndpointsRequestResource".equals(fieldName)) { + return globalNetworkEndpointGroupsDetachEndpointsRequestResource; + } + if ("key".equals(fieldName)) { + return key; + } + if ("networkEndpointGroup".equals(fieldName)) { + return networkEndpointGroup; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("requestId".equals(fieldName)) { + return requestId; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public GlobalNetworkEndpointGroupsDetachEndpointsRequest getApiMessageRequestBody() { + return globalNetworkEndpointGroupsDetachEndpointsRequestResource; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + public GlobalNetworkEndpointGroupsDetachEndpointsRequest + getGlobalNetworkEndpointGroupsDetachEndpointsRequestResource() { + return globalNetworkEndpointGroupsDetachEndpointsRequestResource; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The name of the network endpoint group where you are removing network endpoints. It should + * comply with RFC1035. It must have the format + * `{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource; + private String key; + private String networkEndpointGroup; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest other) { + if (other == DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.getDefaultInstance()) + return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getGlobalNetworkEndpointGroupsDetachEndpointsRequestResource() != null) { + this.globalNetworkEndpointGroupsDetachEndpointsRequestResource = + other.globalNetworkEndpointGroupsDetachEndpointsRequestResource; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroup() != null) { + this.networkEndpointGroup = other.networkEndpointGroup; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.globalNetworkEndpointGroupsDetachEndpointsRequestResource = + source.globalNetworkEndpointGroupsDetachEndpointsRequestResource; + this.key = source.key; + this.networkEndpointGroup = source.networkEndpointGroup; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + public GlobalNetworkEndpointGroupsDetachEndpointsRequest + getGlobalNetworkEndpointGroupsDetachEndpointsRequestResource() { + return globalNetworkEndpointGroupsDetachEndpointsRequestResource; + } + + public Builder setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource( + GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource) { + this.globalNetworkEndpointGroupsDetachEndpointsRequestResource = + globalNetworkEndpointGroupsDetachEndpointsRequestResource; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The name of the network endpoint group where you are removing network endpoints. It should + * comply with RFC1035. It must have the format + * `{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** + * The name of the network endpoint group where you are removing network endpoints. It should + * comply with RFC1035. It must have the format + * `{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (networkEndpointGroup == null) { + missing += " networkEndpointGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + globalNetworkEndpointGroupsDetachEndpointsRequestResource, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource( + this.globalNetworkEndpointGroupsDetachEndpointsRequestResource); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "globalNetworkEndpointGroupsDetachEndpointsRequestResource=" + + globalNetworkEndpointGroupsDetachEndpointsRequestResource + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroup=" + + networkEndpointGroup + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest) { + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest that = + (DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals( + this.globalNetworkEndpointGroupsDetachEndpointsRequestResource, + that.getGlobalNetworkEndpointGroupsDetachEndpointsRequestResource()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + globalNetworkEndpointGroupsDetachEndpointsRequestResource, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/Disk.java b/src/main/java/com/google/cloud/compute/v1/Disk.java index cf228dc76..9e28d1836 100644 --- a/src/main/java/com/google/cloud/compute/v1/Disk.java +++ b/src/main/java/com/google/cloud/compute/v1/Disk.java @@ -31,8 +31,8 @@ * *

Google Compute Engine has two Disk resources: * - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) * *

Persistent disks are required for running your VM instances. Create both boot and non-boot * (data) persistent disks. For more information, read Persistent Disks. For more storage options, diff --git a/src/main/java/com/google/cloud/compute/v1/DiskClient.java b/src/main/java/com/google/cloud/compute/v1/DiskClient.java index 9515537e5..6f7b719f7 100644 --- a/src/main/java/com/google/cloud/compute/v1/DiskClient.java +++ b/src/main/java/com/google/cloud/compute/v1/DiskClient.java @@ -275,20 +275,29 @@ public final Operation addResourcePoliciesDisk(AddResourcePoliciesDiskHttpReques * *


    * try (DiskClient diskClient = DiskClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (DisksScopedList element : diskClient.aggregatedListDisks(project).iterateAll()) {
+   *   for (DisksScopedList element : diskClient.aggregatedListDisks(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListDisksPagedResponse aggregatedListDisks(ProjectName project) { + public final AggregatedListDisksPagedResponse aggregatedListDisks( + Boolean includeAllScopes, ProjectName project) { AggregatedListDisksHttpRequest request = AggregatedListDisksHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListDisks(request); @@ -302,20 +311,31 @@ public final AggregatedListDisksPagedResponse aggregatedListDisks(ProjectName pr * *

    * try (DiskClient diskClient = DiskClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (DisksScopedList element : diskClient.aggregatedListDisks(project.toString()).iterateAll()) {
+   *   for (DisksScopedList element : diskClient.aggregatedListDisks(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListDisksPagedResponse aggregatedListDisks(String project) { + public final AggregatedListDisksPagedResponse aggregatedListDisks( + Boolean includeAllScopes, String project) { AggregatedListDisksHttpRequest request = - AggregatedListDisksHttpRequest.newBuilder().setProject(project).build(); + AggregatedListDisksHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListDisks(request); } @@ -327,8 +347,10 @@ public final AggregatedListDisksPagedResponse aggregatedListDisks(String project * *

    * try (DiskClient diskClient = DiskClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDisksHttpRequest request = AggregatedListDisksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (DisksScopedList element : diskClient.aggregatedListDisks(request).iterateAll()) {
@@ -354,8 +376,10 @@ public final AggregatedListDisksPagedResponse aggregatedListDisks(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDisksHttpRequest request = AggregatedListDisksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListDisksPagedResponse> future = diskClient.aggregatedListDisksPagedCallable().futureCall(request);
@@ -380,8 +404,10 @@ public final AggregatedListDisksPagedResponse aggregatedListDisks(
    *
    * 

    * try (DiskClient diskClient = DiskClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDisksHttpRequest request = AggregatedListDisksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -848,8 +874,8 @@ public final UnaryCallable getIamPolicyDisk
    * @param zone The name of the zone for this request.
    * @param diskResource Represents a Persistent Disk resource.
    *     

Google Compute Engine has two Disk resources: - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) *

Persistent disks are required for running your VM instances. Create both boot and * non-boot (data) persistent disks. For more information, read Persistent Disks. For more * storage options, read Storage options. @@ -890,8 +916,8 @@ public final Operation insertDisk(ProjectZoneName zone, Disk diskResource) { * @param zone The name of the zone for this request. * @param diskResource Represents a Persistent Disk resource. *

Google Compute Engine has two Disk resources: - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) *

Persistent disks are required for running your VM instances. Create both boot and * non-boot (data) persistent disks. For more information, read Persistent Disks. For more * storage options, read Storage options. diff --git a/src/main/java/com/google/cloud/compute/v1/DiskType.java b/src/main/java/com/google/cloud/compute/v1/DiskType.java index 29c4f9b78..c55347a15 100644 --- a/src/main/java/com/google/cloud/compute/v1/DiskType.java +++ b/src/main/java/com/google/cloud/compute/v1/DiskType.java @@ -29,8 +29,8 @@ * *

Google Compute Engine has two Disk Type resources: * - *

* [Global](/compute/docs/reference/rest/latest/diskTypes) * - * [Regional](/compute/docs/reference/rest/latest/regionDiskTypes) + *

* [Regional](/compute/docs/reference/rest/{$api_version}/regionDiskTypes) * + * [Zonal](/compute/docs/reference/rest/{$api_version}/diskTypes) * *

You can choose from a variety of disk types based on your needs. For more information, read * Storage options. diff --git a/src/main/java/com/google/cloud/compute/v1/DiskTypeClient.java b/src/main/java/com/google/cloud/compute/v1/DiskTypeClient.java index 1c63bddd8..b30a6d887 100644 --- a/src/main/java/com/google/cloud/compute/v1/DiskTypeClient.java +++ b/src/main/java/com/google/cloud/compute/v1/DiskTypeClient.java @@ -159,20 +159,29 @@ public DiskTypeStub getStub() { * *


    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (DiskTypesScopedList element : diskTypeClient.aggregatedListDiskTypes(project).iterateAll()) {
+   *   for (DiskTypesScopedList element : diskTypeClient.aggregatedListDiskTypes(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(ProjectName project) { + public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes( + Boolean includeAllScopes, ProjectName project) { AggregatedListDiskTypesHttpRequest request = AggregatedListDiskTypesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListDiskTypes(request); @@ -186,20 +195,31 @@ public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(Projec * *

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (DiskTypesScopedList element : diskTypeClient.aggregatedListDiskTypes(project.toString()).iterateAll()) {
+   *   for (DiskTypesScopedList element : diskTypeClient.aggregatedListDiskTypes(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(String project) { + public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes( + Boolean includeAllScopes, String project) { AggregatedListDiskTypesHttpRequest request = - AggregatedListDiskTypesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListDiskTypesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListDiskTypes(request); } @@ -211,8 +231,10 @@ public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(String * *

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDiskTypesHttpRequest request = AggregatedListDiskTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (DiskTypesScopedList element : diskTypeClient.aggregatedListDiskTypes(request).iterateAll()) {
@@ -238,8 +260,10 @@ public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDiskTypesHttpRequest request = AggregatedListDiskTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListDiskTypesPagedResponse> future = diskTypeClient.aggregatedListDiskTypesPagedCallable().futureCall(request);
@@ -265,8 +289,10 @@ public final AggregatedListDiskTypesPagedResponse aggregatedListDiskTypes(
    *
    * 

    * try (DiskTypeClient diskTypeClient = DiskTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListDiskTypesHttpRequest request = AggregatedListDiskTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/FileContentBuffer.java b/src/main/java/com/google/cloud/compute/v1/FileContentBuffer.java
new file mode 100644
index 000000000..8e83f3c9b
--- /dev/null
+++ b/src/main/java/com/google/cloud/compute/v1/FileContentBuffer.java
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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 FileContentBuffer implements ApiMessage {
+  private final String content;
+  private final String fileType;
+
+  private FileContentBuffer() {
+    this.content = null;
+    this.fileType = null;
+  }
+
+  private FileContentBuffer(String content, String fileType) {
+    this.content = content;
+    this.fileType = fileType;
+  }
+
+  @Override
+  public Object getFieldValue(String fieldName) {
+    if ("content".equals(fieldName)) {
+      return content;
+    }
+    if ("fileType".equals(fieldName)) {
+      return fileType;
+    }
+    return null;
+  }
+
+  @Nullable
+  @Override
+  public ApiMessage getApiMessageRequestBody() {
+    return null;
+  }
+
+  @Nullable
+  @Override
+  /**
+   * The fields that should be serialized (even if they have empty values). If the containing
+   * message object has a non-null fieldmask, then all the fields in the field mask (and only those
+   * fields in the field mask) will be serialized. If the containing object does not have a
+   * fieldmask, then only non-empty fields will be serialized.
+   */
+  public List getFieldMask() {
+    return null;
+  }
+
+  /** The raw content in the secure keys file. */
+  public String getContent() {
+    return content;
+  }
+
+  public String getFileType() {
+    return fileType;
+  }
+
+  public static Builder newBuilder() {
+    return DEFAULT_INSTANCE.toBuilder();
+  }
+
+  public static Builder newBuilder(FileContentBuffer prototype) {
+    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+  }
+
+  public Builder toBuilder() {
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+  }
+
+  public static FileContentBuffer getDefaultInstance() {
+    return DEFAULT_INSTANCE;
+  }
+
+  private static final FileContentBuffer DEFAULT_INSTANCE;
+
+  static {
+    DEFAULT_INSTANCE = new FileContentBuffer();
+  }
+
+  public static class Builder {
+    private String content;
+    private String fileType;
+
+    Builder() {}
+
+    public Builder mergeFrom(FileContentBuffer other) {
+      if (other == FileContentBuffer.getDefaultInstance()) return this;
+      if (other.getContent() != null) {
+        this.content = other.content;
+      }
+      if (other.getFileType() != null) {
+        this.fileType = other.fileType;
+      }
+      return this;
+    }
+
+    Builder(FileContentBuffer source) {
+      this.content = source.content;
+      this.fileType = source.fileType;
+    }
+
+    /** The raw content in the secure keys file. */
+    public String getContent() {
+      return content;
+    }
+
+    /** The raw content in the secure keys file. */
+    public Builder setContent(String content) {
+      this.content = content;
+      return this;
+    }
+
+    public String getFileType() {
+      return fileType;
+    }
+
+    public Builder setFileType(String fileType) {
+      this.fileType = fileType;
+      return this;
+    }
+
+    public FileContentBuffer build() {
+
+      return new FileContentBuffer(content, fileType);
+    }
+
+    public Builder clone() {
+      Builder newBuilder = new Builder();
+      newBuilder.setContent(this.content);
+      newBuilder.setFileType(this.fileType);
+      return newBuilder;
+    }
+  }
+
+  @Override
+  public String toString() {
+    return "FileContentBuffer{" + "content=" + content + ", " + "fileType=" + fileType + "}";
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof FileContentBuffer) {
+      FileContentBuffer that = (FileContentBuffer) o;
+      return Objects.equals(this.content, that.getContent())
+          && Objects.equals(this.fileType, that.getFileType());
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(content, fileType);
+  }
+}
diff --git a/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java b/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java
index 57fdc1845..30020dc50 100644
--- a/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java
+++ b/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java
@@ -31,8 +31,8 @@
  *
  * 

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of a * Google Cloud Platform load balancer. Forwarding rules can also reference target instances and @@ -388,7 +388,7 @@ public String getKind() { * external IP address - The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and Network * TCP/UDP - INTERNAL is used for: - Protocol forwarding to VMs from an internal IP address - * Internal TCP/UDP load balancers - INTERNAL_MANAGED is used for: - Internal HTTP(S) load - * balancers - >INTERNAL_SELF_MANAGED is used for: - Traffic Director + * balancers - INTERNAL_SELF_MANAGED is used for: - Traffic Director * *

For more information about forwarding rules, refer to Forwarding rule concepts. */ @@ -437,7 +437,7 @@ public String getNetwork() { /** * This signifies the networking tier used for configuring this load balancer and can only take - * the following values: PREMIUM , STANDARD. + * the following values: PREMIUM, STANDARD. * *

For regional ForwardingRule, the valid values are PREMIUM and STANDARD. For * GlobalForwardingRule, the valid value is PREMIUM. @@ -982,7 +982,7 @@ public Builder setKind(String kind) { * external IP address - The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and * Network TCP/UDP - INTERNAL is used for: - Protocol forwarding to VMs from an internal IP * address - Internal TCP/UDP load balancers - INTERNAL_MANAGED is used for: - Internal HTTP(S) - * load balancers - >INTERNAL_SELF_MANAGED is used for: - Traffic Director + * load balancers - INTERNAL_SELF_MANAGED is used for: - Traffic Director * *

For more information about forwarding rules, refer to Forwarding rule concepts. */ @@ -997,7 +997,7 @@ public String getLoadBalancingScheme() { * external IP address - The following load balancers: HTTP(S), SSL Proxy, TCP Proxy, and * Network TCP/UDP - INTERNAL is used for: - Protocol forwarding to VMs from an internal IP * address - Internal TCP/UDP load balancers - INTERNAL_MANAGED is used for: - Internal HTTP(S) - * load balancers - >INTERNAL_SELF_MANAGED is used for: - Traffic Director + * load balancers - INTERNAL_SELF_MANAGED is used for: - Traffic Director * *

For more information about forwarding rules, refer to Forwarding rule concepts. */ @@ -1113,7 +1113,7 @@ public Builder setNetwork(String network) { /** * This signifies the networking tier used for configuring this load balancer and can only take - * the following values: PREMIUM , STANDARD. + * the following values: PREMIUM, STANDARD. * *

For regional ForwardingRule, the valid values are PREMIUM and STANDARD. For * GlobalForwardingRule, the valid value is PREMIUM. @@ -1127,7 +1127,7 @@ public String getNetworkTier() { /** * This signifies the networking tier used for configuring this load balancer and can only take - * the following values: PREMIUM , STANDARD. + * the following values: PREMIUM, STANDARD. * *

For regional ForwardingRule, the valid values are PREMIUM and STANDARD. For * GlobalForwardingRule, the valid value is PREMIUM. diff --git a/src/main/java/com/google/cloud/compute/v1/ForwardingRuleClient.java b/src/main/java/com/google/cloud/compute/v1/ForwardingRuleClient.java index 47e06832e..f57b83bf8 100644 --- a/src/main/java/com/google/cloud/compute/v1/ForwardingRuleClient.java +++ b/src/main/java/com/google/cloud/compute/v1/ForwardingRuleClient.java @@ -161,21 +161,29 @@ public ForwardingRuleStub getStub() { * *


    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (ForwardingRulesScopedList element : forwardingRuleClient.aggregatedListForwardingRules(project).iterateAll()) {
+   *   for (ForwardingRulesScopedList element : forwardingRuleClient.aggregatedListForwardingRules(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListForwardingRulesPagedResponse aggregatedListForwardingRules( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListForwardingRulesHttpRequest request = AggregatedListForwardingRulesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListForwardingRules(request); @@ -189,21 +197,31 @@ public final AggregatedListForwardingRulesPagedResponse aggregatedListForwarding * *

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (ForwardingRulesScopedList element : forwardingRuleClient.aggregatedListForwardingRules(project.toString()).iterateAll()) {
+   *   for (ForwardingRulesScopedList element : forwardingRuleClient.aggregatedListForwardingRules(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListForwardingRulesPagedResponse aggregatedListForwardingRules( - String project) { + Boolean includeAllScopes, String project) { AggregatedListForwardingRulesHttpRequest request = - AggregatedListForwardingRulesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListForwardingRulesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListForwardingRules(request); } @@ -215,8 +233,10 @@ public final AggregatedListForwardingRulesPagedResponse aggregatedListForwarding * *

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListForwardingRulesHttpRequest request = AggregatedListForwardingRulesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (ForwardingRulesScopedList element : forwardingRuleClient.aggregatedListForwardingRules(request).iterateAll()) {
@@ -242,8 +262,10 @@ public final AggregatedListForwardingRulesPagedResponse aggregatedListForwarding
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListForwardingRulesHttpRequest request = AggregatedListForwardingRulesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListForwardingRulesPagedResponse> future = forwardingRuleClient.aggregatedListForwardingRulesPagedCallable().futureCall(request);
@@ -269,8 +291,10 @@ public final AggregatedListForwardingRulesPagedResponse aggregatedListForwarding
    *
    * 

    * try (ForwardingRuleClient forwardingRuleClient = ForwardingRuleClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListForwardingRulesHttpRequest request = AggregatedListForwardingRulesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -504,8 +528,8 @@ public final ForwardingRule getForwardingRule(GetForwardingRuleHttpRequest reque
    * @param region Name of the region scoping this request.
    * @param forwardingRuleResource Represents a Forwarding Rule resource.
    *     

Forwarding rule resources in GCP can be either regional or global in scope: - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) *

A forwarding rule and its corresponding IP address represent the frontend configuration * of a Google Cloud Platform load balancer. Forwarding rules can also reference target * instances and Cloud VPN Classic gateways (targetVpnGateway). @@ -544,8 +568,8 @@ public final Operation insertForwardingRule( * @param region Name of the region scoping this request. * @param forwardingRuleResource Represents a Forwarding Rule resource. *

Forwarding rule resources in GCP can be either regional or global in scope: - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) *

A forwarding rule and its corresponding IP address represent the frontend configuration * of a Google Cloud Platform load balancer. Forwarding rules can also reference target * instances and Cloud VPN Classic gateways (targetVpnGateway). @@ -778,8 +802,8 @@ public final ListForwardingRulesPagedResponse listForwardingRules( * @param forwardingRule Name of the ForwardingRule resource to patch. * @param forwardingRuleResource Represents a Forwarding Rule resource. *

Forwarding rule resources in GCP can be either regional or global in scope: - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) *

A forwarding rule and its corresponding IP address represent the frontend configuration * of a Google Cloud Platform load balancer. Forwarding rules can also reference target * instances and Cloud VPN Classic gateways (targetVpnGateway). @@ -827,8 +851,8 @@ public final Operation patchForwardingRule( * @param forwardingRule Name of the ForwardingRule resource to patch. * @param forwardingRuleResource Represents a Forwarding Rule resource. *

Forwarding rule resources in GCP can be either regional or global in scope: - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) *

A forwarding rule and its corresponding IP address represent the frontend configuration * of a Google Cloud Platform load balancer. Forwarding rules can also reference target * instances and Cloud VPN Classic gateways (targetVpnGateway). diff --git a/src/main/java/com/google/cloud/compute/v1/GetGlobalNetworkEndpointGroupHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/GetGlobalNetworkEndpointGroupHttpRequest.java new file mode 100644 index 000000000..e6b760d4a --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/GetGlobalNetworkEndpointGroupHttpRequest.java @@ -0,0 +1,429 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.globalNetworkEndpointGroups.get. Returns the specified network + * endpoint group. Gets a list of available network endpoint groups by making a list() request. + */ +public final class GetGlobalNetworkEndpointGroupHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String key; + private final String networkEndpointGroup; + private final String prettyPrint; + private final String quotaUser; + private final String userIp; + + private GetGlobalNetworkEndpointGroupHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.key = null; + this.networkEndpointGroup = null; + this.prettyPrint = null; + this.quotaUser = null; + this.userIp = null; + } + + private GetGlobalNetworkEndpointGroupHttpRequest( + String access_token, + String callback, + String fields, + String key, + String networkEndpointGroup, + String prettyPrint, + String quotaUser, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.key = key; + this.networkEndpointGroup = networkEndpointGroup; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("key".equals(fieldName)) { + return key; + } + if ("networkEndpointGroup".equals(fieldName)) { + return networkEndpointGroup; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The name of the network endpoint group. It should comply with RFC1035. It must have the format + * `{project}/global/networkEndpointGroups/{networkEndpointGroup}`. \`{networkEndpointGroup}\` + * must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes + * (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent + * * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not + * start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(GetGlobalNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static GetGlobalNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final GetGlobalNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new GetGlobalNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String key; + private String networkEndpointGroup; + private String prettyPrint; + private String quotaUser; + private String userIp; + + Builder() {} + + public Builder mergeFrom(GetGlobalNetworkEndpointGroupHttpRequest other) { + if (other == GetGlobalNetworkEndpointGroupHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroup() != null) { + this.networkEndpointGroup = other.networkEndpointGroup; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(GetGlobalNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.key = source.key; + this.networkEndpointGroup = source.networkEndpointGroup; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The name of the network endpoint group. It should comply with RFC1035. It must have the + * format `{project}/global/networkEndpointGroups/{networkEndpointGroup}`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + /** + * The name of the network endpoint group. It should comply with RFC1035. It must have the + * format `{project}/global/networkEndpointGroups/{networkEndpointGroup}`. + * \`{networkEndpointGroup}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public GetGlobalNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (networkEndpointGroup == null) { + missing += " networkEndpointGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new GetGlobalNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + key, + networkEndpointGroup, + prettyPrint, + quotaUser, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroup(this.networkEndpointGroup); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "GetGlobalNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroup=" + + networkEndpointGroup + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof GetGlobalNetworkEndpointGroupHttpRequest) { + GetGlobalNetworkEndpointGroupHttpRequest that = (GetGlobalNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, callback, fields, key, networkEndpointGroup, prettyPrint, quotaUser, userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/GetIamPolicyLicenseHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/GetIamPolicyLicenseHttpRequest.java index a7da2a108..6af28b2f1 100644 --- a/src/main/java/com/google/cloud/compute/v1/GetIamPolicyLicenseHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/GetIamPolicyLicenseHttpRequest.java @@ -26,7 +26,8 @@ @BetaApi /** * Request object for method compute.licenses.getIamPolicy. Gets the access control policy for a - * resource. May be empty if no such policy or resource exists. + * resource. May be empty if no such policy or resource exists. Caution This resource is intended + * for use only by third-party partners who are creating Cloud Marketplace images. */ public final class GetIamPolicyLicenseHttpRequest implements ApiMessage { private final String access_token; diff --git a/src/main/java/com/google/cloud/compute/v1/GetLicenseCodeHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/GetLicenseCodeHttpRequest.java index 46fd91342..5dedc48de 100644 --- a/src/main/java/com/google/cloud/compute/v1/GetLicenseCodeHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/GetLicenseCodeHttpRequest.java @@ -26,7 +26,9 @@ @BetaApi /** * Request object for method compute.licenseCodes.get. Return a specified license code. License - * codes are mirrored across all projects that have permissions to read the License Code. + * codes are mirrored across all projects that have permissions to read the License Code. Caution + * This resource is intended for use only by third-party partners who are creating Cloud Marketplace + * images. */ public final class GetLicenseCodeHttpRequest implements ApiMessage { private final String access_token; diff --git a/src/main/java/com/google/cloud/compute/v1/GetLicenseHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/GetLicenseHttpRequest.java index a6b9d545d..d784c3d6c 100644 --- a/src/main/java/com/google/cloud/compute/v1/GetLicenseHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/GetLicenseHttpRequest.java @@ -24,7 +24,11 @@ @Generated("by GAPIC") @BetaApi -/** Request object for method compute.licenses.get. Returns the specified License resource. */ +/** + * Request object for method compute.licenses.get. Returns the specified License resource. Caution + * This resource is intended for use only by third-party partners who are creating Cloud Marketplace + * images. + */ public final class GetLicenseHttpRequest implements ApiMessage { private final String access_token; private final String callback; diff --git a/src/main/java/com/google/cloud/compute/v1/GlobalForwardingRuleClient.java b/src/main/java/com/google/cloud/compute/v1/GlobalForwardingRuleClient.java index 62fe61e2e..abc2a2fcc 100644 --- a/src/main/java/com/google/cloud/compute/v1/GlobalForwardingRuleClient.java +++ b/src/main/java/com/google/cloud/compute/v1/GlobalForwardingRuleClient.java @@ -372,8 +372,8 @@ public final ForwardingRule getGlobalForwardingRule(GetGlobalForwardingRuleHttpR * @param project Project ID for this request. * @param forwardingRuleResource Represents a Forwarding Rule resource. *

Forwarding rule resources in GCP can be either regional or global in scope: - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) *

A forwarding rule and its corresponding IP address represent the frontend configuration * of a Google Cloud Platform load balancer. Forwarding rules can also reference target * instances and Cloud VPN Classic gateways (targetVpnGateway). @@ -412,8 +412,8 @@ public final Operation insertGlobalForwardingRule( * @param project Project ID for this request. * @param forwardingRuleResource Represents a Forwarding Rule resource. *

Forwarding rule resources in GCP can be either regional or global in scope: - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) *

A forwarding rule and its corresponding IP address represent the frontend configuration * of a Google Cloud Platform load balancer. Forwarding rules can also reference target * instances and Cloud VPN Classic gateways (targetVpnGateway). @@ -648,8 +648,8 @@ public final ListGlobalForwardingRulesPagedResponse listGlobalForwardingRules( * @param forwardingRule Name of the ForwardingRule resource to patch. * @param forwardingRuleResource Represents a Forwarding Rule resource. *

Forwarding rule resources in GCP can be either regional or global in scope: - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) *

A forwarding rule and its corresponding IP address represent the frontend configuration * of a Google Cloud Platform load balancer. Forwarding rules can also reference target * instances and Cloud VPN Classic gateways (targetVpnGateway). @@ -697,8 +697,8 @@ public final Operation patchGlobalForwardingRule( * @param forwardingRule Name of the ForwardingRule resource to patch. * @param forwardingRuleResource Represents a Forwarding Rule resource. *

Forwarding rule resources in GCP can be either regional or global in scope: - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) *

A forwarding rule and its corresponding IP address represent the frontend configuration * of a Google Cloud Platform load balancer. Forwarding rules can also reference target * instances and Cloud VPN Classic gateways (targetVpnGateway). diff --git a/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupClient.java b/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupClient.java new file mode 100644 index 000000000..8d52e508f --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupClient.java @@ -0,0 +1,1270 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.compute.v1.stub.GlobalNetworkEndpointGroupStub; +import com.google.cloud.compute.v1.stub.GlobalNetworkEndpointGroupStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Creates and runs virtual machines on Google Cloud Platform. + * + *

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

+ * 
+ * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+ *   ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+ *   GlobalNetworkEndpointGroupsAttachEndpointsRequest globalNetworkEndpointGroupsAttachEndpointsRequestResource = GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+ *   Operation response = globalNetworkEndpointGroupClient.attachNetworkEndpointsGlobalNetworkEndpointGroup(networkEndpointGroup, globalNetworkEndpointGroupsAttachEndpointsRequestResource);
+ * }
+ * 
+ * 
+ * + *

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

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

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

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

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

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

To customize credentials: + * + *

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

Sample code: + * + *


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

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GlobalNetworkEndpointGroupsAttachEndpointsRequest globalNetworkEndpointGroupsAttachEndpointsRequestResource = GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+   *   Operation response = globalNetworkEndpointGroupClient.attachNetworkEndpointsGlobalNetworkEndpointGroup(networkEndpointGroup.toString(), globalNetworkEndpointGroupsAttachEndpointsRequestResource);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group where you are attaching + * network endpoints to. It should comply with RFC1035. + * @param globalNetworkEndpointGroupsAttachEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation attachNetworkEndpointsGlobalNetworkEndpointGroup( + String networkEndpointGroup, + GlobalNetworkEndpointGroupsAttachEndpointsRequest + globalNetworkEndpointGroupsAttachEndpointsRequestResource) { + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request = + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup(networkEndpointGroup) + .setGlobalNetworkEndpointGroupsAttachEndpointsRequestResource( + globalNetworkEndpointGroupsAttachEndpointsRequestResource) + .build(); + return attachNetworkEndpointsGlobalNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Attach a network endpoint to the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GlobalNetworkEndpointGroupsAttachEndpointsRequest globalNetworkEndpointGroupsAttachEndpointsRequestResource = GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+   *   AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request = AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setGlobalNetworkEndpointGroupsAttachEndpointsRequestResource(globalNetworkEndpointGroupsAttachEndpointsRequestResource)
+   *     .build();
+   *   Operation response = globalNetworkEndpointGroupClient.attachNetworkEndpointsGlobalNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation attachNetworkEndpointsGlobalNetworkEndpointGroup( + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request) { + return attachNetworkEndpointsGlobalNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Attach a network endpoint to the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GlobalNetworkEndpointGroupsAttachEndpointsRequest globalNetworkEndpointGroupsAttachEndpointsRequestResource = GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+   *   AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request = AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setGlobalNetworkEndpointGroupsAttachEndpointsRequestResource(globalNetworkEndpointGroupsAttachEndpointsRequestResource)
+   *     .build();
+   *   ApiFuture<Operation> future = globalNetworkEndpointGroupClient.attachNetworkEndpointsGlobalNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + attachNetworkEndpointsGlobalNetworkEndpointGroupCallable() { + return stub.attachNetworkEndpointsGlobalNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are + * backend services referencing it. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   Operation response = globalNetworkEndpointGroupClient.deleteGlobalNetworkEndpointGroup(networkEndpointGroup);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply + * with RFC1035. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation deleteGlobalNetworkEndpointGroup( + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup) { + DeleteGlobalNetworkEndpointGroupHttpRequest request = + DeleteGlobalNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup( + networkEndpointGroup == null ? null : networkEndpointGroup.toString()) + .build(); + return deleteGlobalNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are + * backend services referencing it. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   Operation response = globalNetworkEndpointGroupClient.deleteGlobalNetworkEndpointGroup(networkEndpointGroup.toString());
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group to delete. It should comply + * with RFC1035. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation deleteGlobalNetworkEndpointGroup(String networkEndpointGroup) { + DeleteGlobalNetworkEndpointGroupHttpRequest request = + DeleteGlobalNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup(networkEndpointGroup) + .build(); + return deleteGlobalNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are + * backend services referencing it. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   DeleteGlobalNetworkEndpointGroupHttpRequest request = DeleteGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   Operation response = globalNetworkEndpointGroupClient.deleteGlobalNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation deleteGlobalNetworkEndpointGroup( + DeleteGlobalNetworkEndpointGroupHttpRequest request) { + return deleteGlobalNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are + * backend services referencing it. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   DeleteGlobalNetworkEndpointGroupHttpRequest request = DeleteGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   ApiFuture<Operation> future = globalNetworkEndpointGroupClient.deleteGlobalNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + deleteGlobalNetworkEndpointGroupCallable() { + return stub.deleteGlobalNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detach the network endpoint from the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GlobalNetworkEndpointGroupsDetachEndpointsRequest globalNetworkEndpointGroupsDetachEndpointsRequestResource = GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
+   *   Operation response = globalNetworkEndpointGroupClient.detachNetworkEndpointsGlobalNetworkEndpointGroup(networkEndpointGroup, globalNetworkEndpointGroupsDetachEndpointsRequestResource);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group where you are removing + * network endpoints. It should comply with RFC1035. + * @param globalNetworkEndpointGroupsDetachEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation detachNetworkEndpointsGlobalNetworkEndpointGroup( + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup, + GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource) { + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request = + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup( + networkEndpointGroup == null ? null : networkEndpointGroup.toString()) + .setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource( + globalNetworkEndpointGroupsDetachEndpointsRequestResource) + .build(); + return detachNetworkEndpointsGlobalNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detach the network endpoint from the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GlobalNetworkEndpointGroupsDetachEndpointsRequest globalNetworkEndpointGroupsDetachEndpointsRequestResource = GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
+   *   Operation response = globalNetworkEndpointGroupClient.detachNetworkEndpointsGlobalNetworkEndpointGroup(networkEndpointGroup.toString(), globalNetworkEndpointGroupsDetachEndpointsRequestResource);
+   * }
+   * 
+ * + * @param networkEndpointGroup The name of the network endpoint group where you are removing + * network endpoints. It should comply with RFC1035. + * @param globalNetworkEndpointGroupsDetachEndpointsRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation detachNetworkEndpointsGlobalNetworkEndpointGroup( + String networkEndpointGroup, + GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource) { + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request = + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.newBuilder() + .setNetworkEndpointGroup(networkEndpointGroup) + .setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource( + globalNetworkEndpointGroupsDetachEndpointsRequestResource) + .build(); + return detachNetworkEndpointsGlobalNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detach the network endpoint from the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GlobalNetworkEndpointGroupsDetachEndpointsRequest globalNetworkEndpointGroupsDetachEndpointsRequestResource = GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
+   *   DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request = DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource(globalNetworkEndpointGroupsDetachEndpointsRequestResource)
+   *     .build();
+   *   Operation response = globalNetworkEndpointGroupClient.detachNetworkEndpointsGlobalNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation detachNetworkEndpointsGlobalNetworkEndpointGroup( + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request) { + return detachNetworkEndpointsGlobalNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Detach the network endpoint from the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GlobalNetworkEndpointGroupsDetachEndpointsRequest globalNetworkEndpointGroupsDetachEndpointsRequestResource = GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build();
+   *   DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest request = DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .setGlobalNetworkEndpointGroupsDetachEndpointsRequestResource(globalNetworkEndpointGroupsDetachEndpointsRequestResource)
+   *     .build();
+   *   ApiFuture<Operation> future = globalNetworkEndpointGroupClient.detachNetworkEndpointsGlobalNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + detachNetworkEndpointsGlobalNetworkEndpointGroupCallable() { + return stub.detachNetworkEndpointsGlobalNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the specified network endpoint group. Gets a list of available network endpoint groups + * by making a list() request. + * + *

Sample code: + * + *


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

Sample code: + * + *


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

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   GetGlobalNetworkEndpointGroupHttpRequest request = GetGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   NetworkEndpointGroup response = globalNetworkEndpointGroupClient.getGlobalNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final NetworkEndpointGroup getGlobalNetworkEndpointGroup( + GetGlobalNetworkEndpointGroupHttpRequest request) { + return getGlobalNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the specified network endpoint group. Gets a list of available network endpoint groups + * by making a list() request. + * + *

Sample code: + * + *


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

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
+   *   Operation response = globalNetworkEndpointGroupClient.insertGlobalNetworkEndpointGroup(project, networkEndpointGroupResource);
+   * }
+   * 
+ * + * @param project Project ID for this request. + * @param networkEndpointGroupResource Represents a collection of network endpoints. + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation insertGlobalNetworkEndpointGroup( + ProjectName project, NetworkEndpointGroup networkEndpointGroupResource) { + InsertGlobalNetworkEndpointGroupHttpRequest request = + InsertGlobalNetworkEndpointGroupHttpRequest.newBuilder() + .setProject(project == null ? null : project.toString()) + .setNetworkEndpointGroupResource(networkEndpointGroupResource) + .build(); + return insertGlobalNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a network endpoint group in the specified project using the parameters that are + * included in the request. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
+   *   Operation response = globalNetworkEndpointGroupClient.insertGlobalNetworkEndpointGroup(project.toString(), networkEndpointGroupResource);
+   * }
+   * 
+ * + * @param project Project ID for this request. + * @param networkEndpointGroupResource Represents a collection of network endpoints. + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation insertGlobalNetworkEndpointGroup( + String project, NetworkEndpointGroup networkEndpointGroupResource) { + InsertGlobalNetworkEndpointGroupHttpRequest request = + InsertGlobalNetworkEndpointGroupHttpRequest.newBuilder() + .setProject(project) + .setNetworkEndpointGroupResource(networkEndpointGroupResource) + .build(); + return insertGlobalNetworkEndpointGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a network endpoint group in the specified project using the parameters that are + * included in the request. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedProject = ProjectName.format("[PROJECT]");
+   *   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
+   *   InsertGlobalNetworkEndpointGroupHttpRequest request = InsertGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setProject(formattedProject)
+   *     .setNetworkEndpointGroupResource(networkEndpointGroupResource)
+   *     .build();
+   *   Operation response = globalNetworkEndpointGroupClient.insertGlobalNetworkEndpointGroup(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation insertGlobalNetworkEndpointGroup( + InsertGlobalNetworkEndpointGroupHttpRequest request) { + return insertGlobalNetworkEndpointGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a network endpoint group in the specified project using the parameters that are + * included in the request. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedProject = ProjectName.format("[PROJECT]");
+   *   NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build();
+   *   InsertGlobalNetworkEndpointGroupHttpRequest request = InsertGlobalNetworkEndpointGroupHttpRequest.newBuilder()
+   *     .setProject(formattedProject)
+   *     .setNetworkEndpointGroupResource(networkEndpointGroupResource)
+   *     .build();
+   *   ApiFuture<Operation> future = globalNetworkEndpointGroupClient.insertGlobalNetworkEndpointGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + insertGlobalNetworkEndpointGroupCallable() { + return stub.insertGlobalNetworkEndpointGroupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   for (NetworkEndpointGroup element : globalNetworkEndpointGroupClient.listGlobalNetworkEndpointGroups(project).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param project Project ID for this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListGlobalNetworkEndpointGroupsPagedResponse listGlobalNetworkEndpointGroups( + ProjectName project) { + ListGlobalNetworkEndpointGroupsHttpRequest request = + ListGlobalNetworkEndpointGroupsHttpRequest.newBuilder() + .setProject(project == null ? null : project.toString()) + .build(); + return listGlobalNetworkEndpointGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   ProjectName project = ProjectName.of("[PROJECT]");
+   *   for (NetworkEndpointGroup element : globalNetworkEndpointGroupClient.listGlobalNetworkEndpointGroups(project.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param project Project ID for this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListGlobalNetworkEndpointGroupsPagedResponse listGlobalNetworkEndpointGroups( + String project) { + ListGlobalNetworkEndpointGroupsHttpRequest request = + ListGlobalNetworkEndpointGroupsHttpRequest.newBuilder().setProject(project).build(); + return listGlobalNetworkEndpointGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedProject = ProjectName.format("[PROJECT]");
+   *   ListGlobalNetworkEndpointGroupsHttpRequest request = ListGlobalNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setProject(formattedProject)
+   *     .build();
+   *   for (NetworkEndpointGroup element : globalNetworkEndpointGroupClient.listGlobalNetworkEndpointGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListGlobalNetworkEndpointGroupsPagedResponse listGlobalNetworkEndpointGroups( + ListGlobalNetworkEndpointGroupsHttpRequest request) { + return listGlobalNetworkEndpointGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedProject = ProjectName.format("[PROJECT]");
+   *   ListGlobalNetworkEndpointGroupsHttpRequest request = ListGlobalNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setProject(formattedProject)
+   *     .build();
+   *   ApiFuture<ListGlobalNetworkEndpointGroupsPagedResponse> future = globalNetworkEndpointGroupClient.listGlobalNetworkEndpointGroupsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (NetworkEndpointGroup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListGlobalNetworkEndpointGroupsHttpRequest, ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsPagedCallable() { + return stub.listGlobalNetworkEndpointGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the list of network endpoint groups that are located in the specified project. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedProject = ProjectName.format("[PROJECT]");
+   *   ListGlobalNetworkEndpointGroupsHttpRequest request = ListGlobalNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setProject(formattedProject)
+   *     .build();
+   *   while (true) {
+   *     NetworkEndpointGroupList response = globalNetworkEndpointGroupClient.listGlobalNetworkEndpointGroupsCallable().call(request);
+   *     for (NetworkEndpointGroup element : response.getItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + listGlobalNetworkEndpointGroupsCallable() { + return stub.listGlobalNetworkEndpointGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the network endpoints in the specified network endpoint group. + * + *

Sample code: + * + *


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

Sample code: + * + *


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

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   for (NetworkEndpointWithHealthStatus element : globalNetworkEndpointGroupClient.listNetworkEndpointsGlobalNetworkEndpointGroups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse + listNetworkEndpointsGlobalNetworkEndpointGroups( + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest request) { + return listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the network endpoints in the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   ApiFuture<ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> future = globalNetworkEndpointGroupClient.listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (NetworkEndpointWithHealthStatus element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable() { + return stub.listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the network endpoints in the specified network endpoint group. + * + *

Sample code: + * + *


+   * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+   *   String formattedNetworkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.format("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+   *   ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setNetworkEndpointGroup(formattedNetworkEndpointGroup)
+   *     .build();
+   *   while (true) {
+   *     NetworkEndpointGroupsListNetworkEndpoints response = globalNetworkEndpointGroupClient.listNetworkEndpointsGlobalNetworkEndpointGroupsCallable().call(request);
+   *     for (NetworkEndpointWithHealthStatus element : response.getItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsGlobalNetworkEndpointGroupsCallable() { + return stub.listNetworkEndpointsGlobalNetworkEndpointGroupsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListGlobalNetworkEndpointGroupsPagedResponse + extends AbstractPagedListResponse< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup, + ListGlobalNetworkEndpointGroupsPage, + ListGlobalNetworkEndpointGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListGlobalNetworkEndpointGroupsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListGlobalNetworkEndpointGroupsPage, ListGlobalNetworkEndpointGroupsPagedResponse>() { + @Override + public ListGlobalNetworkEndpointGroupsPagedResponse apply( + ListGlobalNetworkEndpointGroupsPage input) { + return new ListGlobalNetworkEndpointGroupsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListGlobalNetworkEndpointGroupsPagedResponse(ListGlobalNetworkEndpointGroupsPage page) { + super(page, ListGlobalNetworkEndpointGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListGlobalNetworkEndpointGroupsPage + extends AbstractPage< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup, + ListGlobalNetworkEndpointGroupsPage> { + + private ListGlobalNetworkEndpointGroupsPage( + PageContext< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + context, + NetworkEndpointGroupList response) { + super(context, response); + } + + private static ListGlobalNetworkEndpointGroupsPage createEmptyPage() { + return new ListGlobalNetworkEndpointGroupsPage(null, null); + } + + @Override + protected ListGlobalNetworkEndpointGroupsPage createPage( + PageContext< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + context, + NetworkEndpointGroupList response) { + return new ListGlobalNetworkEndpointGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListGlobalNetworkEndpointGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup, + ListGlobalNetworkEndpointGroupsPage, + ListGlobalNetworkEndpointGroupsFixedSizeCollection> { + + private ListGlobalNetworkEndpointGroupsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListGlobalNetworkEndpointGroupsFixedSizeCollection createEmptyCollection() { + return new ListGlobalNetworkEndpointGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListGlobalNetworkEndpointGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListGlobalNetworkEndpointGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse + extends AbstractPagedListResponse< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPage, + ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection> { + + public static ApiFuture + createAsync( + PageContext< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNetworkEndpointsGlobalNetworkEndpointGroupsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListNetworkEndpointsGlobalNetworkEndpointGroupsPage, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse>() { + @Override + public ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse apply( + ListNetworkEndpointsGlobalNetworkEndpointGroupsPage input) { + return new ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse( + ListNetworkEndpointsGlobalNetworkEndpointGroupsPage page) { + super( + page, + ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection + .createEmptyCollection()); + } + } + + public static class ListNetworkEndpointsGlobalNetworkEndpointGroupsPage + extends AbstractPage< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPage> { + + private ListNetworkEndpointsGlobalNetworkEndpointGroupsPage( + PageContext< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + context, + NetworkEndpointGroupsListNetworkEndpoints response) { + super(context, response); + } + + private static ListNetworkEndpointsGlobalNetworkEndpointGroupsPage createEmptyPage() { + return new ListNetworkEndpointsGlobalNetworkEndpointGroupsPage(null, null); + } + + @Override + protected ListNetworkEndpointsGlobalNetworkEndpointGroupsPage createPage( + PageContext< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + context, + NetworkEndpointGroupsListNetworkEndpoints response) { + return new ListNetworkEndpointsGlobalNetworkEndpointGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPage, + ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection> { + + private ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection + createEmptyCollection() { + return new ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNetworkEndpointsGlobalNetworkEndpointGroupsFixedSizeCollection( + pages, collectionSize); + } + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupSettings.java b/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupSettings.java new file mode 100644 index 000000000..699a40fe2 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupSettings.java @@ -0,0 +1,305 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListGlobalNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.compute.v1.stub.GlobalNetworkEndpointGroupStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link GlobalNetworkEndpointGroupClient}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of attachNetworkEndpointsGlobalNetworkEndpointGroup to + * 30 seconds: + * + *

+ * 
+ * GlobalNetworkEndpointGroupSettings.Builder globalNetworkEndpointGroupSettingsBuilder =
+ *     GlobalNetworkEndpointGroupSettings.newBuilder();
+ * globalNetworkEndpointGroupSettingsBuilder
+ *     .attachNetworkEndpointsGlobalNetworkEndpointGroupSettings()
+ *     .setRetrySettings(
+ *         globalNetworkEndpointGroupSettingsBuilder.attachNetworkEndpointsGlobalNetworkEndpointGroupSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GlobalNetworkEndpointGroupSettings globalNetworkEndpointGroupSettings = globalNetworkEndpointGroupSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class GlobalNetworkEndpointGroupSettings + extends ClientSettings { + /** + * Returns the object with the settings used for calls to + * attachNetworkEndpointsGlobalNetworkEndpointGroup. + */ + public UnaryCallSettings + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings() { + return ((GlobalNetworkEndpointGroupStubSettings) getStubSettings()) + .attachNetworkEndpointsGlobalNetworkEndpointGroupSettings(); + } + + /** Returns the object with the settings used for calls to deleteGlobalNetworkEndpointGroup. */ + public UnaryCallSettings + deleteGlobalNetworkEndpointGroupSettings() { + return ((GlobalNetworkEndpointGroupStubSettings) getStubSettings()) + .deleteGlobalNetworkEndpointGroupSettings(); + } + + /** + * Returns the object with the settings used for calls to + * detachNetworkEndpointsGlobalNetworkEndpointGroup. + */ + public UnaryCallSettings + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings() { + return ((GlobalNetworkEndpointGroupStubSettings) getStubSettings()) + .detachNetworkEndpointsGlobalNetworkEndpointGroupSettings(); + } + + /** Returns the object with the settings used for calls to getGlobalNetworkEndpointGroup. */ + public UnaryCallSettings + getGlobalNetworkEndpointGroupSettings() { + return ((GlobalNetworkEndpointGroupStubSettings) getStubSettings()) + .getGlobalNetworkEndpointGroupSettings(); + } + + /** Returns the object with the settings used for calls to insertGlobalNetworkEndpointGroup. */ + public UnaryCallSettings + insertGlobalNetworkEndpointGroupSettings() { + return ((GlobalNetworkEndpointGroupStubSettings) getStubSettings()) + .insertGlobalNetworkEndpointGroupSettings(); + } + + /** Returns the object with the settings used for calls to listGlobalNetworkEndpointGroups. */ + public PagedCallSettings< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsSettings() { + return ((GlobalNetworkEndpointGroupStubSettings) getStubSettings()) + .listGlobalNetworkEndpointGroupsSettings(); + } + + /** + * Returns the object with the settings used for calls to + * listNetworkEndpointsGlobalNetworkEndpointGroups. + */ + public PagedCallSettings< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings() { + return ((GlobalNetworkEndpointGroupStubSettings) getStubSettings()) + .listNetworkEndpointsGlobalNetworkEndpointGroupsSettings(); + } + + public static final GlobalNetworkEndpointGroupSettings create( + GlobalNetworkEndpointGroupStubSettings stub) throws IOException { + return new GlobalNetworkEndpointGroupSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return GlobalNetworkEndpointGroupStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return GlobalNetworkEndpointGroupStubSettings.getDefaultEndpoint(); + } + /** Returns the default service port. */ + public static int getDefaultServicePort() { + return GlobalNetworkEndpointGroupStubSettings.getDefaultServicePort(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return GlobalNetworkEndpointGroupStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GlobalNetworkEndpointGroupStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return GlobalNetworkEndpointGroupStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return GlobalNetworkEndpointGroupStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GlobalNetworkEndpointGroupStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GlobalNetworkEndpointGroupSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for GlobalNetworkEndpointGroupSettings. */ + public static class Builder + extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(GlobalNetworkEndpointGroupStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(GlobalNetworkEndpointGroupStubSettings.newBuilder()); + } + + protected Builder(GlobalNetworkEndpointGroupSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(GlobalNetworkEndpointGroupStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public GlobalNetworkEndpointGroupStubSettings.Builder getStubSettingsBuilder() { + return ((GlobalNetworkEndpointGroupStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** + * Returns the builder for the settings used for calls to + * attachNetworkEndpointsGlobalNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().attachNetworkEndpointsGlobalNetworkEndpointGroupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteGlobalNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + deleteGlobalNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().deleteGlobalNetworkEndpointGroupSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * detachNetworkEndpointsGlobalNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().detachNetworkEndpointsGlobalNetworkEndpointGroupSettings(); + } + + /** Returns the builder for the settings used for calls to getGlobalNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + getGlobalNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().getGlobalNetworkEndpointGroupSettings(); + } + + /** Returns the builder for the settings used for calls to insertGlobalNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + insertGlobalNetworkEndpointGroupSettings() { + return getStubSettingsBuilder().insertGlobalNetworkEndpointGroupSettings(); + } + + /** Returns the builder for the settings used for calls to listGlobalNetworkEndpointGroups. */ + public PagedCallSettings.Builder< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsSettings() { + return getStubSettingsBuilder().listGlobalNetworkEndpointGroupsSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * listNetworkEndpointsGlobalNetworkEndpointGroups. + */ + public PagedCallSettings.Builder< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings() { + return getStubSettingsBuilder().listNetworkEndpointsGlobalNetworkEndpointGroupsSettings(); + } + + @Override + public GlobalNetworkEndpointGroupSettings build() throws IOException { + return new GlobalNetworkEndpointGroupSettings(this); + } + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsAttachEndpointsRequest.java b/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsAttachEndpointsRequest.java new file mode 100644 index 000000000..2aeaa4b9f --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsAttachEndpointsRequest.java @@ -0,0 +1,170 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 GlobalNetworkEndpointGroupsAttachEndpointsRequest implements ApiMessage { + private final List networkEndpoints; + + private GlobalNetworkEndpointGroupsAttachEndpointsRequest() { + this.networkEndpoints = null; + } + + private GlobalNetworkEndpointGroupsAttachEndpointsRequest( + List networkEndpoints) { + this.networkEndpoints = networkEndpoints; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("networkEndpoints".equals(fieldName)) { + return networkEndpoints; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** The list of network endpoints to be attached. */ + public List getNetworkEndpointsList() { + return networkEndpoints; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(GlobalNetworkEndpointGroupsAttachEndpointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static GlobalNetworkEndpointGroupsAttachEndpointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final GlobalNetworkEndpointGroupsAttachEndpointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new GlobalNetworkEndpointGroupsAttachEndpointsRequest(); + } + + public static class Builder { + private List networkEndpoints; + + Builder() {} + + public Builder mergeFrom(GlobalNetworkEndpointGroupsAttachEndpointsRequest other) { + if (other == GlobalNetworkEndpointGroupsAttachEndpointsRequest.getDefaultInstance()) + return this; + if (other.getNetworkEndpointsList() != null) { + this.networkEndpoints = other.networkEndpoints; + } + return this; + } + + Builder(GlobalNetworkEndpointGroupsAttachEndpointsRequest source) { + this.networkEndpoints = source.networkEndpoints; + } + + /** The list of network endpoints to be attached. */ + public List getNetworkEndpointsList() { + return networkEndpoints; + } + + /** The list of network endpoints to be attached. */ + public Builder addAllNetworkEndpoints(List networkEndpoints) { + if (this.networkEndpoints == null) { + this.networkEndpoints = new LinkedList<>(); + } + this.networkEndpoints.addAll(networkEndpoints); + return this; + } + + /** The list of network endpoints to be attached. */ + public Builder addNetworkEndpoints(NetworkEndpoint networkEndpoints) { + if (this.networkEndpoints == null) { + this.networkEndpoints = new LinkedList<>(); + } + this.networkEndpoints.add(networkEndpoints); + return this; + } + + public GlobalNetworkEndpointGroupsAttachEndpointsRequest build() { + return new GlobalNetworkEndpointGroupsAttachEndpointsRequest(networkEndpoints); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllNetworkEndpoints(this.networkEndpoints); + return newBuilder; + } + } + + @Override + public String toString() { + return "GlobalNetworkEndpointGroupsAttachEndpointsRequest{" + + "networkEndpoints=" + + networkEndpoints + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof GlobalNetworkEndpointGroupsAttachEndpointsRequest) { + GlobalNetworkEndpointGroupsAttachEndpointsRequest that = + (GlobalNetworkEndpointGroupsAttachEndpointsRequest) o; + return Objects.equals(this.networkEndpoints, that.getNetworkEndpointsList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(networkEndpoints); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsDetachEndpointsRequest.java b/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsDetachEndpointsRequest.java new file mode 100644 index 000000000..309d3a411 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsDetachEndpointsRequest.java @@ -0,0 +1,170 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 GlobalNetworkEndpointGroupsDetachEndpointsRequest implements ApiMessage { + private final List networkEndpoints; + + private GlobalNetworkEndpointGroupsDetachEndpointsRequest() { + this.networkEndpoints = null; + } + + private GlobalNetworkEndpointGroupsDetachEndpointsRequest( + List networkEndpoints) { + this.networkEndpoints = networkEndpoints; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("networkEndpoints".equals(fieldName)) { + return networkEndpoints; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** The list of network endpoints to be detached. */ + public List getNetworkEndpointsList() { + return networkEndpoints; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(GlobalNetworkEndpointGroupsDetachEndpointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static GlobalNetworkEndpointGroupsDetachEndpointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final GlobalNetworkEndpointGroupsDetachEndpointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new GlobalNetworkEndpointGroupsDetachEndpointsRequest(); + } + + public static class Builder { + private List networkEndpoints; + + Builder() {} + + public Builder mergeFrom(GlobalNetworkEndpointGroupsDetachEndpointsRequest other) { + if (other == GlobalNetworkEndpointGroupsDetachEndpointsRequest.getDefaultInstance()) + return this; + if (other.getNetworkEndpointsList() != null) { + this.networkEndpoints = other.networkEndpoints; + } + return this; + } + + Builder(GlobalNetworkEndpointGroupsDetachEndpointsRequest source) { + this.networkEndpoints = source.networkEndpoints; + } + + /** The list of network endpoints to be detached. */ + public List getNetworkEndpointsList() { + return networkEndpoints; + } + + /** The list of network endpoints to be detached. */ + public Builder addAllNetworkEndpoints(List networkEndpoints) { + if (this.networkEndpoints == null) { + this.networkEndpoints = new LinkedList<>(); + } + this.networkEndpoints.addAll(networkEndpoints); + return this; + } + + /** The list of network endpoints to be detached. */ + public Builder addNetworkEndpoints(NetworkEndpoint networkEndpoints) { + if (this.networkEndpoints == null) { + this.networkEndpoints = new LinkedList<>(); + } + this.networkEndpoints.add(networkEndpoints); + return this; + } + + public GlobalNetworkEndpointGroupsDetachEndpointsRequest build() { + return new GlobalNetworkEndpointGroupsDetachEndpointsRequest(networkEndpoints); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllNetworkEndpoints(this.networkEndpoints); + return newBuilder; + } + } + + @Override + public String toString() { + return "GlobalNetworkEndpointGroupsDetachEndpointsRequest{" + + "networkEndpoints=" + + networkEndpoints + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof GlobalNetworkEndpointGroupsDetachEndpointsRequest) { + GlobalNetworkEndpointGroupsDetachEndpointsRequest that = + (GlobalNetworkEndpointGroupsDetachEndpointsRequest) o; + return Objects.equals(this.networkEndpoints, that.getNetworkEndpointsList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(networkEndpoints); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/GlobalOperationClient.java b/src/main/java/com/google/cloud/compute/v1/GlobalOperationClient.java index 5a79fbaec..e28bfce87 100644 --- a/src/main/java/com/google/cloud/compute/v1/GlobalOperationClient.java +++ b/src/main/java/com/google/cloud/compute/v1/GlobalOperationClient.java @@ -162,21 +162,29 @@ public GlobalOperationStub getStub() { * *


    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (OperationsScopedList element : globalOperationClient.aggregatedListGlobalOperations(project).iterateAll()) {
+   *   for (OperationsScopedList element : globalOperationClient.aggregatedListGlobalOperations(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOperations( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListGlobalOperationsHttpRequest request = AggregatedListGlobalOperationsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListGlobalOperations(request); @@ -190,21 +198,31 @@ public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOpe * *

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (OperationsScopedList element : globalOperationClient.aggregatedListGlobalOperations(project.toString()).iterateAll()) {
+   *   for (OperationsScopedList element : globalOperationClient.aggregatedListGlobalOperations(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOperations( - String project) { + Boolean includeAllScopes, String project) { AggregatedListGlobalOperationsHttpRequest request = - AggregatedListGlobalOperationsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListGlobalOperationsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListGlobalOperations(request); } @@ -216,8 +234,10 @@ public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOpe * *

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListGlobalOperationsHttpRequest request = AggregatedListGlobalOperationsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (OperationsScopedList element : globalOperationClient.aggregatedListGlobalOperations(request).iterateAll()) {
@@ -243,8 +263,10 @@ public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOpe
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListGlobalOperationsHttpRequest request = AggregatedListGlobalOperationsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListGlobalOperationsPagedResponse> future = globalOperationClient.aggregatedListGlobalOperationsPagedCallable().futureCall(request);
@@ -270,8 +292,10 @@ public final AggregatedListGlobalOperationsPagedResponse aggregatedListGlobalOpe
    *
    * 

    * try (GlobalOperationClient globalOperationClient = GlobalOperationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListGlobalOperationsHttpRequest request = AggregatedListGlobalOperationsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/HealthCheck.java b/src/main/java/com/google/cloud/compute/v1/HealthCheck.java
index 1a4720c61..fb6de9812 100644
--- a/src/main/java/com/google/cloud/compute/v1/HealthCheck.java
+++ b/src/main/java/com/google/cloud/compute/v1/HealthCheck.java
@@ -29,8 +29,8 @@
  *
  * 

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more information, diff --git a/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java b/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java index 77dc8f148..6b414f0f4 100644 --- a/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java +++ b/src/main/java/com/google/cloud/compute/v1/HealthCheckClient.java @@ -161,21 +161,29 @@ public HealthCheckStub getStub() { * *


    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (HealthChecksScopedList element : healthCheckClient.aggregatedListHealthChecks(project).iterateAll()) {
+   *   for (HealthChecksScopedList element : healthCheckClient.aggregatedListHealthChecks(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListHealthChecksPagedResponse aggregatedListHealthChecks( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListHealthChecksHttpRequest request = AggregatedListHealthChecksHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListHealthChecks(request); @@ -190,20 +198,31 @@ public final AggregatedListHealthChecksPagedResponse aggregatedListHealthChecks( * *

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (HealthChecksScopedList element : healthCheckClient.aggregatedListHealthChecks(project.toString()).iterateAll()) {
+   *   for (HealthChecksScopedList element : healthCheckClient.aggregatedListHealthChecks(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListHealthChecksPagedResponse aggregatedListHealthChecks(String project) { + public final AggregatedListHealthChecksPagedResponse aggregatedListHealthChecks( + Boolean includeAllScopes, String project) { AggregatedListHealthChecksHttpRequest request = - AggregatedListHealthChecksHttpRequest.newBuilder().setProject(project).build(); + AggregatedListHealthChecksHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListHealthChecks(request); } @@ -216,8 +235,10 @@ public final AggregatedListHealthChecksPagedResponse aggregatedListHealthChecks( * *

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListHealthChecksHttpRequest request = AggregatedListHealthChecksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (HealthChecksScopedList element : healthCheckClient.aggregatedListHealthChecks(request).iterateAll()) {
@@ -244,8 +265,10 @@ public final AggregatedListHealthChecksPagedResponse aggregatedListHealthChecks(
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListHealthChecksHttpRequest request = AggregatedListHealthChecksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListHealthChecksPagedResponse> future = healthCheckClient.aggregatedListHealthChecksPagedCallable().futureCall(request);
@@ -272,8 +295,10 @@ public final AggregatedListHealthChecksPagedResponse aggregatedListHealthChecks(
    *
    * 

    * try (HealthCheckClient healthCheckClient = HealthCheckClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListHealthChecksHttpRequest request = AggregatedListHealthChecksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -508,8 +533,8 @@ public final UnaryCallable getHealthChec
    * @param project Project ID for this request.
    * @param healthCheckResource Represents a Health Check resource.
    *     

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -544,8 +569,8 @@ public final Operation insertHealthCheck(ProjectName project, HealthCheck health * @param project Project ID for this request. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -770,8 +795,8 @@ public final ListHealthChecksPagedResponse listHealthChecks(ListHealthChecksHttp * @param healthCheck Name of the HealthCheck resource to patch. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -816,8 +841,8 @@ public final Operation patchHealthCheck( * @param healthCheck Name of the HealthCheck resource to patch. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -916,8 +941,8 @@ public final UnaryCallable patchHealthCh * @param healthCheck Name of the HealthCheck resource to update. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -961,8 +986,8 @@ public final Operation updateHealthCheck( * @param healthCheck Name of the HealthCheck resource to update. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. diff --git a/src/main/java/com/google/cloud/compute/v1/HostRule.java b/src/main/java/com/google/cloud/compute/v1/HostRule.java index 91a11ea6a..26009a979 100644 --- a/src/main/java/com/google/cloud/compute/v1/HostRule.java +++ b/src/main/java/com/google/cloud/compute/v1/HostRule.java @@ -86,9 +86,9 @@ public String getDescription() { } /** - * The list of host patterns to match. They must be valid hostnames, except * will match any - * string of ([a-z0-9-.]*). In that case, * must be the first character and must be - * followed in the pattern by either - or .. + * The list of host patterns to match. They must be valid hostnames with optional port numbers in + * the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must + * be the first character and must be followed in the pattern by either - or .. */ public List getHostsList() { return hosts; @@ -167,18 +167,18 @@ public Builder setDescription(String description) { } /** - * The list of host patterns to match. They must be valid hostnames, except * will match any - * string of ([a-z0-9-.]*). In that case, * must be the first character and must be - * followed in the pattern by either - or .. + * The list of host patterns to match. They must be valid hostnames with optional port numbers + * in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * + * must be the first character and must be followed in the pattern by either - or .. */ public List getHostsList() { return hosts; } /** - * The list of host patterns to match. They must be valid hostnames, except * will match any - * string of ([a-z0-9-.]*). In that case, * must be the first character and must be - * followed in the pattern by either - or .. + * The list of host patterns to match. They must be valid hostnames with optional port numbers + * in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * + * must be the first character and must be followed in the pattern by either - or .. */ public Builder addAllHosts(List hosts) { if (this.hosts == null) { @@ -189,9 +189,9 @@ public Builder addAllHosts(List hosts) { } /** - * The list of host patterns to match. They must be valid hostnames, except * will match any - * string of ([a-z0-9-.]*). In that case, * must be the first character and must be - * followed in the pattern by either - or .. + * The list of host patterns to match. They must be valid hostnames with optional port numbers + * in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * + * must be the first character and must be followed in the pattern by either - or .. */ public Builder addHosts(String hosts) { if (this.hosts == null) { diff --git a/src/main/java/com/google/cloud/compute/v1/Image.java b/src/main/java/com/google/cloud/compute/v1/Image.java index 7e0685f55..803c939b7 100644 --- a/src/main/java/com/google/cloud/compute/v1/Image.java +++ b/src/main/java/com/google/cloud/compute/v1/Image.java @@ -50,6 +50,7 @@ public final class Image implements ApiMessage { private final String name; private final RawDisk rawDisk; private final String selfLink; + private final InitialStateConfig shieldedInstanceInitialState; private final String sourceDisk; private final CustomerEncryptionKey sourceDiskEncryptionKey; private final String sourceDiskId; @@ -81,6 +82,7 @@ private Image() { this.name = null; this.rawDisk = null; this.selfLink = null; + this.shieldedInstanceInitialState = null; this.sourceDisk = null; this.sourceDiskEncryptionKey = null; this.sourceDiskId = null; @@ -113,6 +115,7 @@ private Image( String name, RawDisk rawDisk, String selfLink, + InitialStateConfig shieldedInstanceInitialState, String sourceDisk, CustomerEncryptionKey sourceDiskEncryptionKey, String sourceDiskId, @@ -142,6 +145,7 @@ private Image( this.name = name; this.rawDisk = rawDisk; this.selfLink = selfLink; + this.shieldedInstanceInitialState = shieldedInstanceInitialState; this.sourceDisk = sourceDisk; this.sourceDiskEncryptionKey = sourceDiskEncryptionKey; this.sourceDiskId = sourceDiskId; @@ -209,6 +213,9 @@ public Object getFieldValue(String fieldName) { if ("selfLink".equals(fieldName)) { return selfLink; } + if ("shieldedInstanceInitialState".equals(fieldName)) { + return shieldedInstanceInitialState; + } if ("sourceDisk".equals(fieldName)) { return sourceDisk; } @@ -387,6 +394,11 @@ public String getSelfLink() { return selfLink; } + /** Set the secure boot keys of shielded instance. */ + public InitialStateConfig getShieldedInstanceInitialState() { + return shieldedInstanceInitialState; + } + /** * URL of the source disk used to create this image. This can be a full or valid partial URL. You * must provide either this property or the rawDisk.source property but not both to create an @@ -526,6 +538,7 @@ public static class Builder { private String name; private RawDisk rawDisk; private String selfLink; + private InitialStateConfig shieldedInstanceInitialState; private String sourceDisk; private CustomerEncryptionKey sourceDiskEncryptionKey; private String sourceDiskId; @@ -594,6 +607,9 @@ public Builder mergeFrom(Image other) { if (other.getSelfLink() != null) { this.selfLink = other.selfLink; } + if (other.getShieldedInstanceInitialState() != null) { + this.shieldedInstanceInitialState = other.shieldedInstanceInitialState; + } if (other.getSourceDisk() != null) { this.sourceDisk = other.sourceDisk; } @@ -651,6 +667,7 @@ public Builder mergeFrom(Image other) { this.name = source.name; this.rawDisk = source.rawDisk; this.selfLink = source.selfLink; + this.shieldedInstanceInitialState = source.shieldedInstanceInitialState; this.sourceDisk = source.sourceDisk; this.sourceDiskEncryptionKey = source.sourceDiskEncryptionKey; this.sourceDiskId = source.sourceDiskId; @@ -965,6 +982,18 @@ public Builder setSelfLink(String selfLink) { return this; } + /** Set the secure boot keys of shielded instance. */ + public InitialStateConfig getShieldedInstanceInitialState() { + return shieldedInstanceInitialState; + } + + /** Set the secure boot keys of shielded instance. */ + public Builder setShieldedInstanceInitialState( + InitialStateConfig shieldedInstanceInitialState) { + this.shieldedInstanceInitialState = shieldedInstanceInitialState; + return this; + } + /** * URL of the source disk used to create this image. This can be a full or valid partial URL. * You must provide either this property or the rawDisk.source property but not both to create @@ -1208,6 +1237,7 @@ public Image build() { name, rawDisk, selfLink, + shieldedInstanceInitialState, sourceDisk, sourceDiskEncryptionKey, sourceDiskId, @@ -1241,6 +1271,7 @@ public Builder clone() { newBuilder.setName(this.name); newBuilder.setRawDisk(this.rawDisk); newBuilder.setSelfLink(this.selfLink); + newBuilder.setShieldedInstanceInitialState(this.shieldedInstanceInitialState); newBuilder.setSourceDisk(this.sourceDisk); newBuilder.setSourceDiskEncryptionKey(this.sourceDiskEncryptionKey); newBuilder.setSourceDiskId(this.sourceDiskId); @@ -1311,6 +1342,9 @@ public String toString() { + "selfLink=" + selfLink + ", " + + "shieldedInstanceInitialState=" + + shieldedInstanceInitialState + + ", " + "sourceDisk=" + sourceDisk + ", " @@ -1373,6 +1407,8 @@ public boolean equals(Object o) { && Objects.equals(this.name, that.getName()) && Objects.equals(this.rawDisk, that.getRawDisk()) && Objects.equals(this.selfLink, that.getSelfLink()) + && Objects.equals( + this.shieldedInstanceInitialState, that.getShieldedInstanceInitialState()) && Objects.equals(this.sourceDisk, that.getSourceDisk()) && Objects.equals(this.sourceDiskEncryptionKey, that.getSourceDiskEncryptionKey()) && Objects.equals(this.sourceDiskId, that.getSourceDiskId()) @@ -1409,6 +1445,7 @@ public int hashCode() { name, rawDisk, selfLink, + shieldedInstanceInitialState, sourceDisk, sourceDiskEncryptionKey, sourceDiskId, diff --git a/src/main/java/com/google/cloud/compute/v1/InitialStateConfig.java b/src/main/java/com/google/cloud/compute/v1/InitialStateConfig.java new file mode 100644 index 000000000..f3d8f2bca --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/InitialStateConfig.java @@ -0,0 +1,293 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 +/** Initial State for shielded instance, these are public keys which are safe to store in public */ +public final class InitialStateConfig implements ApiMessage { + private final List dbs; + private final List dbxs; + private final List keks; + private final FileContentBuffer pk; + + private InitialStateConfig() { + this.dbs = null; + this.dbxs = null; + this.keks = null; + this.pk = null; + } + + private InitialStateConfig( + List dbs, + List dbxs, + List keks, + FileContentBuffer pk) { + this.dbs = dbs; + this.dbxs = dbxs; + this.keks = keks; + this.pk = pk; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("dbs".equals(fieldName)) { + return dbs; + } + if ("dbxs".equals(fieldName)) { + return dbxs; + } + if ("keks".equals(fieldName)) { + return keks; + } + if ("pk".equals(fieldName)) { + return pk; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** The Key Database (db). */ + public List getDbsList() { + return dbs; + } + + /** The forbidden key database (dbx). */ + public List getDbxsList() { + return dbxs; + } + + /** The Key Exchange Key (KEK). */ + public List getKeksList() { + return keks; + } + + /** The Platform Key (PK). */ + public FileContentBuffer getPk() { + return pk; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InitialStateConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InitialStateConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InitialStateConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InitialStateConfig(); + } + + public static class Builder { + private List dbs; + private List dbxs; + private List keks; + private FileContentBuffer pk; + + Builder() {} + + public Builder mergeFrom(InitialStateConfig other) { + if (other == InitialStateConfig.getDefaultInstance()) return this; + if (other.getDbsList() != null) { + this.dbs = other.dbs; + } + if (other.getDbxsList() != null) { + this.dbxs = other.dbxs; + } + if (other.getKeksList() != null) { + this.keks = other.keks; + } + if (other.getPk() != null) { + this.pk = other.pk; + } + return this; + } + + Builder(InitialStateConfig source) { + this.dbs = source.dbs; + this.dbxs = source.dbxs; + this.keks = source.keks; + this.pk = source.pk; + } + + /** The Key Database (db). */ + public List getDbsList() { + return dbs; + } + + /** The Key Database (db). */ + public Builder addAllDbs(List dbs) { + if (this.dbs == null) { + this.dbs = new LinkedList<>(); + } + this.dbs.addAll(dbs); + return this; + } + + /** The Key Database (db). */ + public Builder addDbs(FileContentBuffer dbs) { + if (this.dbs == null) { + this.dbs = new LinkedList<>(); + } + this.dbs.add(dbs); + return this; + } + + /** The forbidden key database (dbx). */ + public List getDbxsList() { + return dbxs; + } + + /** The forbidden key database (dbx). */ + public Builder addAllDbxs(List dbxs) { + if (this.dbxs == null) { + this.dbxs = new LinkedList<>(); + } + this.dbxs.addAll(dbxs); + return this; + } + + /** The forbidden key database (dbx). */ + public Builder addDbxs(FileContentBuffer dbxs) { + if (this.dbxs == null) { + this.dbxs = new LinkedList<>(); + } + this.dbxs.add(dbxs); + return this; + } + + /** The Key Exchange Key (KEK). */ + public List getKeksList() { + return keks; + } + + /** The Key Exchange Key (KEK). */ + public Builder addAllKeks(List keks) { + if (this.keks == null) { + this.keks = new LinkedList<>(); + } + this.keks.addAll(keks); + return this; + } + + /** The Key Exchange Key (KEK). */ + public Builder addKeks(FileContentBuffer keks) { + if (this.keks == null) { + this.keks = new LinkedList<>(); + } + this.keks.add(keks); + return this; + } + + /** The Platform Key (PK). */ + public FileContentBuffer getPk() { + return pk; + } + + /** The Platform Key (PK). */ + public Builder setPk(FileContentBuffer pk) { + this.pk = pk; + return this; + } + + public InitialStateConfig build() { + + return new InitialStateConfig(dbs, dbxs, keks, pk); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllDbs(this.dbs); + newBuilder.addAllDbxs(this.dbxs); + newBuilder.addAllKeks(this.keks); + newBuilder.setPk(this.pk); + return newBuilder; + } + } + + @Override + public String toString() { + return "InitialStateConfig{" + + "dbs=" + + dbs + + ", " + + "dbxs=" + + dbxs + + ", " + + "keks=" + + keks + + ", " + + "pk=" + + pk + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InitialStateConfig) { + InitialStateConfig that = (InitialStateConfig) o; + return Objects.equals(this.dbs, that.getDbsList()) + && Objects.equals(this.dbxs, that.getDbxsList()) + && Objects.equals(this.keks, that.getKeksList()) + && Objects.equals(this.pk, that.getPk()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(dbs, dbxs, keks, pk); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/InsertAutoscalerHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertAutoscalerHttpRequest.java index 6f5ab324c..6beb00059 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertAutoscalerHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertAutoscalerHttpRequest.java @@ -139,8 +139,8 @@ public String getAccessToken() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups of @@ -313,8 +313,8 @@ public Builder setAccessToken(String access_token) { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups @@ -334,8 +334,8 @@ public Autoscaler getAutoscalerResource() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups diff --git a/src/main/java/com/google/cloud/compute/v1/InsertBackendServiceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertBackendServiceHttpRequest.java index 8f6d104d2..9d25ebdb8 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertBackendServiceHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertBackendServiceHttpRequest.java @@ -27,8 +27,8 @@ /** * Request object for method compute.backendServices.insert. Creates a BackendService resource in * the specified project using the data included in the request. There are several restrictions and - * guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for - * more information. + * guidelines to keep in mind when creating a backend service. Read Understanding backend services + * for more information. */ public final class InsertBackendServiceHttpRequest implements ApiMessage { private final String access_token; @@ -144,8 +144,8 @@ public String getAccessToken() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -316,8 +316,8 @@ public Builder setAccessToken(String access_token) { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -335,8 +335,8 @@ public BackendService getBackendServiceResource() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * diff --git a/src/main/java/com/google/cloud/compute/v1/InsertDiskHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertDiskHttpRequest.java index 353f16c8c..49d05c1b2 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertDiskHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertDiskHttpRequest.java @@ -153,8 +153,8 @@ public String getCallback() { * *

Google Compute Engine has two Disk resources: * - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) * *

Persistent disks are required for running your VM instances. Create both boot and non-boot * (data) persistent disks. For more information, read Persistent Disks. For more storage options, @@ -345,8 +345,8 @@ public Builder setCallback(String callback) { * *

Google Compute Engine has two Disk resources: * - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) * *

Persistent disks are required for running your VM instances. Create both boot and non-boot * (data) persistent disks. For more information, read Persistent Disks. For more storage @@ -368,8 +368,8 @@ public Disk getDiskResource() { * *

Google Compute Engine has two Disk resources: * - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) * *

Persistent disks are required for running your VM instances. Create both boot and non-boot * (data) persistent disks. For more information, read Persistent Disks. For more storage diff --git a/src/main/java/com/google/cloud/compute/v1/InsertForwardingRuleHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertForwardingRuleHttpRequest.java index 699d53299..421c58dbb 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertForwardingRuleHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertForwardingRuleHttpRequest.java @@ -149,8 +149,8 @@ public String getFields() { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of a * Google Cloud Platform load balancer. Forwarding rules can also reference target instances and @@ -336,8 +336,8 @@ public Builder setFields(String fields) { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of * a Google Cloud Platform load balancer. Forwarding rules can also reference target instances @@ -358,8 +358,8 @@ public ForwardingRule getForwardingRuleResource() { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of * a Google Cloud Platform load balancer. Forwarding rules can also reference target instances diff --git a/src/main/java/com/google/cloud/compute/v1/InsertGlobalForwardingRuleHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertGlobalForwardingRuleHttpRequest.java index c41b154e5..3b436b808 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertGlobalForwardingRuleHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertGlobalForwardingRuleHttpRequest.java @@ -149,8 +149,8 @@ public String getFields() { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of a * Google Cloud Platform load balancer. Forwarding rules can also reference target instances and @@ -336,8 +336,8 @@ public Builder setFields(String fields) { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of * a Google Cloud Platform load balancer. Forwarding rules can also reference target instances @@ -358,8 +358,8 @@ public ForwardingRule getForwardingRuleResource() { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of * a Google Cloud Platform load balancer. Forwarding rules can also reference target instances diff --git a/src/main/java/com/google/cloud/compute/v1/InsertGlobalNetworkEndpointGroupHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertGlobalNetworkEndpointGroupHttpRequest.java new file mode 100644 index 000000000..d476a99d0 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/InsertGlobalNetworkEndpointGroupHttpRequest.java @@ -0,0 +1,557 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.globalNetworkEndpointGroups.insert. Creates a network endpoint + * group in the specified project using the parameters that are included in the request. + */ +public final class InsertGlobalNetworkEndpointGroupHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String key; + private final NetworkEndpointGroup networkEndpointGroupResource; + private final String prettyPrint; + private final String project; + private final String quotaUser; + private final String requestId; + private final String userIp; + + private InsertGlobalNetworkEndpointGroupHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.key = null; + this.networkEndpointGroupResource = null; + this.prettyPrint = null; + this.project = null; + this.quotaUser = null; + this.requestId = null; + this.userIp = null; + } + + private InsertGlobalNetworkEndpointGroupHttpRequest( + String access_token, + String callback, + String fields, + String key, + NetworkEndpointGroup networkEndpointGroupResource, + String prettyPrint, + String project, + String quotaUser, + String requestId, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.key = key; + this.networkEndpointGroupResource = networkEndpointGroupResource; + this.prettyPrint = prettyPrint; + this.project = project; + this.quotaUser = quotaUser; + this.requestId = requestId; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("key".equals(fieldName)) { + return key; + } + if ("networkEndpointGroupResource".equals(fieldName)) { + return networkEndpointGroupResource; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("project".equals(fieldName)) { + return project; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("requestId".equals(fieldName)) { + return requestId; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public NetworkEndpointGroup getApiMessageRequestBody() { + return networkEndpointGroupResource; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * Represents a collection of network endpoints. + * + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 + */ + public NetworkEndpointGroup getNetworkEndpointGroupResource() { + return networkEndpointGroupResource; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** + * Project ID for this request. It must have the format `{project}/global/networkEndpointGroups`. + * \`{project}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), numbers + * (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus + * (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters in length, and + * it * must not start with \`"goog"\`. + */ + public String getProject() { + return project; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InsertGlobalNetworkEndpointGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InsertGlobalNetworkEndpointGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InsertGlobalNetworkEndpointGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InsertGlobalNetworkEndpointGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String key; + private NetworkEndpointGroup networkEndpointGroupResource; + private String prettyPrint; + private String project; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(InsertGlobalNetworkEndpointGroupHttpRequest other) { + if (other == InsertGlobalNetworkEndpointGroupHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNetworkEndpointGroupResource() != null) { + this.networkEndpointGroupResource = other.networkEndpointGroupResource; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getProject() != null) { + this.project = other.project; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(InsertGlobalNetworkEndpointGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.key = source.key; + this.networkEndpointGroupResource = source.networkEndpointGroupResource; + this.prettyPrint = source.prettyPrint; + this.project = source.project; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * Represents a collection of network endpoints. + * + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 + */ + public NetworkEndpointGroup getNetworkEndpointGroupResource() { + return networkEndpointGroupResource; + } + + /** + * Represents a collection of network endpoints. + * + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 + */ + public Builder setNetworkEndpointGroupResource( + NetworkEndpointGroup networkEndpointGroupResource) { + this.networkEndpointGroupResource = networkEndpointGroupResource; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** + * Project ID for this request. It must have the format + * `{project}/global/networkEndpointGroups`. \`{project}\` must start with a letter, and contain + * only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), + * periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be + * between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public String getProject() { + return project; + } + + /** + * Project ID for this request. It must have the format + * `{project}/global/networkEndpointGroups`. \`{project}\` must start with a letter, and contain + * only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), + * periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be + * between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public Builder setProject(String project) { + this.project = project; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public InsertGlobalNetworkEndpointGroupHttpRequest build() { + String missing = ""; + + if (project == null) { + missing += " project"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new InsertGlobalNetworkEndpointGroupHttpRequest( + access_token, + callback, + fields, + key, + networkEndpointGroupResource, + prettyPrint, + project, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setKey(this.key); + newBuilder.setNetworkEndpointGroupResource(this.networkEndpointGroupResource); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setProject(this.project); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "InsertGlobalNetworkEndpointGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "key=" + + key + + ", " + + "networkEndpointGroupResource=" + + networkEndpointGroupResource + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "project=" + + project + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InsertGlobalNetworkEndpointGroupHttpRequest) { + InsertGlobalNetworkEndpointGroupHttpRequest that = + (InsertGlobalNetworkEndpointGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals( + this.networkEndpointGroupResource, that.getNetworkEndpointGroupResource()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.project, that.getProject()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + key, + networkEndpointGroupResource, + prettyPrint, + project, + quotaUser, + requestId, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/InsertHealthCheckHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertHealthCheckHttpRequest.java index daab8d3b5..8bd4b64e5 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertHealthCheckHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertHealthCheckHttpRequest.java @@ -149,8 +149,8 @@ public String getFields() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -333,8 +333,8 @@ public Builder setFields(String fields) { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -352,8 +352,8 @@ public HealthCheck getHealthCheckResource() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more diff --git a/src/main/java/com/google/cloud/compute/v1/InsertLicenseHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertLicenseHttpRequest.java index 94f7f513b..bcd3cf9e4 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertLicenseHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertLicenseHttpRequest.java @@ -26,7 +26,8 @@ @BetaApi /** * Request object for method compute.licenses.insert. Create a License resource in the specified - * project. + * project. Caution This resource is intended for use only by third-party partners who are creating + * Cloud Marketplace images. */ public final class InsertLicenseHttpRequest implements ApiMessage { private final String access_token; @@ -149,7 +150,13 @@ public String getKey() { return key; } - /** A license resource. */ + /** + * Represents a License resource. + * + *

A License represents billing and aggregate usage data for public and marketplace images. + * Caution This resource is intended for use only by third-party partners who are creating Cloud + * Marketplace images. (== resource_for {$api_version}.licenses ==) + */ public License getLicenseResource() { return licenseResource; } @@ -325,12 +332,24 @@ public Builder setKey(String key) { return this; } - /** A license resource. */ + /** + * Represents a License resource. + * + *

A License represents billing and aggregate usage data for public and marketplace images. + * Caution This resource is intended for use only by third-party partners who are creating Cloud + * Marketplace images. (== resource_for {$api_version}.licenses ==) + */ public License getLicenseResource() { return licenseResource; } - /** A license resource. */ + /** + * Represents a License resource. + * + *

A License represents billing and aggregate usage data for public and marketplace images. + * Caution This resource is intended for use only by third-party partners who are creating Cloud + * Marketplace images. (== resource_for {$api_version}.licenses ==) + */ public Builder setLicenseResource(License licenseResource) { this.licenseResource = licenseResource; return this; diff --git a/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupHttpRequest.java index b9a8c3fb0..7376293a6 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupHttpRequest.java @@ -152,8 +152,8 @@ public String getKey() { /** * Represents a collection of network endpoints. * - *

For more information read Setting up network endpoint groups in load balancing. (== - * resource_for {$api_version}.networkEndpointGroups ==) Next ID: 21 + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 */ public NetworkEndpointGroup getNetworkEndpointGroupResource() { return networkEndpointGroupResource; @@ -334,8 +334,8 @@ public Builder setKey(String key) { /** * Represents a collection of network endpoints. * - *

For more information read Setting up network endpoint groups in load balancing. (== - * resource_for {$api_version}.networkEndpointGroups ==) Next ID: 21 + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 */ public NetworkEndpointGroup getNetworkEndpointGroupResource() { return networkEndpointGroupResource; @@ -344,8 +344,8 @@ public NetworkEndpointGroup getNetworkEndpointGroupResource() { /** * Represents a collection of network endpoints. * - *

For more information read Setting up network endpoint groups in load balancing. (== - * resource_for {$api_version}.networkEndpointGroups ==) Next ID: 21 + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 */ public Builder setNetworkEndpointGroupResource( NetworkEndpointGroup networkEndpointGroupResource) { diff --git a/src/main/java/com/google/cloud/compute/v1/InsertNodeTemplateHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertNodeTemplateHttpRequest.java index 517a7ac21..712a85b32 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertNodeTemplateHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertNodeTemplateHttpRequest.java @@ -154,7 +154,7 @@ public String getKey() { * *

You can use a template to define properties for nodes in a node group. For more information, * read Creating node groups and instances. (== resource_for {$api_version}.nodeTemplates ==) (== - * NextID: 18 ==) + * NextID: 19 ==) */ public NodeTemplate getNodeTemplateResource() { return nodeTemplateResource; @@ -336,7 +336,7 @@ public Builder setKey(String key) { * *

You can use a template to define properties for nodes in a node group. For more * information, read Creating node groups and instances. (== resource_for - * {$api_version}.nodeTemplates ==) (== NextID: 18 ==) + * {$api_version}.nodeTemplates ==) (== NextID: 19 ==) */ public NodeTemplate getNodeTemplateResource() { return nodeTemplateResource; @@ -347,7 +347,7 @@ public NodeTemplate getNodeTemplateResource() { * *

You can use a template to define properties for nodes in a node group. For more * information, read Creating node groups and instances. (== resource_for - * {$api_version}.nodeTemplates ==) (== NextID: 18 ==) + * {$api_version}.nodeTemplates ==) (== NextID: 19 ==) */ public Builder setNodeTemplateResource(NodeTemplate nodeTemplateResource) { this.nodeTemplateResource = nodeTemplateResource; diff --git a/src/main/java/com/google/cloud/compute/v1/InsertRegionAutoscalerHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertRegionAutoscalerHttpRequest.java index 1e7a01265..d4eacbf09 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertRegionAutoscalerHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertRegionAutoscalerHttpRequest.java @@ -139,8 +139,8 @@ public String getAccessToken() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups of @@ -313,8 +313,8 @@ public Builder setAccessToken(String access_token) { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups @@ -334,8 +334,8 @@ public Autoscaler getAutoscalerResource() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups diff --git a/src/main/java/com/google/cloud/compute/v1/InsertRegionBackendServiceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertRegionBackendServiceHttpRequest.java index 2538f7d78..2a9e570a6 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertRegionBackendServiceHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertRegionBackendServiceHttpRequest.java @@ -28,7 +28,7 @@ * Request object for method compute.regionBackendServices.insert. Creates a regional BackendService * resource in the specified project using the data included in the request. There are several * restrictions and guidelines to keep in mind when creating a regional backend service. Read - * Restrictions and Guidelines for more information. + * Understanding backend services for more information. */ public final class InsertRegionBackendServiceHttpRequest implements ApiMessage { private final String access_token; @@ -144,8 +144,8 @@ public String getAccessToken() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -316,8 +316,8 @@ public Builder setAccessToken(String access_token) { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -335,8 +335,8 @@ public BackendService getBackendServiceResource() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * diff --git a/src/main/java/com/google/cloud/compute/v1/InsertRegionDiskHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertRegionDiskHttpRequest.java index d8b729160..beef94dd5 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertRegionDiskHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertRegionDiskHttpRequest.java @@ -151,8 +151,8 @@ public String getCallback() { * *

Google Compute Engine has two Disk resources: * - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) * *

Persistent disks are required for running your VM instances. Create both boot and non-boot * (data) persistent disks. For more information, read Persistent Disks. For more storage options, @@ -343,8 +343,8 @@ public Builder setCallback(String callback) { * *

Google Compute Engine has two Disk resources: * - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) * *

Persistent disks are required for running your VM instances. Create both boot and non-boot * (data) persistent disks. For more information, read Persistent Disks. For more storage @@ -366,8 +366,8 @@ public Disk getDiskResource() { * *

Google Compute Engine has two Disk resources: * - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) * *

Persistent disks are required for running your VM instances. Create both boot and non-boot * (data) persistent disks. For more information, read Persistent Disks. For more storage diff --git a/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckHttpRequest.java index 5cc2d9459..c13f95bb0 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckHttpRequest.java @@ -149,8 +149,8 @@ public String getFields() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -333,8 +333,8 @@ public Builder setFields(String fields) { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -352,8 +352,8 @@ public HealthCheck getHealthCheckResource() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more diff --git a/src/main/java/com/google/cloud/compute/v1/InsertRegionSslCertificateHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertRegionSslCertificateHttpRequest.java index e5ad1d8c4..4ca7c2d72 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertRegionSslCertificateHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertRegionSslCertificateHttpRequest.java @@ -192,17 +192,19 @@ public String getRequestId() { * *

Google Compute Engine has two SSL Certificate resources: * - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) + *

* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates) * - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers + *

The sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers * - *

- regionSslCertificates are used by: - internal HTTPS load balancers + *

The regionSslCertificates are used by internal HTTPS load balancers. * - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating and - * Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== resource_for - * {$api_version}.regionSslCertificates ==) Next ID: 17 + *

Optionally, certificate file contents that you upload can contain a set of up to five + * PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this data. + * You can use SSL keys and certificates to secure connections to a load balancer. For more + * information, read Creating and using SSL certificates and SSL certificates quotas and limits. + * (== resource_for {$api_version}.sslCertificates ==) (== resource_for + * {$api_version}.regionSslCertificates ==) */ public SslCertificate getSslCertificateResource() { return sslCertificateResource; @@ -426,17 +428,20 @@ public Builder setRequestId(String requestId) { * *

Google Compute Engine has two SSL Certificate resources: * - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) + *

* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates) * - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers + *

The sslCertificates are used by: - external HTTPS load balancers - SSL proxy load + * balancers * - *

- regionSslCertificates are used by: - internal HTTPS load balancers + *

The regionSslCertificates are used by internal HTTPS load balancers. * - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating - * and Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== - * resource_for {$api_version}.regionSslCertificates ==) Next ID: 17 + *

Optionally, certificate file contents that you upload can contain a set of up to five + * PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this + * data. You can use SSL keys and certificates to secure connections to a load balancer. For + * more information, read Creating and using SSL certificates and SSL certificates quotas and + * limits. (== resource_for {$api_version}.sslCertificates ==) (== resource_for + * {$api_version}.regionSslCertificates ==) */ public SslCertificate getSslCertificateResource() { return sslCertificateResource; @@ -447,17 +452,20 @@ public SslCertificate getSslCertificateResource() { * *

Google Compute Engine has two SSL Certificate resources: * - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) + *

* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates) * - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers + *

The sslCertificates are used by: - external HTTPS load balancers - SSL proxy load + * balancers * - *

- regionSslCertificates are used by: - internal HTTPS load balancers + *

The regionSslCertificates are used by internal HTTPS load balancers. * - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating - * and Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== - * resource_for {$api_version}.regionSslCertificates ==) Next ID: 17 + *

Optionally, certificate file contents that you upload can contain a set of up to five + * PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this + * data. You can use SSL keys and certificates to secure connections to a load balancer. For + * more information, read Creating and using SSL certificates and SSL certificates quotas and + * limits. (== resource_for {$api_version}.sslCertificates ==) (== resource_for + * {$api_version}.regionSslCertificates ==) */ public Builder setSslCertificateResource(SslCertificate sslCertificateResource) { this.sslCertificateResource = sslCertificateResource; diff --git a/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpProxyHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpProxyHttpRequest.java index aff84b872..0c742384a 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpProxyHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpProxyHttpRequest.java @@ -192,8 +192,8 @@ public String getRequestId() { * *

Google Compute Engine has two Target HTTP Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) * *

A target HTTP proxy is a component of GCP HTTP load balancers. * @@ -427,8 +427,8 @@ public Builder setRequestId(String requestId) { * *

Google Compute Engine has two Target HTTP Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) * *

A target HTTP proxy is a component of GCP HTTP load balancers. * @@ -449,8 +449,8 @@ public TargetHttpProxy getTargetHttpProxyResource() { * *

Google Compute Engine has two Target HTTP Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) * *

A target HTTP proxy is a component of GCP HTTP load balancers. * diff --git a/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpsProxyHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpsProxyHttpRequest.java index 55ce17988..876152392 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpsProxyHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpsProxyHttpRequest.java @@ -192,8 +192,8 @@ public String getRequestId() { * *

Google Compute Engine has two Target HTTPS Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) * *

A target HTTPS proxy is a component of GCP HTTPS load balancers. * @@ -427,8 +427,8 @@ public Builder setRequestId(String requestId) { * *

Google Compute Engine has two Target HTTPS Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) * *

A target HTTPS proxy is a component of GCP HTTPS load balancers. * @@ -449,8 +449,8 @@ public TargetHttpsProxy getTargetHttpsProxyResource() { * *

Google Compute Engine has two Target HTTPS Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) * *

A target HTTPS proxy is a component of GCP HTTPS load balancers. * diff --git a/src/main/java/com/google/cloud/compute/v1/InsertRegionUrlMapHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertRegionUrlMapHttpRequest.java index c358bc0d1..0380ec3e4 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertRegionUrlMapHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertRegionUrlMapHttpRequest.java @@ -180,8 +180,8 @@ public String getRequestId() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -395,8 +395,8 @@ public Builder setRequestId(String requestId) { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -421,8 +421,8 @@ public UrlMap getUrlMapResource() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. diff --git a/src/main/java/com/google/cloud/compute/v1/InsertResourcePolicyHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertResourcePolicyHttpRequest.java index c6df3ca07..b48a7f667 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertResourcePolicyHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertResourcePolicyHttpRequest.java @@ -184,6 +184,13 @@ public String getRequestId() { return requestId; } + /** + * Represents a Resource Policy resource. You can use resource policies to schedule actions for + * some Compute Engine resources. For example, you can use them to schedule persistent disk + * snapshots. + * + *

(== resource_for {$api_version}.resourcePolicies ==) + */ public ResourcePolicy getResourcePolicyResource() { return resourcePolicyResource; } @@ -401,10 +408,24 @@ public Builder setRequestId(String requestId) { return this; } + /** + * Represents a Resource Policy resource. You can use resource policies to schedule actions for + * some Compute Engine resources. For example, you can use them to schedule persistent disk + * snapshots. + * + *

(== resource_for {$api_version}.resourcePolicies ==) + */ public ResourcePolicy getResourcePolicyResource() { return resourcePolicyResource; } + /** + * Represents a Resource Policy resource. You can use resource policies to schedule actions for + * some Compute Engine resources. For example, you can use them to schedule persistent disk + * snapshots. + * + *

(== resource_for {$api_version}.resourcePolicies ==) + */ public Builder setResourcePolicyResource(ResourcePolicy resourcePolicyResource) { this.resourcePolicyResource = resourcePolicyResource; return this; diff --git a/src/main/java/com/google/cloud/compute/v1/InsertSslCertificateHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertSslCertificateHttpRequest.java index 045a082e0..84bf3ea9b 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertSslCertificateHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertSslCertificateHttpRequest.java @@ -192,17 +192,19 @@ public String getRequestId() { * *

Google Compute Engine has two SSL Certificate resources: * - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) + *

* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates) * - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers + *

The sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers * - *

- regionSslCertificates are used by: - internal HTTPS load balancers + *

The regionSslCertificates are used by internal HTTPS load balancers. * - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating and - * Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== resource_for - * {$api_version}.regionSslCertificates ==) Next ID: 17 + *

Optionally, certificate file contents that you upload can contain a set of up to five + * PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this data. + * You can use SSL keys and certificates to secure connections to a load balancer. For more + * information, read Creating and using SSL certificates and SSL certificates quotas and limits. + * (== resource_for {$api_version}.sslCertificates ==) (== resource_for + * {$api_version}.regionSslCertificates ==) */ public SslCertificate getSslCertificateResource() { return sslCertificateResource; @@ -426,17 +428,20 @@ public Builder setRequestId(String requestId) { * *

Google Compute Engine has two SSL Certificate resources: * - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) + *

* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates) * - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers + *

The sslCertificates are used by: - external HTTPS load balancers - SSL proxy load + * balancers * - *

- regionSslCertificates are used by: - internal HTTPS load balancers + *

The regionSslCertificates are used by internal HTTPS load balancers. * - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating - * and Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== - * resource_for {$api_version}.regionSslCertificates ==) Next ID: 17 + *

Optionally, certificate file contents that you upload can contain a set of up to five + * PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this + * data. You can use SSL keys and certificates to secure connections to a load balancer. For + * more information, read Creating and using SSL certificates and SSL certificates quotas and + * limits. (== resource_for {$api_version}.sslCertificates ==) (== resource_for + * {$api_version}.regionSslCertificates ==) */ public SslCertificate getSslCertificateResource() { return sslCertificateResource; @@ -447,17 +452,20 @@ public SslCertificate getSslCertificateResource() { * *

Google Compute Engine has two SSL Certificate resources: * - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) + *

* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates) * - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers + *

The sslCertificates are used by: - external HTTPS load balancers - SSL proxy load + * balancers * - *

- regionSslCertificates are used by: - internal HTTPS load balancers + *

The regionSslCertificates are used by internal HTTPS load balancers. * - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating - * and Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== - * resource_for {$api_version}.regionSslCertificates ==) Next ID: 17 + *

Optionally, certificate file contents that you upload can contain a set of up to five + * PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this + * data. You can use SSL keys and certificates to secure connections to a load balancer. For + * more information, read Creating and using SSL certificates and SSL certificates quotas and + * limits. (== resource_for {$api_version}.sslCertificates ==) (== resource_for + * {$api_version}.regionSslCertificates ==) */ public Builder setSslCertificateResource(SslCertificate sslCertificateResource) { this.sslCertificateResource = sslCertificateResource; diff --git a/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpProxyHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpProxyHttpRequest.java index 4e119337f..fa4e88020 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpProxyHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpProxyHttpRequest.java @@ -192,8 +192,8 @@ public String getRequestId() { * *

Google Compute Engine has two Target HTTP Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) * *

A target HTTP proxy is a component of GCP HTTP load balancers. * @@ -427,8 +427,8 @@ public Builder setRequestId(String requestId) { * *

Google Compute Engine has two Target HTTP Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) * *

A target HTTP proxy is a component of GCP HTTP load balancers. * @@ -449,8 +449,8 @@ public TargetHttpProxy getTargetHttpProxyResource() { * *

Google Compute Engine has two Target HTTP Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) * *

A target HTTP proxy is a component of GCP HTTP load balancers. * diff --git a/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpsProxyHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpsProxyHttpRequest.java index 5644d3590..b6700f6ce 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpsProxyHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpsProxyHttpRequest.java @@ -192,8 +192,8 @@ public String getRequestId() { * *

Google Compute Engine has two Target HTTPS Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) * *

A target HTTPS proxy is a component of GCP HTTPS load balancers. * @@ -427,8 +427,8 @@ public Builder setRequestId(String requestId) { * *

Google Compute Engine has two Target HTTPS Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) * *

A target HTTPS proxy is a component of GCP HTTPS load balancers. * @@ -449,8 +449,8 @@ public TargetHttpsProxy getTargetHttpsProxyResource() { * *

Google Compute Engine has two Target HTTPS Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) * *

A target HTTPS proxy is a component of GCP HTTPS load balancers. * diff --git a/src/main/java/com/google/cloud/compute/v1/InsertUrlMapHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/InsertUrlMapHttpRequest.java index ade5858f3..6a5786359 100644 --- a/src/main/java/com/google/cloud/compute/v1/InsertUrlMapHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/InsertUrlMapHttpRequest.java @@ -192,8 +192,8 @@ public String getRequestId() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -431,8 +431,8 @@ public Builder setRequestId(String requestId) { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -457,8 +457,8 @@ public UrlMap getUrlMapResource() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. diff --git a/src/main/java/com/google/cloud/compute/v1/Instance.java b/src/main/java/com/google/cloud/compute/v1/Instance.java index f08934786..30f4293e6 100644 --- a/src/main/java/com/google/cloud/compute/v1/Instance.java +++ b/src/main/java/com/google/cloud/compute/v1/Instance.java @@ -40,6 +40,7 @@ public final class Instance implements ApiMessage { private final String description; private final List disks; private final DisplayDevice displayDevice; + private final String fingerprint; private final List guestAccelerators; private final String hostname; private final String id; @@ -71,6 +72,7 @@ private Instance() { this.description = null; this.disks = null; this.displayDevice = null; + this.fingerprint = null; this.guestAccelerators = null; this.hostname = null; this.id = null; @@ -103,6 +105,7 @@ private Instance( String description, List disks, DisplayDevice displayDevice, + String fingerprint, List guestAccelerators, String hostname, String id, @@ -132,6 +135,7 @@ private Instance( this.description = description; this.disks = disks; this.displayDevice = displayDevice; + this.fingerprint = fingerprint; this.guestAccelerators = guestAccelerators; this.hostname = hostname; this.id = id; @@ -179,6 +183,9 @@ public Object getFieldValue(String fieldName) { if ("displayDevice".equals(fieldName)) { return displayDevice; } + if ("fingerprint".equals(fieldName)) { + return fingerprint; + } if ("guestAccelerators".equals(fieldName)) { return guestAccelerators; } @@ -310,6 +317,18 @@ public DisplayDevice getDisplayDevice() { return displayDevice; } + /** + * Specifies a fingerprint for this resource, which is essentially a hash of the instance's + * contents and used for optimistic locking. The fingerprint is initially generated by Compute + * Engine and changes after every request to modify or update the instance. You must always + * provide an up-to-date fingerprint hash in order to update the instance. + * + *

To see the latest fingerprint, make get() request to the instance. + */ + public String getFingerprint() { + return fingerprint; + } + /** A list of the type and count of accelerator cards attached to the instance. */ public List getGuestAcceleratorsList() { return guestAccelerators; @@ -512,6 +531,7 @@ public static class Builder { private String description; private List disks; private DisplayDevice displayDevice; + private String fingerprint; private List guestAccelerators; private String hostname; private String id; @@ -560,6 +580,9 @@ public Builder mergeFrom(Instance other) { if (other.getDisplayDevice() != null) { this.displayDevice = other.displayDevice; } + if (other.getFingerprint() != null) { + this.fingerprint = other.fingerprint; + } if (other.getGuestAcceleratorsList() != null) { this.guestAccelerators = other.guestAccelerators; } @@ -637,6 +660,7 @@ public Builder mergeFrom(Instance other) { this.description = source.description; this.disks = source.disks; this.displayDevice = source.displayDevice; + this.fingerprint = source.fingerprint; this.guestAccelerators = source.guestAccelerators; this.hostname = source.hostname; this.id = source.id; @@ -771,6 +795,31 @@ public Builder setDisplayDevice(DisplayDevice displayDevice) { return this; } + /** + * Specifies a fingerprint for this resource, which is essentially a hash of the instance's + * contents and used for optimistic locking. The fingerprint is initially generated by Compute + * Engine and changes after every request to modify or update the instance. You must always + * provide an up-to-date fingerprint hash in order to update the instance. + * + *

To see the latest fingerprint, make get() request to the instance. + */ + public String getFingerprint() { + return fingerprint; + } + + /** + * Specifies a fingerprint for this resource, which is essentially a hash of the instance's + * contents and used for optimistic locking. The fingerprint is initially generated by Compute + * Engine and changes after every request to modify or update the instance. You must always + * provide an up-to-date fingerprint hash in order to update the instance. + * + *

To see the latest fingerprint, make get() request to the instance. + */ + public Builder setFingerprint(String fingerprint) { + this.fingerprint = fingerprint; + return this; + } + /** A list of the type and count of accelerator cards attached to the instance. */ public List getGuestAcceleratorsList() { return guestAccelerators; @@ -1203,6 +1252,7 @@ public Instance build() { description, disks, displayDevice, + fingerprint, guestAccelerators, hostname, id, @@ -1236,6 +1286,7 @@ public Builder clone() { newBuilder.setDescription(this.description); newBuilder.addAllDisks(this.disks); newBuilder.setDisplayDevice(this.displayDevice); + newBuilder.setFingerprint(this.fingerprint); newBuilder.addAllGuestAccelerators(this.guestAccelerators); newBuilder.setHostname(this.hostname); newBuilder.setId(this.id); @@ -1286,6 +1337,9 @@ public String toString() { + "displayDevice=" + displayDevice + ", " + + "fingerprint=" + + fingerprint + + ", " + "guestAccelerators=" + guestAccelerators + ", " @@ -1368,6 +1422,7 @@ public boolean equals(Object o) { && Objects.equals(this.description, that.getDescription()) && Objects.equals(this.disks, that.getDisksList()) && Objects.equals(this.displayDevice, that.getDisplayDevice()) + && Objects.equals(this.fingerprint, that.getFingerprint()) && Objects.equals(this.guestAccelerators, that.getGuestAcceleratorsList()) && Objects.equals(this.hostname, that.getHostname()) && Objects.equals(this.id, that.getId()) @@ -1405,6 +1460,7 @@ public int hashCode() { description, disks, displayDevice, + fingerprint, guestAccelerators, hostname, id, diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceClient.java b/src/main/java/com/google/cloud/compute/v1/InstanceClient.java index e56e32551..f18a30cc5 100644 --- a/src/main/java/com/google/cloud/compute/v1/InstanceClient.java +++ b/src/main/java/com/google/cloud/compute/v1/InstanceClient.java @@ -277,6 +277,125 @@ public final Operation addAccessConfigInstance(AddAccessConfigInstanceHttpReques return stub.addAccessConfigInstanceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Adds existing resource policies to an instance. You can only add one policy right now which + * will be applied to this instance for scheduling live migrations. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = InstancesAddResourcePoliciesRequest.newBuilder().build();
+   *   Operation response = instanceClient.addResourcePoliciesInstance(instance, instancesAddResourcePoliciesRequestResource);
+   * }
+   * 
+ * + * @param instance The instance name for this request. + * @param instancesAddResourcePoliciesRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation addResourcePoliciesInstance( + ProjectZoneInstanceName instance, + InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource) { + AddResourcePoliciesInstanceHttpRequest request = + AddResourcePoliciesInstanceHttpRequest.newBuilder() + .setInstance(instance == null ? null : instance.toString()) + .setInstancesAddResourcePoliciesRequestResource( + instancesAddResourcePoliciesRequestResource) + .build(); + return addResourcePoliciesInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Adds existing resource policies to an instance. You can only add one policy right now which + * will be applied to this instance for scheduling live migrations. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = InstancesAddResourcePoliciesRequest.newBuilder().build();
+   *   Operation response = instanceClient.addResourcePoliciesInstance(instance.toString(), instancesAddResourcePoliciesRequestResource);
+   * }
+   * 
+ * + * @param instance The instance name for this request. + * @param instancesAddResourcePoliciesRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation addResourcePoliciesInstance( + String instance, + InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource) { + AddResourcePoliciesInstanceHttpRequest request = + AddResourcePoliciesInstanceHttpRequest.newBuilder() + .setInstance(instance) + .setInstancesAddResourcePoliciesRequestResource( + instancesAddResourcePoliciesRequestResource) + .build(); + return addResourcePoliciesInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Adds existing resource policies to an instance. You can only add one policy right now which + * will be applied to this instance for scheduling live migrations. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = InstancesAddResourcePoliciesRequest.newBuilder().build();
+   *   AddResourcePoliciesInstanceHttpRequest request = AddResourcePoliciesInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .setInstancesAddResourcePoliciesRequestResource(instancesAddResourcePoliciesRequestResource)
+   *     .build();
+   *   Operation response = instanceClient.addResourcePoliciesInstance(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation addResourcePoliciesInstance( + AddResourcePoliciesInstanceHttpRequest request) { + return addResourcePoliciesInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Adds existing resource policies to an instance. You can only add one policy right now which + * will be applied to this instance for scheduling live migrations. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = InstancesAddResourcePoliciesRequest.newBuilder().build();
+   *   AddResourcePoliciesInstanceHttpRequest request = AddResourcePoliciesInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .setInstancesAddResourcePoliciesRequestResource(instancesAddResourcePoliciesRequestResource)
+   *     .build();
+   *   ApiFuture<Operation> future = instanceClient.addResourcePoliciesInstanceCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + addResourcePoliciesInstanceCallable() { + return stub.addResourcePoliciesInstanceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Retrieves aggregated list of all of the instances in your project across all regions and zones. @@ -285,20 +404,29 @@ public final Operation addAccessConfigInstance(AddAccessConfigInstanceHttpReques * *

    * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (InstancesScopedList element : instanceClient.aggregatedListInstances(project).iterateAll()) {
+   *   for (InstancesScopedList element : instanceClient.aggregatedListInstances(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListInstancesPagedResponse aggregatedListInstances(ProjectName project) { + public final AggregatedListInstancesPagedResponse aggregatedListInstances( + Boolean includeAllScopes, ProjectName project) { AggregatedListInstancesHttpRequest request = AggregatedListInstancesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListInstances(request); @@ -312,20 +440,31 @@ public final AggregatedListInstancesPagedResponse aggregatedListInstances(Projec * *

    * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (InstancesScopedList element : instanceClient.aggregatedListInstances(project.toString()).iterateAll()) {
+   *   for (InstancesScopedList element : instanceClient.aggregatedListInstances(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListInstancesPagedResponse aggregatedListInstances(String project) { + public final AggregatedListInstancesPagedResponse aggregatedListInstances( + Boolean includeAllScopes, String project) { AggregatedListInstancesHttpRequest request = - AggregatedListInstancesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListInstancesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListInstances(request); } @@ -337,8 +476,10 @@ public final AggregatedListInstancesPagedResponse aggregatedListInstances(String * *

    * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstancesHttpRequest request = AggregatedListInstancesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (InstancesScopedList element : instanceClient.aggregatedListInstances(request).iterateAll()) {
@@ -364,8 +505,10 @@ public final AggregatedListInstancesPagedResponse aggregatedListInstances(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstancesHttpRequest request = AggregatedListInstancesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListInstancesPagedResponse> future = instanceClient.aggregatedListInstancesPagedCallable().futureCall(request);
@@ -391,8 +534,10 @@ public final AggregatedListInstancesPagedResponse aggregatedListInstances(
    *
    * 

    * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstancesHttpRequest request = AggregatedListInstancesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -1813,6 +1958,121 @@ public final ListReferrersInstancesPagedResponse listReferrersInstances(
     return stub.listReferrersInstancesCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Removes resource policies from an instance.
+   *
+   * 

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = InstancesRemoveResourcePoliciesRequest.newBuilder().build();
+   *   Operation response = instanceClient.removeResourcePoliciesInstance(instance, instancesRemoveResourcePoliciesRequestResource);
+   * }
+   * 
+ * + * @param instance The instance name for this request. + * @param instancesRemoveResourcePoliciesRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation removeResourcePoliciesInstance( + ProjectZoneInstanceName instance, + InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource) { + RemoveResourcePoliciesInstanceHttpRequest request = + RemoveResourcePoliciesInstanceHttpRequest.newBuilder() + .setInstance(instance == null ? null : instance.toString()) + .setInstancesRemoveResourcePoliciesRequestResource( + instancesRemoveResourcePoliciesRequestResource) + .build(); + return removeResourcePoliciesInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Removes resource policies from an instance. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = InstancesRemoveResourcePoliciesRequest.newBuilder().build();
+   *   Operation response = instanceClient.removeResourcePoliciesInstance(instance.toString(), instancesRemoveResourcePoliciesRequestResource);
+   * }
+   * 
+ * + * @param instance The instance name for this request. + * @param instancesRemoveResourcePoliciesRequestResource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation removeResourcePoliciesInstance( + String instance, + InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource) { + RemoveResourcePoliciesInstanceHttpRequest request = + RemoveResourcePoliciesInstanceHttpRequest.newBuilder() + .setInstance(instance) + .setInstancesRemoveResourcePoliciesRequestResource( + instancesRemoveResourcePoliciesRequestResource) + .build(); + return removeResourcePoliciesInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Removes resource policies from an instance. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = InstancesRemoveResourcePoliciesRequest.newBuilder().build();
+   *   RemoveResourcePoliciesInstanceHttpRequest request = RemoveResourcePoliciesInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .setInstancesRemoveResourcePoliciesRequestResource(instancesRemoveResourcePoliciesRequestResource)
+   *     .build();
+   *   Operation response = instanceClient.removeResourcePoliciesInstance(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation removeResourcePoliciesInstance( + RemoveResourcePoliciesInstanceHttpRequest request) { + return removeResourcePoliciesInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Removes resource policies from an instance. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = InstancesRemoveResourcePoliciesRequest.newBuilder().build();
+   *   RemoveResourcePoliciesInstanceHttpRequest request = RemoveResourcePoliciesInstanceHttpRequest.newBuilder()
+   *     .setInstance(formattedInstance)
+   *     .setInstancesRemoveResourcePoliciesRequestResource(instancesRemoveResourcePoliciesRequestResource)
+   *     .build();
+   *   ApiFuture<Operation> future = instanceClient.removeResourcePoliciesInstanceCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + removeResourcePoliciesInstanceCallable() { + return stub.removeResourcePoliciesInstanceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. @@ -2839,7 +3099,7 @@ public final Operation setMinCpuPlatformInstance(SetMinCpuPlatformInstanceHttpRe *
* * @param instance Instance name for this request. - * @param schedulingResource Sets the scheduling options for an Instance. NextID: 9 + * @param schedulingResource Sets the scheduling options for an Instance. NextID: 10 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -2868,7 +3128,7 @@ public final Operation setSchedulingInstance( *
* * @param instance Instance name for this request. - * @param schedulingResource Sets the scheduling options for an Instance. NextID: 9 + * @param schedulingResource Sets the scheduling options for an Instance. NextID: 10 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -3831,6 +4091,181 @@ public final TestPermissionsResponse testIamPermissionsInstance( return stub.testIamPermissionsInstanceCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an instance only if the necessary resources are available. This method can update only + * a specific set of instance properties. See Updating a running instance for a list of updatable + * instance properties. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String mostDisruptiveAllowedAction = "";
+   *   String minimalAction = "";
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   Instance instanceResource = Instance.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   Operation response = instanceClient.updateInstance(mostDisruptiveAllowedAction, minimalAction, instance, instanceResource, fieldMask);
+   * }
+   * 
+ * + * @param mostDisruptiveAllowedAction Specifies the most disruptive action that can be taken on + * the instance as part of the update. Compute Engine returns an error if the instance + * properties require a more disruptive action as part of the instance update. Valid options + * from lowest to highest are NO_EFFECT, REFRESH, and RESTART. + * @param minimalAction Specifies the action to take when updating an instance even if the updated + * properties do not require it. If not specified, then Compute Engine acts based on the + * minimum action that the updated properties require. + * @param instance Name of the instance resource to update. + * @param instanceResource Represents an Instance resource. + *

An instance is a virtual machine that is hosted on Google Cloud Platform. For more + * information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==) + * @param fieldMask The fields that should be serialized (even if they have empty values). If the + * containing message object has a non-null fieldmask, then all the fields in the field mask + * (and only those fields in the field mask) will be serialized. If the containing object does + * not have a fieldmask, then only non-empty fields will be serialized. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation updateInstance( + String mostDisruptiveAllowedAction, + String minimalAction, + ProjectZoneInstanceName instance, + Instance instanceResource, + List fieldMask) { + UpdateInstanceHttpRequest request = + UpdateInstanceHttpRequest.newBuilder() + .setMostDisruptiveAllowedAction(mostDisruptiveAllowedAction) + .setMinimalAction(minimalAction) + .setInstance(instance == null ? null : instance.toString()) + .setInstanceResource(instanceResource) + .addAllFieldMask(fieldMask) + .build(); + return updateInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an instance only if the necessary resources are available. This method can update only + * a specific set of instance properties. See Updating a running instance for a list of updatable + * instance properties. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String mostDisruptiveAllowedAction = "";
+   *   String minimalAction = "";
+   *   ProjectZoneInstanceName instance = ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   Instance instanceResource = Instance.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   Operation response = instanceClient.updateInstance(mostDisruptiveAllowedAction, minimalAction, instance.toString(), instanceResource, fieldMask);
+   * }
+   * 
+ * + * @param mostDisruptiveAllowedAction Specifies the most disruptive action that can be taken on + * the instance as part of the update. Compute Engine returns an error if the instance + * properties require a more disruptive action as part of the instance update. Valid options + * from lowest to highest are NO_EFFECT, REFRESH, and RESTART. + * @param minimalAction Specifies the action to take when updating an instance even if the updated + * properties do not require it. If not specified, then Compute Engine acts based on the + * minimum action that the updated properties require. + * @param instance Name of the instance resource to update. + * @param instanceResource Represents an Instance resource. + *

An instance is a virtual machine that is hosted on Google Cloud Platform. For more + * information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==) + * @param fieldMask The fields that should be serialized (even if they have empty values). If the + * containing message object has a non-null fieldmask, then all the fields in the field mask + * (and only those fields in the field mask) will be serialized. If the containing object does + * not have a fieldmask, then only non-empty fields will be serialized. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation updateInstance( + String mostDisruptiveAllowedAction, + String minimalAction, + String instance, + Instance instanceResource, + List fieldMask) { + UpdateInstanceHttpRequest request = + UpdateInstanceHttpRequest.newBuilder() + .setMostDisruptiveAllowedAction(mostDisruptiveAllowedAction) + .setMinimalAction(minimalAction) + .setInstance(instance) + .setInstanceResource(instanceResource) + .addAllFieldMask(fieldMask) + .build(); + return updateInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an instance only if the necessary resources are available. This method can update only + * a specific set of instance properties. See Updating a running instance for a list of updatable + * instance properties. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String mostDisruptiveAllowedAction = "";
+   *   String minimalAction = "";
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   Instance instanceResource = Instance.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   UpdateInstanceHttpRequest request = UpdateInstanceHttpRequest.newBuilder()
+   *     .setMostDisruptiveAllowedAction(mostDisruptiveAllowedAction)
+   *     .setMinimalAction(minimalAction)
+   *     .setInstance(formattedInstance)
+   *     .setInstanceResource(instanceResource)
+   *     .addAllFieldMask(fieldMask)
+   *     .build();
+   *   Operation response = instanceClient.updateInstance(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation updateInstance(UpdateInstanceHttpRequest request) { + return updateInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates an instance only if the necessary resources are available. This method can update only + * a specific set of instance properties. See Updating a running instance for a list of updatable + * instance properties. + * + *

Sample code: + * + *


+   * try (InstanceClient instanceClient = InstanceClient.create()) {
+   *   String mostDisruptiveAllowedAction = "";
+   *   String minimalAction = "";
+   *   String formattedInstance = ProjectZoneInstanceName.format("[PROJECT]", "[ZONE]", "[INSTANCE]");
+   *   Instance instanceResource = Instance.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   UpdateInstanceHttpRequest request = UpdateInstanceHttpRequest.newBuilder()
+   *     .setMostDisruptiveAllowedAction(mostDisruptiveAllowedAction)
+   *     .setMinimalAction(minimalAction)
+   *     .setInstance(formattedInstance)
+   *     .setInstanceResource(instanceResource)
+   *     .addAllFieldMask(fieldMask)
+   *     .build();
+   *   ApiFuture<Operation> future = instanceClient.updateInstanceCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable updateInstanceCallable() { + return stub.updateInstanceCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified access config from an instance's network interface with the data included diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java b/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java index b580ca1f8..a7f7cd4bc 100644 --- a/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java +++ b/src/main/java/com/google/cloud/compute/v1/InstanceGroupClient.java @@ -278,21 +278,29 @@ public final Operation addInstancesInstanceGroup(AddInstancesInstanceGroupHttpRe * *

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (InstanceGroupsScopedList element : instanceGroupClient.aggregatedListInstanceGroups(project).iterateAll()) {
+   *   for (InstanceGroupsScopedList element : instanceGroupClient.aggregatedListInstanceGroups(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGroups( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListInstanceGroups(request); @@ -306,21 +314,31 @@ public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGro * *

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (InstanceGroupsScopedList element : instanceGroupClient.aggregatedListInstanceGroups(project.toString()).iterateAll()) {
+   *   for (InstanceGroupsScopedList element : instanceGroupClient.aggregatedListInstanceGroups(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGroups( - String project) { + Boolean includeAllScopes, String project) { AggregatedListInstanceGroupsHttpRequest request = - AggregatedListInstanceGroupsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListInstanceGroupsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListInstanceGroups(request); } @@ -332,8 +350,10 @@ public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGro * *

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (InstanceGroupsScopedList element : instanceGroupClient.aggregatedListInstanceGroups(request).iterateAll()) {
@@ -359,8 +379,10 @@ public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGro
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListInstanceGroupsPagedResponse> future = instanceGroupClient.aggregatedListInstanceGroupsPagedCallable().futureCall(request);
@@ -386,8 +408,10 @@ public final AggregatedListInstanceGroupsPagedResponse aggregatedListInstanceGro
    *
    * 

    * try (InstanceGroupClient instanceGroupClient = InstanceGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupsHttpRequest request = AggregatedListInstanceGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java
index 1c04455f8..5890c36ce 100644
--- a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java
+++ b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerClient.java
@@ -329,21 +329,29 @@ public final Operation abandonInstancesInstanceGroupManager(
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (InstanceGroupManagersScopedList element : instanceGroupManagerClient.aggregatedListInstanceGroupManagers(project).iterateAll()) {
+   *   for (InstanceGroupManagersScopedList element : instanceGroupManagerClient.aggregatedListInstanceGroupManagers(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInstanceGroupManagers( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListInstanceGroupManagersHttpRequest request = AggregatedListInstanceGroupManagersHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListInstanceGroupManagers(request); @@ -357,21 +365,31 @@ public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInst * *

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (InstanceGroupManagersScopedList element : instanceGroupManagerClient.aggregatedListInstanceGroupManagers(project.toString()).iterateAll()) {
+   *   for (InstanceGroupManagersScopedList element : instanceGroupManagerClient.aggregatedListInstanceGroupManagers(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInstanceGroupManagers( - String project) { + Boolean includeAllScopes, String project) { AggregatedListInstanceGroupManagersHttpRequest request = - AggregatedListInstanceGroupManagersHttpRequest.newBuilder().setProject(project).build(); + AggregatedListInstanceGroupManagersHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListInstanceGroupManagers(request); } @@ -383,8 +401,10 @@ public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInst * *

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupManagersHttpRequest request = AggregatedListInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (InstanceGroupManagersScopedList element : instanceGroupManagerClient.aggregatedListInstanceGroupManagers(request).iterateAll()) {
@@ -410,8 +430,10 @@ public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInst
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupManagersHttpRequest request = AggregatedListInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListInstanceGroupManagersPagedResponse> future = instanceGroupManagerClient.aggregatedListInstanceGroupManagersPagedCallable().futureCall(request);
@@ -438,8 +460,10 @@ public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInst
    *
    * 

    * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInstanceGroupManagersHttpRequest request = AggregatedListInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -464,6 +488,128 @@ public final AggregatedListInstanceGroupManagersPagedResponse aggregatedListInst
     return stub.aggregatedListInstanceGroupManagersCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Applies changes to selected instances on the managed instance group. This method can be used to
+   * apply new overrides and/or new versions.
+   *
+   * 

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource = InstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
+   *   Operation response = instanceGroupManagerClient.applyUpdatesToInstancesInstanceGroupManager(instanceGroupManager, instanceGroupManagersApplyUpdatesRequestResource);
+   * }
+   * 
+ * + * @param instanceGroupManager The name of the managed instance group, should conform to RFC1035. + * @param instanceGroupManagersApplyUpdatesRequestResource + * InstanceGroupManagers.applyUpdatesToInstances + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation applyUpdatesToInstancesInstanceGroupManager( + ProjectZoneInstanceGroupManagerName instanceGroupManager, + InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource) { + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest request = + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest.newBuilder() + .setInstanceGroupManager( + instanceGroupManager == null ? null : instanceGroupManager.toString()) + .setInstanceGroupManagersApplyUpdatesRequestResource( + instanceGroupManagersApplyUpdatesRequestResource) + .build(); + return applyUpdatesToInstancesInstanceGroupManager(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Applies changes to selected instances on the managed instance group. This method can be used to + * apply new overrides and/or new versions. + * + *

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource = InstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
+   *   Operation response = instanceGroupManagerClient.applyUpdatesToInstancesInstanceGroupManager(instanceGroupManager.toString(), instanceGroupManagersApplyUpdatesRequestResource);
+   * }
+   * 
+ * + * @param instanceGroupManager The name of the managed instance group, should conform to RFC1035. + * @param instanceGroupManagersApplyUpdatesRequestResource + * InstanceGroupManagers.applyUpdatesToInstances + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation applyUpdatesToInstancesInstanceGroupManager( + String instanceGroupManager, + InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource) { + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest request = + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest.newBuilder() + .setInstanceGroupManager(instanceGroupManager) + .setInstanceGroupManagersApplyUpdatesRequestResource( + instanceGroupManagersApplyUpdatesRequestResource) + .build(); + return applyUpdatesToInstancesInstanceGroupManager(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Applies changes to selected instances on the managed instance group. This method can be used to + * apply new overrides and/or new versions. + * + *

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource = InstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
+   *   ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest request = ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .setInstanceGroupManagersApplyUpdatesRequestResource(instanceGroupManagersApplyUpdatesRequestResource)
+   *     .build();
+   *   Operation response = instanceGroupManagerClient.applyUpdatesToInstancesInstanceGroupManager(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation applyUpdatesToInstancesInstanceGroupManager( + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest request) { + return applyUpdatesToInstancesInstanceGroupManagerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Applies changes to selected instances on the managed instance group. This method can be used to + * apply new overrides and/or new versions. + * + *

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource = InstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
+   *   ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest request = ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .setInstanceGroupManagersApplyUpdatesRequestResource(instanceGroupManagersApplyUpdatesRequestResource)
+   *     .build();
+   *   ApiFuture<Operation> future = instanceGroupManagerClient.applyUpdatesToInstancesInstanceGroupManagerCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable + applyUpdatesToInstancesInstanceGroupManagerCallable() { + return stub.applyUpdatesToInstancesInstanceGroupManagerCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates instances with per-instance configs in this managed instance group. Instances are @@ -1272,6 +1418,155 @@ public final ListInstanceGroupManagersPagedResponse listInstanceGroupManagers( return stub.listInstanceGroupManagersCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given managed instance group. + * + *

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   for (InstanceManagedByIgmError element : instanceGroupManagerClient.listErrorsInstanceGroupManagers(instanceGroupManager).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param instanceGroupManager The name of the managed instance group. It must be a string that + * meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListErrorsInstanceGroupManagersPagedResponse listErrorsInstanceGroupManagers( + ProjectZoneInstanceGroupManagerName instanceGroupManager) { + ListErrorsInstanceGroupManagersHttpRequest request = + ListErrorsInstanceGroupManagersHttpRequest.newBuilder() + .setInstanceGroupManager( + instanceGroupManager == null ? null : instanceGroupManager.toString()) + .build(); + return listErrorsInstanceGroupManagers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given managed instance group. + * + *

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   for (InstanceManagedByIgmError element : instanceGroupManagerClient.listErrorsInstanceGroupManagers(instanceGroupManager.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param instanceGroupManager The name of the managed instance group. It must be a string that + * meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListErrorsInstanceGroupManagersPagedResponse listErrorsInstanceGroupManagers( + String instanceGroupManager) { + ListErrorsInstanceGroupManagersHttpRequest request = + ListErrorsInstanceGroupManagersHttpRequest.newBuilder() + .setInstanceGroupManager(instanceGroupManager) + .build(); + return listErrorsInstanceGroupManagers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given managed instance group. + * + *

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   ListErrorsInstanceGroupManagersHttpRequest request = ListErrorsInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .build();
+   *   for (InstanceManagedByIgmError element : instanceGroupManagerClient.listErrorsInstanceGroupManagers(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListErrorsInstanceGroupManagersPagedResponse listErrorsInstanceGroupManagers( + ListErrorsInstanceGroupManagersHttpRequest request) { + return listErrorsInstanceGroupManagersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given managed instance group. + * + *

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   ListErrorsInstanceGroupManagersHttpRequest request = ListErrorsInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .build();
+   *   ApiFuture<ListErrorsInstanceGroupManagersPagedResponse> future = instanceGroupManagerClient.listErrorsInstanceGroupManagersPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (InstanceManagedByIgmError element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersPagedCallable() { + return stub.listErrorsInstanceGroupManagersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given managed instance group. + * + *

Sample code: + * + *


+   * try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectZoneInstanceGroupManagerName.format("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
+   *   ListErrorsInstanceGroupManagersHttpRequest request = ListErrorsInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .build();
+   *   while (true) {
+   *     InstanceGroupManagersListErrorsResponse response = instanceGroupManagerClient.listErrorsInstanceGroupManagersCallable().call(request);
+   *     for (InstanceManagedByIgmError element : response.getItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, InstanceGroupManagersListErrorsResponse> + listErrorsInstanceGroupManagersCallable() { + return stub.listErrorsInstanceGroupManagersCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists all of the instances in the managed instance group. Each instance in the list has a @@ -2382,4 +2677,108 @@ protected ListInstanceGroupManagersFixedSizeCollection createCollection( return new ListInstanceGroupManagersFixedSizeCollection(pages, collectionSize); } } + + public static class ListErrorsInstanceGroupManagersPagedResponse + extends AbstractPagedListResponse< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError, + ListErrorsInstanceGroupManagersPage, + ListErrorsInstanceGroupManagersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListErrorsInstanceGroupManagersPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListErrorsInstanceGroupManagersPage, ListErrorsInstanceGroupManagersPagedResponse>() { + @Override + public ListErrorsInstanceGroupManagersPagedResponse apply( + ListErrorsInstanceGroupManagersPage input) { + return new ListErrorsInstanceGroupManagersPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListErrorsInstanceGroupManagersPagedResponse(ListErrorsInstanceGroupManagersPage page) { + super(page, ListErrorsInstanceGroupManagersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListErrorsInstanceGroupManagersPage + extends AbstractPage< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError, + ListErrorsInstanceGroupManagersPage> { + + private ListErrorsInstanceGroupManagersPage( + PageContext< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + context, + InstanceGroupManagersListErrorsResponse response) { + super(context, response); + } + + private static ListErrorsInstanceGroupManagersPage createEmptyPage() { + return new ListErrorsInstanceGroupManagersPage(null, null); + } + + @Override + protected ListErrorsInstanceGroupManagersPage createPage( + PageContext< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + context, + InstanceGroupManagersListErrorsResponse response) { + return new ListErrorsInstanceGroupManagersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListErrorsInstanceGroupManagersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError, + ListErrorsInstanceGroupManagersPage, + ListErrorsInstanceGroupManagersFixedSizeCollection> { + + private ListErrorsInstanceGroupManagersFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListErrorsInstanceGroupManagersFixedSizeCollection createEmptyCollection() { + return new ListErrorsInstanceGroupManagersFixedSizeCollection(null, 0); + } + + @Override + protected ListErrorsInstanceGroupManagersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListErrorsInstanceGroupManagersFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerSettings.java b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerSettings.java index 4eabb9020..2c9b6f5bf 100644 --- a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerSettings.java +++ b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.compute.v1; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.AggregatedListInstanceGroupManagersPagedResponse; +import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListErrorsInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListInstanceGroupManagersPagedResponse; import com.google.api.core.ApiFunction; @@ -88,6 +89,16 @@ public class InstanceGroupManagerSettings extends ClientSettings + applyUpdatesToInstancesInstanceGroupManagerSettings() { + return ((InstanceGroupManagerStubSettings) getStubSettings()) + .applyUpdatesToInstancesInstanceGroupManagerSettings(); + } + /** Returns the object with the settings used for calls to createInstancesInstanceGroupManager. */ public UnaryCallSettings createInstancesInstanceGroupManagerSettings() { @@ -132,6 +143,16 @@ public class InstanceGroupManagerSettings extends ClientSettings + listErrorsInstanceGroupManagersSettings() { + return ((InstanceGroupManagerStubSettings) getStubSettings()) + .listErrorsInstanceGroupManagersSettings(); + } + /** * Returns the object with the settings used for calls to * listManagedInstancesInstanceGroupManagers. @@ -305,6 +326,16 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().aggregatedListInstanceGroupManagersSettings(); } + /** + * Returns the builder for the settings used for calls to + * applyUpdatesToInstancesInstanceGroupManager. + */ + public UnaryCallSettings.Builder< + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesInstanceGroupManagerSettings() { + return getStubSettingsBuilder().applyUpdatesToInstancesInstanceGroupManagerSettings(); + } + /** * Returns the builder for the settings used for calls to createInstancesInstanceGroupManager. */ @@ -348,6 +379,15 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listInstanceGroupManagersSettings(); } + /** Returns the builder for the settings used for calls to listErrorsInstanceGroupManagers. */ + public PagedCallSettings.Builder< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersSettings() { + return getStubSettingsBuilder().listErrorsInstanceGroupManagersSettings(); + } + /** * Returns the builder for the settings used for calls to * listManagedInstancesInstanceGroupManagers. diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatus.java b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatus.java index 7fa7d4fd0..c43cc2ac1 100644 --- a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatus.java +++ b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatus.java @@ -25,22 +25,28 @@ @Generated("by GAPIC") @BetaApi public final class InstanceGroupManagerStatus implements ApiMessage { + private final String autoscaler; private final Boolean isStable; private final InstanceGroupManagerStatusVersionTarget versionTarget; private InstanceGroupManagerStatus() { + this.autoscaler = null; this.isStable = null; this.versionTarget = null; } private InstanceGroupManagerStatus( - Boolean isStable, InstanceGroupManagerStatusVersionTarget versionTarget) { + String autoscaler, Boolean isStable, InstanceGroupManagerStatusVersionTarget versionTarget) { + this.autoscaler = autoscaler; this.isStable = isStable; this.versionTarget = versionTarget; } @Override public Object getFieldValue(String fieldName) { + if ("autoscaler".equals(fieldName)) { + return autoscaler; + } if ("isStable".equals(fieldName)) { return isStable; } @@ -68,6 +74,11 @@ public List getFieldMask() { return null; } + /** [Output Only] The URL of the Autoscaler that targets this instance group manager. */ + public String getAutoscaler() { + return autoscaler; + } + /** * [Output Only] A bit indicating whether the managed instance group is in a stable state. A * stable state means that: none of the instances in the managed instance group is currently @@ -110,6 +121,7 @@ public static InstanceGroupManagerStatus getDefaultInstance() { } public static class Builder { + private String autoscaler; private Boolean isStable; private InstanceGroupManagerStatusVersionTarget versionTarget; @@ -117,6 +129,9 @@ public static class Builder { public Builder mergeFrom(InstanceGroupManagerStatus other) { if (other == InstanceGroupManagerStatus.getDefaultInstance()) return this; + if (other.getAutoscaler() != null) { + this.autoscaler = other.autoscaler; + } if (other.getIsStable() != null) { this.isStable = other.isStable; } @@ -127,10 +142,22 @@ public Builder mergeFrom(InstanceGroupManagerStatus other) { } Builder(InstanceGroupManagerStatus source) { + this.autoscaler = source.autoscaler; this.isStable = source.isStable; this.versionTarget = source.versionTarget; } + /** [Output Only] The URL of the Autoscaler that targets this instance group manager. */ + public String getAutoscaler() { + return autoscaler; + } + + /** [Output Only] The URL of the Autoscaler that targets this instance group manager. */ + public Builder setAutoscaler(String autoscaler) { + this.autoscaler = autoscaler; + return this; + } + /** * [Output Only] A bit indicating whether the managed instance group is in a stable state. A * stable state means that: none of the instances in the managed instance group is currently @@ -173,11 +200,12 @@ public Builder setVersionTarget(InstanceGroupManagerStatusVersionTarget versionT public InstanceGroupManagerStatus build() { - return new InstanceGroupManagerStatus(isStable, versionTarget); + return new InstanceGroupManagerStatus(autoscaler, isStable, versionTarget); } public Builder clone() { Builder newBuilder = new Builder(); + newBuilder.setAutoscaler(this.autoscaler); newBuilder.setIsStable(this.isStable); newBuilder.setVersionTarget(this.versionTarget); return newBuilder; @@ -187,6 +215,9 @@ public Builder clone() { @Override public String toString() { return "InstanceGroupManagerStatus{" + + "autoscaler=" + + autoscaler + + ", " + "isStable=" + isStable + ", " @@ -202,7 +233,8 @@ public boolean equals(Object o) { } if (o instanceof InstanceGroupManagerStatus) { InstanceGroupManagerStatus that = (InstanceGroupManagerStatus) o; - return Objects.equals(this.isStable, that.getIsStable()) + return Objects.equals(this.autoscaler, that.getAutoscaler()) + && Objects.equals(this.isStable, that.getIsStable()) && Objects.equals(this.versionTarget, that.getVersionTarget()); } return false; @@ -210,6 +242,6 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(isStable, versionTarget); + return Objects.hash(autoscaler, isStable, versionTarget); } } diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerUpdatePolicy.java b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerUpdatePolicy.java index 81c50bb98..28df2eda8 100644 --- a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerUpdatePolicy.java +++ b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerUpdatePolicy.java @@ -29,6 +29,7 @@ public final class InstanceGroupManagerUpdatePolicy implements ApiMessage { private final FixedOrPercent maxSurge; private final FixedOrPercent maxUnavailable; private final String minimalAction; + private final String replacementMethod; private final String type; private InstanceGroupManagerUpdatePolicy() { @@ -36,6 +37,7 @@ private InstanceGroupManagerUpdatePolicy() { this.maxSurge = null; this.maxUnavailable = null; this.minimalAction = null; + this.replacementMethod = null; this.type = null; } @@ -44,11 +46,13 @@ private InstanceGroupManagerUpdatePolicy( FixedOrPercent maxSurge, FixedOrPercent maxUnavailable, String minimalAction, + String replacementMethod, String type) { this.instanceRedistributionType = instanceRedistributionType; this.maxSurge = maxSurge; this.maxUnavailable = maxUnavailable; this.minimalAction = minimalAction; + this.replacementMethod = replacementMethod; this.type = type; } @@ -66,6 +70,9 @@ public Object getFieldValue(String fieldName) { if ("minimalAction".equals(fieldName)) { return minimalAction; } + if ("replacementMethod".equals(fieldName)) { + return replacementMethod; + } if ("type".equals(fieldName)) { return type; } @@ -141,6 +148,11 @@ public String getMinimalAction() { return minimalAction; } + /** What action should be used to replace instances. See minimal_action.REPLACE */ + public String getReplacementMethod() { + return replacementMethod; + } + /** * The type of update process. You can specify either PROACTIVE so that the instance group manager * proactively executes actions in order to bring instances to their target versions or @@ -178,6 +190,7 @@ public static class Builder { private FixedOrPercent maxSurge; private FixedOrPercent maxUnavailable; private String minimalAction; + private String replacementMethod; private String type; Builder() {} @@ -196,6 +209,9 @@ public Builder mergeFrom(InstanceGroupManagerUpdatePolicy other) { if (other.getMinimalAction() != null) { this.minimalAction = other.minimalAction; } + if (other.getReplacementMethod() != null) { + this.replacementMethod = other.replacementMethod; + } if (other.getType() != null) { this.type = other.type; } @@ -207,6 +223,7 @@ public Builder mergeFrom(InstanceGroupManagerUpdatePolicy other) { this.maxSurge = source.maxSurge; this.maxUnavailable = source.maxUnavailable; this.minimalAction = source.minimalAction; + this.replacementMethod = source.replacementMethod; this.type = source.type; } @@ -318,6 +335,17 @@ public Builder setMinimalAction(String minimalAction) { return this; } + /** What action should be used to replace instances. See minimal_action.REPLACE */ + public String getReplacementMethod() { + return replacementMethod; + } + + /** What action should be used to replace instances. See minimal_action.REPLACE */ + public Builder setReplacementMethod(String replacementMethod) { + this.replacementMethod = replacementMethod; + return this; + } + /** * The type of update process. You can specify either PROACTIVE so that the instance group * manager proactively executes actions in order to bring instances to their target versions or @@ -342,7 +370,12 @@ public Builder setType(String type) { public InstanceGroupManagerUpdatePolicy build() { return new InstanceGroupManagerUpdatePolicy( - instanceRedistributionType, maxSurge, maxUnavailable, minimalAction, type); + instanceRedistributionType, + maxSurge, + maxUnavailable, + minimalAction, + replacementMethod, + type); } public Builder clone() { @@ -351,6 +384,7 @@ public Builder clone() { newBuilder.setMaxSurge(this.maxSurge); newBuilder.setMaxUnavailable(this.maxUnavailable); newBuilder.setMinimalAction(this.minimalAction); + newBuilder.setReplacementMethod(this.replacementMethod); newBuilder.setType(this.type); return newBuilder; } @@ -371,6 +405,9 @@ public String toString() { + "minimalAction=" + minimalAction + ", " + + "replacementMethod=" + + replacementMethod + + ", " + "type=" + type + "}"; @@ -387,6 +424,7 @@ public boolean equals(Object o) { && Objects.equals(this.maxSurge, that.getMaxSurge()) && Objects.equals(this.maxUnavailable, that.getMaxUnavailable()) && Objects.equals(this.minimalAction, that.getMinimalAction()) + && Objects.equals(this.replacementMethod, that.getReplacementMethod()) && Objects.equals(this.type, that.getType()); } return false; @@ -394,6 +432,12 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(instanceRedistributionType, maxSurge, maxUnavailable, minimalAction, type); + return Objects.hash( + instanceRedistributionType, + maxSurge, + maxUnavailable, + minimalAction, + replacementMethod, + type); } } diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListErrorsResponse.java b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListErrorsResponse.java new file mode 100644 index 000000000..5000065d2 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListErrorsResponse.java @@ -0,0 +1,216 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 InstanceGroupManagersListErrorsResponse implements ApiMessage { + private final List items; + private final String nextPageToken; + + private InstanceGroupManagersListErrorsResponse() { + this.items = null; + this.nextPageToken = null; + } + + private InstanceGroupManagersListErrorsResponse( + List items, String nextPageToken) { + this.items = items; + this.nextPageToken = nextPageToken; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("items".equals(fieldName)) { + return items; + } + if ("nextPageToken".equals(fieldName)) { + return nextPageToken; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] The list of errors of the managed instance group. */ + public List getItemsList() { + return items; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InstanceGroupManagersListErrorsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InstanceGroupManagersListErrorsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InstanceGroupManagersListErrorsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InstanceGroupManagersListErrorsResponse(); + } + + public static class Builder { + private List items; + private String nextPageToken; + + Builder() {} + + public Builder mergeFrom(InstanceGroupManagersListErrorsResponse other) { + if (other == InstanceGroupManagersListErrorsResponse.getDefaultInstance()) return this; + if (other.getItemsList() != null) { + this.items = other.items; + } + if (other.getNextPageToken() != null) { + this.nextPageToken = other.nextPageToken; + } + return this; + } + + Builder(InstanceGroupManagersListErrorsResponse source) { + this.items = source.items; + this.nextPageToken = source.nextPageToken; + } + + /** [Output Only] The list of errors of the managed instance group. */ + public List getItemsList() { + return items; + } + + /** [Output Only] The list of errors of the managed instance group. */ + public Builder addAllItems(List items) { + if (this.items == null) { + this.items = new LinkedList<>(); + } + this.items.addAll(items); + return this; + } + + /** [Output Only] The list of errors of the managed instance group. */ + public Builder addItems(InstanceManagedByIgmError items) { + if (this.items == null) { + this.items = new LinkedList<>(); + } + this.items.add(items); + return this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public Builder setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public InstanceGroupManagersListErrorsResponse build() { + + return new InstanceGroupManagersListErrorsResponse(items, nextPageToken); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllItems(this.items); + newBuilder.setNextPageToken(this.nextPageToken); + return newBuilder; + } + } + + @Override + public String toString() { + return "InstanceGroupManagersListErrorsResponse{" + + "items=" + + items + + ", " + + "nextPageToken=" + + nextPageToken + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InstanceGroupManagersListErrorsResponse) { + InstanceGroupManagersListErrorsResponse that = (InstanceGroupManagersListErrorsResponse) o; + return Objects.equals(this.items, that.getItemsList()) + && Objects.equals(this.nextPageToken, that.getNextPageToken()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(items, nextPageToken); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmError.java b/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmError.java new file mode 100644 index 000000000..9c738e169 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmError.java @@ -0,0 +1,232 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 InstanceManagedByIgmError implements ApiMessage { + private final InstanceManagedByIgmErrorManagedInstanceError error; + private final InstanceManagedByIgmErrorInstanceActionDetails instanceActionDetails; + private final String timestamp; + + private InstanceManagedByIgmError() { + this.error = null; + this.instanceActionDetails = null; + this.timestamp = null; + } + + private InstanceManagedByIgmError( + InstanceManagedByIgmErrorManagedInstanceError error, + InstanceManagedByIgmErrorInstanceActionDetails instanceActionDetails, + String timestamp) { + this.error = error; + this.instanceActionDetails = instanceActionDetails; + this.timestamp = timestamp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("error".equals(fieldName)) { + return error; + } + if ("instanceActionDetails".equals(fieldName)) { + return instanceActionDetails; + } + if ("timestamp".equals(fieldName)) { + return timestamp; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] Contents of the error. */ + public InstanceManagedByIgmErrorManagedInstanceError getError() { + return error; + } + + /** + * [Output Only] Details of the instance action that triggered this error. May be null, if the + * error was not caused by an action on an instance. This field is optional. + */ + public InstanceManagedByIgmErrorInstanceActionDetails getInstanceActionDetails() { + return instanceActionDetails; + } + + /** [Output Only] The time that this error occurred. This value is in RFC3339 text format. */ + public String getTimestamp() { + return timestamp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InstanceManagedByIgmError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InstanceManagedByIgmError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InstanceManagedByIgmError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InstanceManagedByIgmError(); + } + + public static class Builder { + private InstanceManagedByIgmErrorManagedInstanceError error; + private InstanceManagedByIgmErrorInstanceActionDetails instanceActionDetails; + private String timestamp; + + Builder() {} + + public Builder mergeFrom(InstanceManagedByIgmError other) { + if (other == InstanceManagedByIgmError.getDefaultInstance()) return this; + if (other.getError() != null) { + this.error = other.error; + } + if (other.getInstanceActionDetails() != null) { + this.instanceActionDetails = other.instanceActionDetails; + } + if (other.getTimestamp() != null) { + this.timestamp = other.timestamp; + } + return this; + } + + Builder(InstanceManagedByIgmError source) { + this.error = source.error; + this.instanceActionDetails = source.instanceActionDetails; + this.timestamp = source.timestamp; + } + + /** [Output Only] Contents of the error. */ + public InstanceManagedByIgmErrorManagedInstanceError getError() { + return error; + } + + /** [Output Only] Contents of the error. */ + public Builder setError(InstanceManagedByIgmErrorManagedInstanceError error) { + this.error = error; + return this; + } + + /** + * [Output Only] Details of the instance action that triggered this error. May be null, if the + * error was not caused by an action on an instance. This field is optional. + */ + public InstanceManagedByIgmErrorInstanceActionDetails getInstanceActionDetails() { + return instanceActionDetails; + } + + /** + * [Output Only] Details of the instance action that triggered this error. May be null, if the + * error was not caused by an action on an instance. This field is optional. + */ + public Builder setInstanceActionDetails( + InstanceManagedByIgmErrorInstanceActionDetails instanceActionDetails) { + this.instanceActionDetails = instanceActionDetails; + return this; + } + + /** [Output Only] The time that this error occurred. This value is in RFC3339 text format. */ + public String getTimestamp() { + return timestamp; + } + + /** [Output Only] The time that this error occurred. This value is in RFC3339 text format. */ + public Builder setTimestamp(String timestamp) { + this.timestamp = timestamp; + return this; + } + + public InstanceManagedByIgmError build() { + + return new InstanceManagedByIgmError(error, instanceActionDetails, timestamp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setError(this.error); + newBuilder.setInstanceActionDetails(this.instanceActionDetails); + newBuilder.setTimestamp(this.timestamp); + return newBuilder; + } + } + + @Override + public String toString() { + return "InstanceManagedByIgmError{" + + "error=" + + error + + ", " + + "instanceActionDetails=" + + instanceActionDetails + + ", " + + "timestamp=" + + timestamp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InstanceManagedByIgmError) { + InstanceManagedByIgmError that = (InstanceManagedByIgmError) o; + return Objects.equals(this.error, that.getError()) + && Objects.equals(this.instanceActionDetails, that.getInstanceActionDetails()) + && Objects.equals(this.timestamp, that.getTimestamp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(error, instanceActionDetails, timestamp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorInstanceActionDetails.java b/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorInstanceActionDetails.java new file mode 100644 index 000000000..53edcdad4 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorInstanceActionDetails.java @@ -0,0 +1,251 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 InstanceManagedByIgmErrorInstanceActionDetails implements ApiMessage { + private final String action; + private final String instance; + private final ManagedInstanceVersion version; + + private InstanceManagedByIgmErrorInstanceActionDetails() { + this.action = null; + this.instance = null; + this.version = null; + } + + private InstanceManagedByIgmErrorInstanceActionDetails( + String action, String instance, ManagedInstanceVersion version) { + this.action = action; + this.instance = instance; + this.version = version; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("action".equals(fieldName)) { + return action; + } + if ("instance".equals(fieldName)) { + return instance; + } + if ("version".equals(fieldName)) { + return version; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** + * [Output Only] Action that managed instance group was executing on the instance when the error + * occurred. Possible values: + */ + public String getAction() { + return action; + } + + /** + * [Output Only] The URL of the instance. The URL can be set even if the instance has not yet been + * created. + */ + public String getInstance() { + return instance; + } + + /** + * [Output Only] Version this instance was created from, or was being created from, but the + * creation failed. Corresponds to one of the versions that were set on the Instance Group Manager + * resource at the time this instance was being created. + */ + public ManagedInstanceVersion getVersion() { + return version; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InstanceManagedByIgmErrorInstanceActionDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InstanceManagedByIgmErrorInstanceActionDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InstanceManagedByIgmErrorInstanceActionDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InstanceManagedByIgmErrorInstanceActionDetails(); + } + + public static class Builder { + private String action; + private String instance; + private ManagedInstanceVersion version; + + Builder() {} + + public Builder mergeFrom(InstanceManagedByIgmErrorInstanceActionDetails other) { + if (other == InstanceManagedByIgmErrorInstanceActionDetails.getDefaultInstance()) return this; + if (other.getAction() != null) { + this.action = other.action; + } + if (other.getInstance() != null) { + this.instance = other.instance; + } + if (other.getVersion() != null) { + this.version = other.version; + } + return this; + } + + Builder(InstanceManagedByIgmErrorInstanceActionDetails source) { + this.action = source.action; + this.instance = source.instance; + this.version = source.version; + } + + /** + * [Output Only] Action that managed instance group was executing on the instance when the error + * occurred. Possible values: + */ + public String getAction() { + return action; + } + + /** + * [Output Only] Action that managed instance group was executing on the instance when the error + * occurred. Possible values: + */ + public Builder setAction(String action) { + this.action = action; + return this; + } + + /** + * [Output Only] The URL of the instance. The URL can be set even if the instance has not yet + * been created. + */ + public String getInstance() { + return instance; + } + + /** + * [Output Only] The URL of the instance. The URL can be set even if the instance has not yet + * been created. + */ + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + /** + * [Output Only] Version this instance was created from, or was being created from, but the + * creation failed. Corresponds to one of the versions that were set on the Instance Group + * Manager resource at the time this instance was being created. + */ + public ManagedInstanceVersion getVersion() { + return version; + } + + /** + * [Output Only] Version this instance was created from, or was being created from, but the + * creation failed. Corresponds to one of the versions that were set on the Instance Group + * Manager resource at the time this instance was being created. + */ + public Builder setVersion(ManagedInstanceVersion version) { + this.version = version; + return this; + } + + public InstanceManagedByIgmErrorInstanceActionDetails build() { + + return new InstanceManagedByIgmErrorInstanceActionDetails(action, instance, version); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAction(this.action); + newBuilder.setInstance(this.instance); + newBuilder.setVersion(this.version); + return newBuilder; + } + } + + @Override + public String toString() { + return "InstanceManagedByIgmErrorInstanceActionDetails{" + + "action=" + + action + + ", " + + "instance=" + + instance + + ", " + + "version=" + + version + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InstanceManagedByIgmErrorInstanceActionDetails) { + InstanceManagedByIgmErrorInstanceActionDetails that = + (InstanceManagedByIgmErrorInstanceActionDetails) o; + return Objects.equals(this.action, that.getAction()) + && Objects.equals(this.instance, that.getInstance()) + && Objects.equals(this.version, that.getVersion()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(action, instance, version); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorManagedInstanceError.java b/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorManagedInstanceError.java new file mode 100644 index 000000000..d723bd732 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorManagedInstanceError.java @@ -0,0 +1,188 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 InstanceManagedByIgmErrorManagedInstanceError implements ApiMessage { + private final String code; + private final String message; + + private InstanceManagedByIgmErrorManagedInstanceError() { + this.code = null; + this.message = null; + } + + private InstanceManagedByIgmErrorManagedInstanceError(String code, String message) { + this.code = code; + this.message = message; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("code".equals(fieldName)) { + return code; + } + if ("message".equals(fieldName)) { + return message; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] Error code. */ + public String getCode() { + return code; + } + + /** [Output Only] Error message. */ + public String getMessage() { + return message; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InstanceManagedByIgmErrorManagedInstanceError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InstanceManagedByIgmErrorManagedInstanceError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InstanceManagedByIgmErrorManagedInstanceError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InstanceManagedByIgmErrorManagedInstanceError(); + } + + public static class Builder { + private String code; + private String message; + + Builder() {} + + public Builder mergeFrom(InstanceManagedByIgmErrorManagedInstanceError other) { + if (other == InstanceManagedByIgmErrorManagedInstanceError.getDefaultInstance()) return this; + if (other.getCode() != null) { + this.code = other.code; + } + if (other.getMessage() != null) { + this.message = other.message; + } + return this; + } + + Builder(InstanceManagedByIgmErrorManagedInstanceError source) { + this.code = source.code; + this.message = source.message; + } + + /** [Output Only] Error code. */ + public String getCode() { + return code; + } + + /** [Output Only] Error code. */ + public Builder setCode(String code) { + this.code = code; + return this; + } + + /** [Output Only] Error message. */ + public String getMessage() { + return message; + } + + /** [Output Only] Error message. */ + public Builder setMessage(String message) { + this.message = message; + return this; + } + + public InstanceManagedByIgmErrorManagedInstanceError build() { + + return new InstanceManagedByIgmErrorManagedInstanceError(code, message); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setCode(this.code); + newBuilder.setMessage(this.message); + return newBuilder; + } + } + + @Override + public String toString() { + return "InstanceManagedByIgmErrorManagedInstanceError{" + + "code=" + + code + + ", " + + "message=" + + message + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InstanceManagedByIgmErrorManagedInstanceError) { + InstanceManagedByIgmErrorManagedInstanceError that = + (InstanceManagedByIgmErrorManagedInstanceError) o; + return Objects.equals(this.code, that.getCode()) + && Objects.equals(this.message, that.getMessage()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(code, message); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java b/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java index 515b922b2..fa5ec3b68 100644 --- a/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java +++ b/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java @@ -37,6 +37,7 @@ public final class InstanceProperties implements ApiMessage { private final String minCpuPlatform; private final List networkInterfaces; private final ReservationAffinity reservationAffinity; + private final List resourcePolicies; private final Scheduling scheduling; private final List serviceAccounts; private final ShieldedInstanceConfig shieldedInstanceConfig; @@ -53,6 +54,7 @@ private InstanceProperties() { this.minCpuPlatform = null; this.networkInterfaces = null; this.reservationAffinity = null; + this.resourcePolicies = null; this.scheduling = null; this.serviceAccounts = null; this.shieldedInstanceConfig = null; @@ -70,6 +72,7 @@ private InstanceProperties( String minCpuPlatform, List networkInterfaces, ReservationAffinity reservationAffinity, + List resourcePolicies, Scheduling scheduling, List serviceAccounts, ShieldedInstanceConfig shieldedInstanceConfig, @@ -84,6 +87,7 @@ private InstanceProperties( this.minCpuPlatform = minCpuPlatform; this.networkInterfaces = networkInterfaces; this.reservationAffinity = reservationAffinity; + this.resourcePolicies = resourcePolicies; this.scheduling = scheduling; this.serviceAccounts = serviceAccounts; this.shieldedInstanceConfig = shieldedInstanceConfig; @@ -122,6 +126,9 @@ public Object getFieldValue(String fieldName) { if ("reservationAffinity".equals(fieldName)) { return reservationAffinity; } + if ("resourcePolicies".equals(fieldName)) { + return resourcePolicies; + } if ("scheduling".equals(fieldName)) { return scheduling; } @@ -227,6 +234,11 @@ public ReservationAffinity getReservationAffinity() { return reservationAffinity; } + /** Resource policies (names, not ULRs) applied to instances created from this template. */ + public List getResourcePoliciesList() { + return resourcePolicies; + } + /** Specifies the scheduling options for the instances that are created from this template. */ public Scheduling getScheduling() { return scheduling; @@ -287,6 +299,7 @@ public static class Builder { private String minCpuPlatform; private List networkInterfaces; private ReservationAffinity reservationAffinity; + private List resourcePolicies; private Scheduling scheduling; private List serviceAccounts; private ShieldedInstanceConfig shieldedInstanceConfig; @@ -326,6 +339,9 @@ public Builder mergeFrom(InstanceProperties other) { if (other.getReservationAffinity() != null) { this.reservationAffinity = other.reservationAffinity; } + if (other.getResourcePoliciesList() != null) { + this.resourcePolicies = other.resourcePolicies; + } if (other.getScheduling() != null) { this.scheduling = other.scheduling; } @@ -352,6 +368,7 @@ public Builder mergeFrom(InstanceProperties other) { this.minCpuPlatform = source.minCpuPlatform; this.networkInterfaces = source.networkInterfaces; this.reservationAffinity = source.reservationAffinity; + this.resourcePolicies = source.resourcePolicies; this.scheduling = source.scheduling; this.serviceAccounts = source.serviceAccounts; this.shieldedInstanceConfig = source.shieldedInstanceConfig; @@ -553,6 +570,29 @@ public Builder setReservationAffinity(ReservationAffinity reservationAffinity) { return this; } + /** Resource policies (names, not ULRs) applied to instances created from this template. */ + public List getResourcePoliciesList() { + return resourcePolicies; + } + + /** Resource policies (names, not ULRs) applied to instances created from this template. */ + public Builder addAllResourcePolicies(List resourcePolicies) { + if (this.resourcePolicies == null) { + this.resourcePolicies = new LinkedList<>(); + } + this.resourcePolicies.addAll(resourcePolicies); + return this; + } + + /** Resource policies (names, not ULRs) applied to instances created from this template. */ + public Builder addResourcePolicies(String resourcePolicies) { + if (this.resourcePolicies == null) { + this.resourcePolicies = new LinkedList<>(); + } + this.resourcePolicies.add(resourcePolicies); + return this; + } + /** Specifies the scheduling options for the instances that are created from this template. */ public Scheduling getScheduling() { return scheduling; @@ -640,6 +680,7 @@ public InstanceProperties build() { minCpuPlatform, networkInterfaces, reservationAffinity, + resourcePolicies, scheduling, serviceAccounts, shieldedInstanceConfig, @@ -658,6 +699,7 @@ public Builder clone() { newBuilder.setMinCpuPlatform(this.minCpuPlatform); newBuilder.addAllNetworkInterfaces(this.networkInterfaces); newBuilder.setReservationAffinity(this.reservationAffinity); + newBuilder.addAllResourcePolicies(this.resourcePolicies); newBuilder.setScheduling(this.scheduling); newBuilder.addAllServiceAccounts(this.serviceAccounts); newBuilder.setShieldedInstanceConfig(this.shieldedInstanceConfig); @@ -699,6 +741,9 @@ public String toString() { + "reservationAffinity=" + reservationAffinity + ", " + + "resourcePolicies=" + + resourcePolicies + + ", " + "scheduling=" + scheduling + ", " @@ -730,6 +775,7 @@ public boolean equals(Object o) { && Objects.equals(this.minCpuPlatform, that.getMinCpuPlatform()) && Objects.equals(this.networkInterfaces, that.getNetworkInterfacesList()) && Objects.equals(this.reservationAffinity, that.getReservationAffinity()) + && Objects.equals(this.resourcePolicies, that.getResourcePoliciesList()) && Objects.equals(this.scheduling, that.getScheduling()) && Objects.equals(this.serviceAccounts, that.getServiceAccountsList()) && Objects.equals(this.shieldedInstanceConfig, that.getShieldedInstanceConfig()) @@ -751,6 +797,7 @@ public int hashCode() { minCpuPlatform, networkInterfaces, reservationAffinity, + resourcePolicies, scheduling, serviceAccounts, shieldedInstanceConfig, diff --git a/src/main/java/com/google/cloud/compute/v1/InstanceSettings.java b/src/main/java/com/google/cloud/compute/v1/InstanceSettings.java index f0093267f..ebdf55c1d 100644 --- a/src/main/java/com/google/cloud/compute/v1/InstanceSettings.java +++ b/src/main/java/com/google/cloud/compute/v1/InstanceSettings.java @@ -76,6 +76,12 @@ public class InstanceSettings extends ClientSettings { return ((InstanceStubSettings) getStubSettings()).addAccessConfigInstanceSettings(); } + /** Returns the object with the settings used for calls to addResourcePoliciesInstance. */ + public UnaryCallSettings + addResourcePoliciesInstanceSettings() { + return ((InstanceStubSettings) getStubSettings()).addResourcePoliciesInstanceSettings(); + } + /** Returns the object with the settings used for calls to aggregatedListInstances. */ public PagedCallSettings< AggregatedListInstancesHttpRequest, @@ -154,6 +160,12 @@ public UnaryCallSettings insertInstanceSet return ((InstanceStubSettings) getStubSettings()).listReferrersInstancesSettings(); } + /** Returns the object with the settings used for calls to removeResourcePoliciesInstance. */ + public UnaryCallSettings + removeResourcePoliciesInstanceSettings() { + return ((InstanceStubSettings) getStubSettings()).removeResourcePoliciesInstanceSettings(); + } + /** Returns the object with the settings used for calls to resetInstance. */ public UnaryCallSettings resetInstanceSettings() { return ((InstanceStubSettings) getStubSettings()).resetInstanceSettings(); @@ -260,6 +272,11 @@ public UnaryCallSettings stopInstanceSetting return ((InstanceStubSettings) getStubSettings()).testIamPermissionsInstanceSettings(); } + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return ((InstanceStubSettings) getStubSettings()).updateInstanceSettings(); + } + /** Returns the object with the settings used for calls to updateAccessConfigInstance. */ public UnaryCallSettings updateAccessConfigInstanceSettings() { @@ -394,6 +411,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().addAccessConfigInstanceSettings(); } + /** Returns the builder for the settings used for calls to addResourcePoliciesInstance. */ + public UnaryCallSettings.Builder + addResourcePoliciesInstanceSettings() { + return getStubSettingsBuilder().addResourcePoliciesInstanceSettings(); + } + /** Returns the builder for the settings used for calls to aggregatedListInstances. */ public PagedCallSettings.Builder< AggregatedListInstancesHttpRequest, @@ -481,6 +504,12 @@ public UnaryCallSettings.Builder getInstanceSe return getStubSettingsBuilder().listReferrersInstancesSettings(); } + /** Returns the builder for the settings used for calls to removeResourcePoliciesInstance. */ + public UnaryCallSettings.Builder + removeResourcePoliciesInstanceSettings() { + return getStubSettingsBuilder().removeResourcePoliciesInstanceSettings(); + } + /** Returns the builder for the settings used for calls to resetInstance. */ public UnaryCallSettings.Builder resetInstanceSettings() { return getStubSettingsBuilder().resetInstanceSettings(); @@ -590,6 +619,12 @@ public UnaryCallSettings.Builder stopInstanc return getStubSettingsBuilder().testIamPermissionsInstanceSettings(); } + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder + updateInstanceSettings() { + return getStubSettingsBuilder().updateInstanceSettings(); + } + /** Returns the builder for the settings used for calls to updateAccessConfigInstance. */ public UnaryCallSettings.Builder updateAccessConfigInstanceSettings() { diff --git a/src/main/java/com/google/cloud/compute/v1/InstancesAddResourcePoliciesRequest.java b/src/main/java/com/google/cloud/compute/v1/InstancesAddResourcePoliciesRequest.java new file mode 100644 index 000000000..57b465214 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/InstancesAddResourcePoliciesRequest.java @@ -0,0 +1,164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 InstancesAddResourcePoliciesRequest implements ApiMessage { + private final List resourcePolicies; + + private InstancesAddResourcePoliciesRequest() { + this.resourcePolicies = null; + } + + private InstancesAddResourcePoliciesRequest(List resourcePolicies) { + this.resourcePolicies = resourcePolicies; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("resourcePolicies".equals(fieldName)) { + return resourcePolicies; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** Resource policies to be added to this instance. */ + public List getResourcePoliciesList() { + return resourcePolicies; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InstancesAddResourcePoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InstancesAddResourcePoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InstancesAddResourcePoliciesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InstancesAddResourcePoliciesRequest(); + } + + public static class Builder { + private List resourcePolicies; + + Builder() {} + + public Builder mergeFrom(InstancesAddResourcePoliciesRequest other) { + if (other == InstancesAddResourcePoliciesRequest.getDefaultInstance()) return this; + if (other.getResourcePoliciesList() != null) { + this.resourcePolicies = other.resourcePolicies; + } + return this; + } + + Builder(InstancesAddResourcePoliciesRequest source) { + this.resourcePolicies = source.resourcePolicies; + } + + /** Resource policies to be added to this instance. */ + public List getResourcePoliciesList() { + return resourcePolicies; + } + + /** Resource policies to be added to this instance. */ + public Builder addAllResourcePolicies(List resourcePolicies) { + if (this.resourcePolicies == null) { + this.resourcePolicies = new LinkedList<>(); + } + this.resourcePolicies.addAll(resourcePolicies); + return this; + } + + /** Resource policies to be added to this instance. */ + public Builder addResourcePolicies(String resourcePolicies) { + if (this.resourcePolicies == null) { + this.resourcePolicies = new LinkedList<>(); + } + this.resourcePolicies.add(resourcePolicies); + return this; + } + + public InstancesAddResourcePoliciesRequest build() { + return new InstancesAddResourcePoliciesRequest(resourcePolicies); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllResourcePolicies(this.resourcePolicies); + return newBuilder; + } + } + + @Override + public String toString() { + return "InstancesAddResourcePoliciesRequest{" + "resourcePolicies=" + resourcePolicies + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InstancesAddResourcePoliciesRequest) { + InstancesAddResourcePoliciesRequest that = (InstancesAddResourcePoliciesRequest) o; + return Objects.equals(this.resourcePolicies, that.getResourcePoliciesList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(resourcePolicies); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/InstancesRemoveResourcePoliciesRequest.java b/src/main/java/com/google/cloud/compute/v1/InstancesRemoveResourcePoliciesRequest.java new file mode 100644 index 000000000..1331c4ef7 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/InstancesRemoveResourcePoliciesRequest.java @@ -0,0 +1,164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 InstancesRemoveResourcePoliciesRequest implements ApiMessage { + private final List resourcePolicies; + + private InstancesRemoveResourcePoliciesRequest() { + this.resourcePolicies = null; + } + + private InstancesRemoveResourcePoliciesRequest(List resourcePolicies) { + this.resourcePolicies = resourcePolicies; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("resourcePolicies".equals(fieldName)) { + return resourcePolicies; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** Resource policies to be removed from this instance. */ + public List getResourcePoliciesList() { + return resourcePolicies; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(InstancesRemoveResourcePoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static InstancesRemoveResourcePoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final InstancesRemoveResourcePoliciesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new InstancesRemoveResourcePoliciesRequest(); + } + + public static class Builder { + private List resourcePolicies; + + Builder() {} + + public Builder mergeFrom(InstancesRemoveResourcePoliciesRequest other) { + if (other == InstancesRemoveResourcePoliciesRequest.getDefaultInstance()) return this; + if (other.getResourcePoliciesList() != null) { + this.resourcePolicies = other.resourcePolicies; + } + return this; + } + + Builder(InstancesRemoveResourcePoliciesRequest source) { + this.resourcePolicies = source.resourcePolicies; + } + + /** Resource policies to be removed from this instance. */ + public List getResourcePoliciesList() { + return resourcePolicies; + } + + /** Resource policies to be removed from this instance. */ + public Builder addAllResourcePolicies(List resourcePolicies) { + if (this.resourcePolicies == null) { + this.resourcePolicies = new LinkedList<>(); + } + this.resourcePolicies.addAll(resourcePolicies); + return this; + } + + /** Resource policies to be removed from this instance. */ + public Builder addResourcePolicies(String resourcePolicies) { + if (this.resourcePolicies == null) { + this.resourcePolicies = new LinkedList<>(); + } + this.resourcePolicies.add(resourcePolicies); + return this; + } + + public InstancesRemoveResourcePoliciesRequest build() { + return new InstancesRemoveResourcePoliciesRequest(resourcePolicies); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllResourcePolicies(this.resourcePolicies); + return newBuilder; + } + } + + @Override + public String toString() { + return "InstancesRemoveResourcePoliciesRequest{" + "resourcePolicies=" + resourcePolicies + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InstancesRemoveResourcePoliciesRequest) { + InstancesRemoveResourcePoliciesRequest that = (InstancesRemoveResourcePoliciesRequest) o; + return Objects.equals(this.resourcePolicies, that.getResourcePoliciesList()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(resourcePolicies); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java b/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java index bdd90d45e..1fa11343e 100644 --- a/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java +++ b/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentClient.java @@ -163,21 +163,29 @@ public InterconnectAttachmentStub getStub() { * *

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (InterconnectAttachmentsScopedList element : interconnectAttachmentClient.aggregatedListInterconnectAttachments(project).iterateAll()) {
+   *   for (InterconnectAttachmentsScopedList element : interconnectAttachmentClient.aggregatedListInterconnectAttachments(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListInterconnectAttachmentsPagedResponse - aggregatedListInterconnectAttachments(ProjectName project) { + aggregatedListInterconnectAttachments(Boolean includeAllScopes, ProjectName project) { AggregatedListInterconnectAttachmentsHttpRequest request = AggregatedListInterconnectAttachmentsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListInterconnectAttachments(request); @@ -191,21 +199,31 @@ public InterconnectAttachmentStub getStub() { * *

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (InterconnectAttachmentsScopedList element : interconnectAttachmentClient.aggregatedListInterconnectAttachments(project.toString()).iterateAll()) {
+   *   for (InterconnectAttachmentsScopedList element : interconnectAttachmentClient.aggregatedListInterconnectAttachments(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListInterconnectAttachmentsPagedResponse - aggregatedListInterconnectAttachments(String project) { + aggregatedListInterconnectAttachments(Boolean includeAllScopes, String project) { AggregatedListInterconnectAttachmentsHttpRequest request = - AggregatedListInterconnectAttachmentsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListInterconnectAttachmentsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListInterconnectAttachments(request); } @@ -217,8 +235,10 @@ public InterconnectAttachmentStub getStub() { * *

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInterconnectAttachmentsHttpRequest request = AggregatedListInterconnectAttachmentsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (InterconnectAttachmentsScopedList element : interconnectAttachmentClient.aggregatedListInterconnectAttachments(request).iterateAll()) {
@@ -245,8 +265,10 @@ public InterconnectAttachmentStub getStub() {
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInterconnectAttachmentsHttpRequest request = AggregatedListInterconnectAttachmentsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListInterconnectAttachmentsPagedResponse> future = interconnectAttachmentClient.aggregatedListInterconnectAttachmentsPagedCallable().futureCall(request);
@@ -273,8 +295,10 @@ public InterconnectAttachmentStub getStub() {
    *
    * 

    * try (InterconnectAttachmentClient interconnectAttachmentClient = InterconnectAttachmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListInterconnectAttachmentsHttpRequest request = AggregatedListInterconnectAttachmentsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/License.java b/src/main/java/com/google/cloud/compute/v1/License.java
index 7d62b516b..ec05ad4f2 100644
--- a/src/main/java/com/google/cloud/compute/v1/License.java
+++ b/src/main/java/com/google/cloud/compute/v1/License.java
@@ -24,7 +24,13 @@
 
 @Generated("by GAPIC")
 @BetaApi
-/** A license resource. */
+/**
+ * Represents a License resource.
+ *
+ * 

A License represents billing and aggregate usage data for public and marketplace images. + * Caution This resource is intended for use only by third-party partners who are creating Cloud + * Marketplace images. (== resource_for {$api_version}.licenses ==) + */ public final class License implements ApiMessage { private final Boolean chargesUseFee; private final String creationTimestamp; diff --git a/src/main/java/com/google/cloud/compute/v1/LicenseClient.java b/src/main/java/com/google/cloud/compute/v1/LicenseClient.java index 2c7c28018..7c3c58937 100644 --- a/src/main/java/com/google/cloud/compute/v1/LicenseClient.java +++ b/src/main/java/com/google/cloud/compute/v1/LicenseClient.java @@ -153,7 +153,8 @@ public LicenseStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified license. + * Deletes the specified license. Caution This resource is intended for use only by third-party + * partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -178,7 +179,8 @@ public final Operation deleteLicense(ProjectGlobalLicenseName license) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified license. + * Deletes the specified license. Caution This resource is intended for use only by third-party + * partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -201,7 +203,8 @@ public final Operation deleteLicense(String license) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified license. + * Deletes the specified license. Caution This resource is intended for use only by third-party + * partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -225,7 +228,8 @@ public final Operation deleteLicense(DeleteLicenseHttpRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified license. + * Deletes the specified license. Caution This resource is intended for use only by third-party + * partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -248,7 +252,8 @@ public final UnaryCallable deleteLicenseCal // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns the specified License resource. + * Returns the specified License resource. Caution This resource is intended for use only by + * third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -273,7 +278,8 @@ public final License getLicense(ProjectGlobalLicenseName license) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns the specified License resource. + * Returns the specified License resource. Caution This resource is intended for use only by + * third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -295,7 +301,8 @@ public final License getLicense(String license) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns the specified License resource. + * Returns the specified License resource. Caution This resource is intended for use only by + * third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -319,7 +326,8 @@ public final License getLicense(GetLicenseHttpRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns the specified License resource. + * Returns the specified License resource. Caution This resource is intended for use only by + * third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -343,7 +351,8 @@ public final UnaryCallable getLicenseCallable() // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Gets the access control policy for a resource. May be empty if no such policy or resource - * exists. + * exists. Caution This resource is intended for use only by third-party partners who are creating + * Cloud Marketplace images. * *

Sample code: * @@ -369,7 +378,8 @@ public final Policy getIamPolicyLicense(ProjectGlobalLicenseResourceName resourc // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Gets the access control policy for a resource. May be empty if no such policy or resource - * exists. + * exists. Caution This resource is intended for use only by third-party partners who are creating + * Cloud Marketplace images. * *

Sample code: * @@ -393,7 +403,8 @@ public final Policy getIamPolicyLicense(String resource) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Gets the access control policy for a resource. May be empty if no such policy or resource - * exists. + * exists. Caution This resource is intended for use only by third-party partners who are creating + * Cloud Marketplace images. * *

Sample code: * @@ -418,7 +429,8 @@ public final Policy getIamPolicyLicense(GetIamPolicyLicenseHttpRequest request) // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Gets the access control policy for a resource. May be empty if no such policy or resource - * exists. + * exists. Caution This resource is intended for use only by third-party partners who are creating + * Cloud Marketplace images. * *

Sample code: * @@ -441,7 +453,8 @@ public final UnaryCallable getIamPolicyL // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Create a License resource in the specified project. + * Create a License resource in the specified project. Caution This resource is intended for use + * only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -454,7 +467,10 @@ public final UnaryCallable getIamPolicyL *

* * @param project Project ID for this request. - * @param licenseResource A license resource. + * @param licenseResource Represents a License resource. + *

A License represents billing and aggregate usage data for public and marketplace images. + * Caution This resource is intended for use only by third-party partners who are creating + * Cloud Marketplace images. (== resource_for {$api_version}.licenses ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -469,7 +485,8 @@ public final Operation insertLicense(ProjectName project, License licenseResourc // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Create a License resource in the specified project. + * Create a License resource in the specified project. Caution This resource is intended for use + * only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -482,7 +499,10 @@ public final Operation insertLicense(ProjectName project, License licenseResourc *

* * @param project Project ID for this request. - * @param licenseResource A license resource. + * @param licenseResource Represents a License resource. + *

A License represents billing and aggregate usage data for public and marketplace images. + * Caution This resource is intended for use only by third-party partners who are creating + * Cloud Marketplace images. (== resource_for {$api_version}.licenses ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -497,7 +517,8 @@ public final Operation insertLicense(String project, License licenseResource) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Create a License resource in the specified project. + * Create a License resource in the specified project. Caution This resource is intended for use + * only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -523,7 +544,8 @@ public final Operation insertLicense(InsertLicenseHttpRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Create a License resource in the specified project. + * Create a License resource in the specified project. Caution This resource is intended for use + * only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -552,7 +574,8 @@ public final UnaryCallable insertLicenseCal * licenses that belong to other projects, including licenses attached to publicly-available * images, like Debian 9. If you want to get a list of publicly-available licenses, use this * method to make a request to the respective image project, such as debian-cloud or - * windows-cloud. + * windows-cloud. Caution This resource is intended for use only by third-party partners who are + * creating Cloud Marketplace images. * *

Sample code: * @@ -583,7 +606,8 @@ public final ListLicensesPagedResponse listLicenses(ProjectName project) { * licenses that belong to other projects, including licenses attached to publicly-available * images, like Debian 9. If you want to get a list of publicly-available licenses, use this * method to make a request to the respective image project, such as debian-cloud or - * windows-cloud. + * windows-cloud. Caution This resource is intended for use only by third-party partners who are + * creating Cloud Marketplace images. * *

Sample code: * @@ -612,7 +636,8 @@ public final ListLicensesPagedResponse listLicenses(String project) { * licenses that belong to other projects, including licenses attached to publicly-available * images, like Debian 9. If you want to get a list of publicly-available licenses, use this * method to make a request to the respective image project, such as debian-cloud or - * windows-cloud. + * windows-cloud. Caution This resource is intended for use only by third-party partners who are + * creating Cloud Marketplace images. * *

Sample code: * @@ -642,7 +667,8 @@ public final ListLicensesPagedResponse listLicenses(ListLicensesHttpRequest requ * licenses that belong to other projects, including licenses attached to publicly-available * images, like Debian 9. If you want to get a list of publicly-available licenses, use this * method to make a request to the respective image project, such as debian-cloud or - * windows-cloud. + * windows-cloud. Caution This resource is intended for use only by third-party partners who are + * creating Cloud Marketplace images. * *

Sample code: * @@ -672,7 +698,8 @@ public final ListLicensesPagedResponse listLicenses(ListLicensesHttpRequest requ * licenses that belong to other projects, including licenses attached to publicly-available * images, like Debian 9. If you want to get a list of publicly-available licenses, use this * method to make a request to the respective image project, such as debian-cloud or - * windows-cloud. + * windows-cloud. Caution This resource is intended for use only by third-party partners who are + * creating Cloud Marketplace images. * *

Sample code: * @@ -704,7 +731,9 @@ public final UnaryCallable listLi // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Sets the access control policy on the specified resource. Replaces any existing policy. + * Sets the access control policy on the specified resource. Replaces any existing policy. Caution + * This resource is intended for use only by third-party partners who are creating Cloud + * Marketplace images. * *

Sample code: * @@ -734,7 +763,9 @@ public final Policy setIamPolicyLicense( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Sets the access control policy on the specified resource. Replaces any existing policy. + * Sets the access control policy on the specified resource. Replaces any existing policy. Caution + * This resource is intended for use only by third-party partners who are creating Cloud + * Marketplace images. * *

Sample code: * @@ -763,7 +794,9 @@ public final Policy setIamPolicyLicense( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Sets the access control policy on the specified resource. Replaces any existing policy. + * Sets the access control policy on the specified resource. Replaces any existing policy. Caution + * This resource is intended for use only by third-party partners who are creating Cloud + * Marketplace images. * *

Sample code: * @@ -789,7 +822,9 @@ public final Policy setIamPolicyLicense(SetIamPolicyLicenseHttpRequest request) // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Sets the access control policy on the specified resource. Replaces any existing policy. + * Sets the access control policy on the specified resource. Replaces any existing policy. Caution + * This resource is intended for use only by third-party partners who are creating Cloud + * Marketplace images. * *

Sample code: * @@ -814,7 +849,8 @@ public final UnaryCallable setIamPolicyL // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is + * intended for use only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -844,7 +880,8 @@ public final TestPermissionsResponse testIamPermissionsLicense( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is + * intended for use only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -873,7 +910,8 @@ public final TestPermissionsResponse testIamPermissionsLicense( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is + * intended for use only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -900,7 +938,8 @@ public final TestPermissionsResponse testIamPermissionsLicense( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is + * intended for use only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * diff --git a/src/main/java/com/google/cloud/compute/v1/LicenseCode.java b/src/main/java/com/google/cloud/compute/v1/LicenseCode.java index eefcde265..06722ddc8 100644 --- a/src/main/java/com/google/cloud/compute/v1/LicenseCode.java +++ b/src/main/java/com/google/cloud/compute/v1/LicenseCode.java @@ -25,6 +25,13 @@ @Generated("by GAPIC") @BetaApi +/** + * Represents a License Code resource. + * + *

A License Code is a unique identifier used to represent a license resource. Caution This + * resource is intended for use only by third-party partners who are creating Cloud Marketplace + * images. (== resource_for {$api_version}.licenseCodes ==) + */ public final class LicenseCode implements ApiMessage { private final String creationTimestamp; private final String description; diff --git a/src/main/java/com/google/cloud/compute/v1/LicenseCodeClient.java b/src/main/java/com/google/cloud/compute/v1/LicenseCodeClient.java index 6896f7822..45eb74f77 100644 --- a/src/main/java/com/google/cloud/compute/v1/LicenseCodeClient.java +++ b/src/main/java/com/google/cloud/compute/v1/LicenseCodeClient.java @@ -146,7 +146,8 @@ public LicenseCodeStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Return a specified license code. License codes are mirrored across all projects that have - * permissions to read the License Code. + * permissions to read the License Code. Caution This resource is intended for use only by + * third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -172,7 +173,8 @@ public final LicenseCode getLicenseCode(ProjectGlobalLicenseCodeName licenseCode // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Return a specified license code. License codes are mirrored across all projects that have - * permissions to read the License Code. + * permissions to read the License Code. Caution This resource is intended for use only by + * third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -196,7 +198,8 @@ public final LicenseCode getLicenseCode(String licenseCode) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Return a specified license code. License codes are mirrored across all projects that have - * permissions to read the License Code. + * permissions to read the License Code. Caution This resource is intended for use only by + * third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -221,7 +224,8 @@ public final LicenseCode getLicenseCode(GetLicenseCodeHttpRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Return a specified license code. License codes are mirrored across all projects that have - * permissions to read the License Code. + * permissions to read the License Code. Caution This resource is intended for use only by + * third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -244,7 +248,8 @@ public final UnaryCallable getLicenseCod // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is + * intended for use only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -274,7 +279,8 @@ public final TestPermissionsResponse testIamPermissionsLicenseCode( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is + * intended for use only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -303,7 +309,8 @@ public final TestPermissionsResponse testIamPermissionsLicenseCode( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is + * intended for use only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * @@ -330,7 +337,8 @@ public final TestPermissionsResponse testIamPermissionsLicenseCode( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is + * intended for use only by third-party partners who are creating Cloud Marketplace images. * *

Sample code: * diff --git a/src/main/java/com/google/cloud/compute/v1/ListErrorsInstanceGroupManagersHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/ListErrorsInstanceGroupManagersHttpRequest.java new file mode 100644 index 000000000..e170e6e05 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/ListErrorsInstanceGroupManagersHttpRequest.java @@ -0,0 +1,693 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.instanceGroupManagers.listErrors. Lists all errors thrown by + * actions on instances for a given managed instance group. + */ +public final class ListErrorsInstanceGroupManagersHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String filter; + private final String instanceGroupManager; + private final String key; + private final Integer maxResults; + private final String orderBy; + private final String pageToken; + private final String prettyPrint; + private final String quotaUser; + private final String userIp; + + private ListErrorsInstanceGroupManagersHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.filter = null; + this.instanceGroupManager = null; + this.key = null; + this.maxResults = null; + this.orderBy = null; + this.pageToken = null; + this.prettyPrint = null; + this.quotaUser = null; + this.userIp = null; + } + + private ListErrorsInstanceGroupManagersHttpRequest( + String access_token, + String callback, + String fields, + String filter, + String instanceGroupManager, + String key, + Integer maxResults, + String orderBy, + String pageToken, + String prettyPrint, + String quotaUser, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.filter = filter; + this.instanceGroupManager = instanceGroupManager; + this.key = key; + this.maxResults = maxResults; + this.orderBy = orderBy; + this.pageToken = pageToken; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("filter".equals(fieldName)) { + return filter; + } + if ("instanceGroupManager".equals(fieldName)) { + return instanceGroupManager; + } + if ("key".equals(fieldName)) { + return key; + } + if ("maxResults".equals(fieldName)) { + return maxResults; + } + if ("orderBy".equals(fieldName)) { + return orderBy; + } + if ("pageToken".equals(fieldName)) { + return pageToken; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** + * A filter expression that filters resources listed in the response. The expression must specify + * the field name, a comparison operator, and the value that you want to use for filtering. The + * value must be a string, a number, or a boolean. The comparison operator must be either =, !=, + * >, or <. + * + *

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

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

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

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

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

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

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

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

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

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

To filter on multiple expressions, provide each separate expression within parentheses. + * For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By + * default, each expression is an AND expression. However, you can include AND and OR + * expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + public Builder setFilter(String filter) { + this.filter = filter; + return this; + } + + /** + * The name of the managed instance group. It must be a string that meets the requirements in + * RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. It must have the format + * `{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors`. + * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getInstanceGroupManager() { + return instanceGroupManager; + } + + /** + * The name of the managed instance group. It must be a string that meets the requirements in + * RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. It must have the format + * `{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors`. + * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setInstanceGroupManager(String instanceGroupManager) { + this.instanceGroupManager = instanceGroupManager; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Builder setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical + * order based on the resource name. + * + *

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

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

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

Currently, only sorting by name or creationTimestamp desc is supported. + */ + public Builder setOrderBy(String orderBy) { + this.orderBy = orderBy; + return this; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public String getPageToken() { + return pageToken; + } + + /** + * Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list + * request to get the next page of results. + */ + public Builder setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public ListErrorsInstanceGroupManagersHttpRequest build() { + String missing = ""; + + if (instanceGroupManager == null) { + missing += " instanceGroupManager"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new ListErrorsInstanceGroupManagersHttpRequest( + access_token, + callback, + fields, + filter, + instanceGroupManager, + key, + maxResults, + orderBy, + pageToken, + prettyPrint, + quotaUser, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setFilter(this.filter); + newBuilder.setInstanceGroupManager(this.instanceGroupManager); + newBuilder.setKey(this.key); + newBuilder.setMaxResults(this.maxResults); + newBuilder.setOrderBy(this.orderBy); + newBuilder.setPageToken(this.pageToken); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "ListErrorsInstanceGroupManagersHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "filter=" + + filter + + ", " + + "instanceGroupManager=" + + instanceGroupManager + + ", " + + "key=" + + key + + ", " + + "maxResults=" + + maxResults + + ", " + + "orderBy=" + + orderBy + + ", " + + "pageToken=" + + pageToken + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ListErrorsInstanceGroupManagersHttpRequest) { + ListErrorsInstanceGroupManagersHttpRequest that = + (ListErrorsInstanceGroupManagersHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.filter, that.getFilter()) + && Objects.equals(this.instanceGroupManager, that.getInstanceGroupManager()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.maxResults, that.getMaxResults()) + && Objects.equals(this.orderBy, that.getOrderBy()) + && Objects.equals(this.pageToken, that.getPageToken()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + filter, + instanceGroupManager, + key, + maxResults, + orderBy, + pageToken, + prettyPrint, + quotaUser, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/ListErrorsRegionInstanceGroupManagersHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/ListErrorsRegionInstanceGroupManagersHttpRequest.java new file mode 100644 index 000000000..30c1d9fa8 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/ListErrorsRegionInstanceGroupManagersHttpRequest.java @@ -0,0 +1,694 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.regionInstanceGroupManagers.listErrors. Lists all errors thrown + * by actions on instances for a given regional managed instance group. + */ +public final class ListErrorsRegionInstanceGroupManagersHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String filter; + private final String instanceGroupManager; + private final String key; + private final Integer maxResults; + private final String orderBy; + private final String pageToken; + private final String prettyPrint; + private final String quotaUser; + private final String userIp; + + private ListErrorsRegionInstanceGroupManagersHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.filter = null; + this.instanceGroupManager = null; + this.key = null; + this.maxResults = null; + this.orderBy = null; + this.pageToken = null; + this.prettyPrint = null; + this.quotaUser = null; + this.userIp = null; + } + + private ListErrorsRegionInstanceGroupManagersHttpRequest( + String access_token, + String callback, + String fields, + String filter, + String instanceGroupManager, + String key, + Integer maxResults, + String orderBy, + String pageToken, + String prettyPrint, + String quotaUser, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.filter = filter; + this.instanceGroupManager = instanceGroupManager; + this.key = key; + this.maxResults = maxResults; + this.orderBy = orderBy; + this.pageToken = pageToken; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("filter".equals(fieldName)) { + return filter; + } + if ("instanceGroupManager".equals(fieldName)) { + return instanceGroupManager; + } + if ("key".equals(fieldName)) { + return key; + } + if ("maxResults".equals(fieldName)) { + return maxResults; + } + if ("orderBy".equals(fieldName)) { + return orderBy; + } + if ("pageToken".equals(fieldName)) { + return pageToken; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** + * A filter expression that filters resources listed in the response. The expression must specify + * the field name, a comparison operator, and the value that you want to use for filtering. The + * value must be a string, a number, or a boolean. The comparison operator must be either =, !=, + * >, or <. + * + *

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

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

To filter on multiple expressions, provide each separate expression within parentheses. For + * example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each + * expression is an AND expression. However, you can include AND and OR expressions explicitly. + * For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND + * (scheduling.automaticRestart = true). + */ + public String getFilter() { + return filter; + } + + /** + * The name of the managed instance group. It must be a string that meets the requirements in + * RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. It must have the format + * `{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors`. + * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getInstanceGroupManager() { + return instanceGroupManager; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order + * based on the resource name. + * + *

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

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

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

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

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

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

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

To filter on multiple expressions, provide each separate expression within parentheses. + * For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By + * default, each expression is an AND expression. However, you can include AND and OR + * expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel + * Broadwell") AND (scheduling.automaticRestart = true). + */ + public Builder setFilter(String filter) { + this.filter = filter; + return this; + } + + /** + * The name of the managed instance group. It must be a string that meets the requirements in + * RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. It must have the format + * `{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors`. + * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public String getInstanceGroupManager() { + return instanceGroupManager; + } + + /** + * The name of the managed instance group. It must be a string that meets the requirements in + * RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. It must have the format + * `{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors`. + * \`{instanceGroupManager}\` must start with a letter, and contain only letters (\`[A-Za-z]\`), + * numbers (\`[0-9]\`), dashes (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes + * (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must be between 3 and 255 characters + * in length, and it * must not start with \`"goog"\`. + */ + public Builder setInstanceGroupManager(String instanceGroupManager) { + this.instanceGroupManager = instanceGroupManager; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Integer getMaxResults() { + return maxResults; + } + + /** + * The maximum number of results per page that should be returned. If the number of available + * results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to + * get the next page of results in subsequent list requests. Acceptable values are 0 to 500, + * inclusive. (Default: 500) + */ + public Builder setMaxResults(Integer maxResults) { + this.maxResults = maxResults; + return this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical + * order based on the resource name. + * + *

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment * counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]} - * - *

TODO(b/141846426): Consider supporting "authority" and "iam_principal" fields in the same - * counter. */ public final class LogConfigCounterOptions implements ApiMessage { private final List customFields; diff --git a/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java b/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java index 60decdfdd..9777f4eba 100644 --- a/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java +++ b/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java @@ -63,8 +63,10 @@ public List getFieldMask() { } /** - * Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant only - * in the LocalIAM implementation, for now. + * Whether Gin logging should happen in a fail-closed manner at the caller. This is currently + * supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see + * go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): + * Add support for Scaffolding. */ public String getLogMode() { return logMode; @@ -110,16 +112,20 @@ public Builder mergeFrom(LogConfigDataAccessOptions other) { } /** - * Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant - * only in the LocalIAM implementation, for now. + * Whether Gin logging should happen in a fail-closed manner at the caller. This is currently + * supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, + * see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. + * TODO(b/129671387): Add support for Scaffolding. */ public String getLogMode() { return logMode; } /** - * Whether Gin logging should happen in a fail-closed manner at the caller. This is relevant - * only in the LocalIAM implementation, for now. + * Whether Gin logging should happen in a fail-closed manner at the caller. This is currently + * supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, + * see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. + * TODO(b/129671387): Add support for Scaffolding. */ public Builder setLogMode(String logMode) { this.logMode = logMode; diff --git a/src/main/java/com/google/cloud/compute/v1/MachineTypeClient.java b/src/main/java/com/google/cloud/compute/v1/MachineTypeClient.java index 9a90401f5..48751cb41 100644 --- a/src/main/java/com/google/cloud/compute/v1/MachineTypeClient.java +++ b/src/main/java/com/google/cloud/compute/v1/MachineTypeClient.java @@ -160,21 +160,29 @@ public MachineTypeStub getStub() { * *


    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (MachineTypesScopedList element : machineTypeClient.aggregatedListMachineTypes(project).iterateAll()) {
+   *   for (MachineTypesScopedList element : machineTypeClient.aggregatedListMachineTypes(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListMachineTypesHttpRequest request = AggregatedListMachineTypesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListMachineTypes(request); @@ -188,20 +196,31 @@ public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes( * *

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (MachineTypesScopedList element : machineTypeClient.aggregatedListMachineTypes(project.toString()).iterateAll()) {
+   *   for (MachineTypesScopedList element : machineTypeClient.aggregatedListMachineTypes(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes(String project) { + public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes( + Boolean includeAllScopes, String project) { AggregatedListMachineTypesHttpRequest request = - AggregatedListMachineTypesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListMachineTypesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListMachineTypes(request); } @@ -213,8 +232,10 @@ public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes( * *

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListMachineTypesHttpRequest request = AggregatedListMachineTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (MachineTypesScopedList element : machineTypeClient.aggregatedListMachineTypes(request).iterateAll()) {
@@ -240,8 +261,10 @@ public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes(
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListMachineTypesHttpRequest request = AggregatedListMachineTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListMachineTypesPagedResponse> future = machineTypeClient.aggregatedListMachineTypesPagedCallable().futureCall(request);
@@ -267,8 +290,10 @@ public final AggregatedListMachineTypesPagedResponse aggregatedListMachineTypes(
    *
    * 

    * try (MachineTypeClient machineTypeClient = MachineTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListMachineTypesHttpRequest request = AggregatedListMachineTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java b/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java
index ce8a774b7..bc710a9f9 100644
--- a/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java
+++ b/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java
@@ -26,17 +26,20 @@
 @BetaApi
 /** The network endpoint. Next ID: 7 */
 public final class NetworkEndpoint implements ApiMessage {
+  private final String fqdn;
   private final String instance;
   private final String ipAddress;
   private final Integer port;
 
   private NetworkEndpoint() {
+    this.fqdn = null;
     this.instance = null;
     this.ipAddress = null;
     this.port = null;
   }
 
-  private NetworkEndpoint(String instance, String ipAddress, Integer port) {
+  private NetworkEndpoint(String fqdn, String instance, String ipAddress, Integer port) {
+    this.fqdn = fqdn;
     this.instance = instance;
     this.ipAddress = ipAddress;
     this.port = port;
@@ -44,6 +47,9 @@ private NetworkEndpoint(String instance, String ipAddress, Integer port) {
 
   @Override
   public Object getFieldValue(String fieldName) {
+    if ("fqdn".equals(fieldName)) {
+      return fqdn;
+    }
     if ("instance".equals(fieldName)) {
       return instance;
     }
@@ -74,6 +80,14 @@ public List getFieldMask() {
     return null;
   }
 
+  /**
+   * Optional fully qualified domain name of network endpoint. This can only be specified when
+   * NetworkEndpointGroup.network_endpoint_type is NON_GCP_FQDN_PORT.
+   */
+  public String getFqdn() {
+    return fqdn;
+  }
+
   /**
    * The name for a specific VM instance that the IP address belongs to. This is required for
    * network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network
@@ -127,6 +141,7 @@ public static NetworkEndpoint getDefaultInstance() {
   }
 
   public static class Builder {
+    private String fqdn;
     private String instance;
     private String ipAddress;
     private Integer port;
@@ -135,6 +150,9 @@ public static class Builder {
 
     public Builder mergeFrom(NetworkEndpoint other) {
       if (other == NetworkEndpoint.getDefaultInstance()) return this;
+      if (other.getFqdn() != null) {
+        this.fqdn = other.fqdn;
+      }
       if (other.getInstance() != null) {
         this.instance = other.instance;
       }
@@ -148,11 +166,29 @@ public Builder mergeFrom(NetworkEndpoint other) {
     }
 
     Builder(NetworkEndpoint source) {
+      this.fqdn = source.fqdn;
       this.instance = source.instance;
       this.ipAddress = source.ipAddress;
       this.port = source.port;
     }
 
+    /**
+     * Optional fully qualified domain name of network endpoint. This can only be specified when
+     * NetworkEndpointGroup.network_endpoint_type is NON_GCP_FQDN_PORT.
+     */
+    public String getFqdn() {
+      return fqdn;
+    }
+
+    /**
+     * Optional fully qualified domain name of network endpoint. This can only be specified when
+     * NetworkEndpointGroup.network_endpoint_type is NON_GCP_FQDN_PORT.
+     */
+    public Builder setFqdn(String fqdn) {
+      this.fqdn = fqdn;
+      return this;
+    }
+
     /**
      * The name for a specific VM instance that the IP address belongs to. This is required for
      * network endpoints of type GCE_VM_IP_PORT. The instance must be in the same zone of network
@@ -218,11 +254,12 @@ public Builder setPort(Integer port) {
 
     public NetworkEndpoint build() {
 
-      return new NetworkEndpoint(instance, ipAddress, port);
+      return new NetworkEndpoint(fqdn, instance, ipAddress, port);
     }
 
     public Builder clone() {
       Builder newBuilder = new Builder();
+      newBuilder.setFqdn(this.fqdn);
       newBuilder.setInstance(this.instance);
       newBuilder.setIpAddress(this.ipAddress);
       newBuilder.setPort(this.port);
@@ -233,6 +270,9 @@ public Builder clone() {
   @Override
   public String toString() {
     return "NetworkEndpoint{"
+        + "fqdn="
+        + fqdn
+        + ", "
         + "instance="
         + instance
         + ", "
@@ -251,7 +291,8 @@ public boolean equals(Object o) {
     }
     if (o instanceof NetworkEndpoint) {
       NetworkEndpoint that = (NetworkEndpoint) o;
-      return Objects.equals(this.instance, that.getInstance())
+      return Objects.equals(this.fqdn, that.getFqdn())
+          && Objects.equals(this.instance, that.getInstance())
           && Objects.equals(this.ipAddress, that.getIpAddress())
           && Objects.equals(this.port, that.getPort());
     }
@@ -260,6 +301,6 @@ public boolean equals(Object o) {
 
   @Override
   public int hashCode() {
-    return Objects.hash(instance, ipAddress, port);
+    return Objects.hash(fqdn, instance, ipAddress, port);
   }
 }
diff --git a/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java b/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java
index b29d78416..241f56eeb 100644
--- a/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java
+++ b/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java
@@ -27,8 +27,8 @@
 /**
  * Represents a collection of network endpoints.
  *
- * 

For more information read Setting up network endpoint groups in load balancing. (== - * resource_for {$api_version}.networkEndpointGroups ==) Next ID: 21 + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 */ public final class NetworkEndpointGroup implements ApiMessage { private final String creationTimestamp; @@ -196,10 +196,7 @@ public String getNetwork() { return network; } - /** - * Type of network endpoints in this network endpoint group. Currently the only supported value is - * GCE_VM_IP_PORT. - */ + /** Type of network endpoints in this network endpoint group. */ public String getNetworkEndpointType() { return networkEndpointType; } @@ -429,18 +426,12 @@ public Builder setNetwork(String network) { return this; } - /** - * Type of network endpoints in this network endpoint group. Currently the only supported value - * is GCE_VM_IP_PORT. - */ + /** Type of network endpoints in this network endpoint group. */ public String getNetworkEndpointType() { return networkEndpointType; } - /** - * Type of network endpoints in this network endpoint group. Currently the only supported value - * is GCE_VM_IP_PORT. - */ + /** Type of network endpoints in this network endpoint group. */ public Builder setNetworkEndpointType(String networkEndpointType) { this.networkEndpointType = networkEndpointType; return this; diff --git a/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupClient.java b/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupClient.java index d9d62ecfb..8771754e3 100644 --- a/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupClient.java +++ b/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupClient.java @@ -163,21 +163,29 @@ public NetworkEndpointGroupStub getStub() { * *


    * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (NetworkEndpointGroupsScopedList element : networkEndpointGroupClient.aggregatedListNetworkEndpointGroups(project).iterateAll()) {
+   *   for (NetworkEndpointGroupsScopedList element : networkEndpointGroupClient.aggregatedListNetworkEndpointGroups(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetworkEndpointGroups( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListNetworkEndpointGroupsHttpRequest request = AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListNetworkEndpointGroups(request); @@ -191,21 +199,31 @@ public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetw * *

    * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (NetworkEndpointGroupsScopedList element : networkEndpointGroupClient.aggregatedListNetworkEndpointGroups(project.toString()).iterateAll()) {
+   *   for (NetworkEndpointGroupsScopedList element : networkEndpointGroupClient.aggregatedListNetworkEndpointGroups(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetworkEndpointGroups( - String project) { + Boolean includeAllScopes, String project) { AggregatedListNetworkEndpointGroupsHttpRequest request = - AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListNetworkEndpointGroups(request); } @@ -217,8 +235,10 @@ public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetw * *

    * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNetworkEndpointGroupsHttpRequest request = AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (NetworkEndpointGroupsScopedList element : networkEndpointGroupClient.aggregatedListNetworkEndpointGroups(request).iterateAll()) {
@@ -244,8 +264,10 @@ public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetw
    *
    * 

    * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNetworkEndpointGroupsHttpRequest request = AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListNetworkEndpointGroupsPagedResponse> future = networkEndpointGroupClient.aggregatedListNetworkEndpointGroupsPagedCallable().futureCall(request);
@@ -272,8 +294,10 @@ public final AggregatedListNetworkEndpointGroupsPagedResponse aggregatedListNetw
    *
    * 

    * try (NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNetworkEndpointGroupsHttpRequest request = AggregatedListNetworkEndpointGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -773,8 +797,8 @@ public final NetworkEndpointGroup getNetworkEndpointGroup(
    * @param zone The name of the zone where you want to create the network endpoint group. It should
    *     comply with RFC1035.
    * @param networkEndpointGroupResource Represents a collection of network endpoints.
-   *     

For more information read Setting up network endpoint groups in load balancing. (== - * resource_for {$api_version}.networkEndpointGroups ==) Next ID: 21 + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -806,8 +830,8 @@ public final Operation insertNetworkEndpointGroup( * @param zone The name of the zone where you want to create the network endpoint group. It should * comply with RFC1035. * @param networkEndpointGroupResource Represents a collection of network endpoints. - *

For more information read Setting up network endpoint groups in load balancing. (== - * resource_for {$api_version}.networkEndpointGroups ==) Next ID: 21 + *

For more information read Network endpoint groups overview. (== resource_for + * {$api_version}.networkEndpointGroups ==) Next ID: 21 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi diff --git a/src/main/java/com/google/cloud/compute/v1/NodeGroup.java b/src/main/java/com/google/cloud/compute/v1/NodeGroup.java index cc47298fa..c132d7275 100644 --- a/src/main/java/com/google/cloud/compute/v1/NodeGroup.java +++ b/src/main/java/com/google/cloud/compute/v1/NodeGroup.java @@ -33,10 +33,13 @@ * more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==) */ public final class NodeGroup implements ApiMessage { + private final NodeGroupAutoscalingPolicy autoscalingPolicy; private final String creationTimestamp; private final String description; + private final String fingerprint; private final String id; private final String kind; + private final String maintenancePolicy; private final String name; private final String nodeTemplate; private final String selfLink; @@ -45,10 +48,13 @@ public final class NodeGroup implements ApiMessage { private final String zone; private NodeGroup() { + this.autoscalingPolicy = null; this.creationTimestamp = null; this.description = null; + this.fingerprint = null; this.id = null; this.kind = null; + this.maintenancePolicy = null; this.name = null; this.nodeTemplate = null; this.selfLink = null; @@ -58,20 +64,26 @@ private NodeGroup() { } private NodeGroup( + NodeGroupAutoscalingPolicy autoscalingPolicy, String creationTimestamp, String description, + String fingerprint, String id, String kind, + String maintenancePolicy, String name, String nodeTemplate, String selfLink, Integer size, String status, String zone) { + this.autoscalingPolicy = autoscalingPolicy; this.creationTimestamp = creationTimestamp; this.description = description; + this.fingerprint = fingerprint; this.id = id; this.kind = kind; + this.maintenancePolicy = maintenancePolicy; this.name = name; this.nodeTemplate = nodeTemplate; this.selfLink = selfLink; @@ -82,18 +94,27 @@ private NodeGroup( @Override public Object getFieldValue(String fieldName) { + if ("autoscalingPolicy".equals(fieldName)) { + return autoscalingPolicy; + } if ("creationTimestamp".equals(fieldName)) { return creationTimestamp; } if ("description".equals(fieldName)) { return description; } + if ("fingerprint".equals(fieldName)) { + return fingerprint; + } if ("id".equals(fieldName)) { return id; } if ("kind".equals(fieldName)) { return kind; } + if ("maintenancePolicy".equals(fieldName)) { + return maintenancePolicy; + } if ("name".equals(fieldName)) { return name; } @@ -133,6 +154,11 @@ public List getFieldMask() { return null; } + /** Specifies how autoscaling should behave. */ + public NodeGroupAutoscalingPolicy getAutoscalingPolicy() { + return autoscalingPolicy; + } + /** [Output Only] Creation timestamp in RFC3339 text format. */ public String getCreationTimestamp() { return creationTimestamp; @@ -145,6 +171,10 @@ public String getDescription() { return description; } + public String getFingerprint() { + return fingerprint; + } + /** * [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ @@ -157,6 +187,11 @@ public String getKind() { return kind; } + /** Specifies how to handle instances when a node in the group undergoes maintenance. */ + public String getMaintenancePolicy() { + return maintenancePolicy; + } + /** * The name of the resource, provided by the client when initially creating the resource. The * resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name @@ -215,10 +250,13 @@ public static NodeGroup getDefaultInstance() { } public static class Builder { + private NodeGroupAutoscalingPolicy autoscalingPolicy; private String creationTimestamp; private String description; + private String fingerprint; private String id; private String kind; + private String maintenancePolicy; private String name; private String nodeTemplate; private String selfLink; @@ -230,18 +268,27 @@ public static class Builder { public Builder mergeFrom(NodeGroup other) { if (other == NodeGroup.getDefaultInstance()) return this; + if (other.getAutoscalingPolicy() != null) { + this.autoscalingPolicy = other.autoscalingPolicy; + } if (other.getCreationTimestamp() != null) { this.creationTimestamp = other.creationTimestamp; } if (other.getDescription() != null) { this.description = other.description; } + if (other.getFingerprint() != null) { + this.fingerprint = other.fingerprint; + } if (other.getId() != null) { this.id = other.id; } if (other.getKind() != null) { this.kind = other.kind; } + if (other.getMaintenancePolicy() != null) { + this.maintenancePolicy = other.maintenancePolicy; + } if (other.getName() != null) { this.name = other.name; } @@ -264,10 +311,13 @@ public Builder mergeFrom(NodeGroup other) { } Builder(NodeGroup source) { + this.autoscalingPolicy = source.autoscalingPolicy; this.creationTimestamp = source.creationTimestamp; this.description = source.description; + this.fingerprint = source.fingerprint; this.id = source.id; this.kind = source.kind; + this.maintenancePolicy = source.maintenancePolicy; this.name = source.name; this.nodeTemplate = source.nodeTemplate; this.selfLink = source.selfLink; @@ -276,6 +326,17 @@ public Builder mergeFrom(NodeGroup other) { this.zone = source.zone; } + /** Specifies how autoscaling should behave. */ + public NodeGroupAutoscalingPolicy getAutoscalingPolicy() { + return autoscalingPolicy; + } + + /** Specifies how autoscaling should behave. */ + public Builder setAutoscalingPolicy(NodeGroupAutoscalingPolicy autoscalingPolicy) { + this.autoscalingPolicy = autoscalingPolicy; + return this; + } + /** [Output Only] Creation timestamp in RFC3339 text format. */ public String getCreationTimestamp() { return creationTimestamp; @@ -302,6 +363,15 @@ public Builder setDescription(String description) { return this; } + public String getFingerprint() { + return fingerprint; + } + + public Builder setFingerprint(String fingerprint) { + this.fingerprint = fingerprint; + return this; + } + /** * [Output Only] The unique identifier for the resource. This identifier is defined by the * server. @@ -330,6 +400,17 @@ public Builder setKind(String kind) { return this; } + /** Specifies how to handle instances when a node in the group undergoes maintenance. */ + public String getMaintenancePolicy() { + return maintenancePolicy; + } + + /** Specifies how to handle instances when a node in the group undergoes maintenance. */ + public Builder setMaintenancePolicy(String maintenancePolicy) { + this.maintenancePolicy = maintenancePolicy; + return this; + } + /** * The name of the resource, provided by the client when initially creating the resource. The * resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name @@ -411,10 +492,13 @@ public Builder setZone(String zone) { public NodeGroup build() { return new NodeGroup( + autoscalingPolicy, creationTimestamp, description, + fingerprint, id, kind, + maintenancePolicy, name, nodeTemplate, selfLink, @@ -425,10 +509,13 @@ public NodeGroup build() { public Builder clone() { Builder newBuilder = new Builder(); + newBuilder.setAutoscalingPolicy(this.autoscalingPolicy); newBuilder.setCreationTimestamp(this.creationTimestamp); newBuilder.setDescription(this.description); + newBuilder.setFingerprint(this.fingerprint); newBuilder.setId(this.id); newBuilder.setKind(this.kind); + newBuilder.setMaintenancePolicy(this.maintenancePolicy); newBuilder.setName(this.name); newBuilder.setNodeTemplate(this.nodeTemplate); newBuilder.setSelfLink(this.selfLink); @@ -442,18 +529,27 @@ public Builder clone() { @Override public String toString() { return "NodeGroup{" + + "autoscalingPolicy=" + + autoscalingPolicy + + ", " + "creationTimestamp=" + creationTimestamp + ", " + "description=" + description + ", " + + "fingerprint=" + + fingerprint + + ", " + "id=" + id + ", " + "kind=" + kind + ", " + + "maintenancePolicy=" + + maintenancePolicy + + ", " + "name=" + name + ", " @@ -481,10 +577,13 @@ public boolean equals(Object o) { } if (o instanceof NodeGroup) { NodeGroup that = (NodeGroup) o; - return Objects.equals(this.creationTimestamp, that.getCreationTimestamp()) + return Objects.equals(this.autoscalingPolicy, that.getAutoscalingPolicy()) + && Objects.equals(this.creationTimestamp, that.getCreationTimestamp()) && Objects.equals(this.description, that.getDescription()) + && Objects.equals(this.fingerprint, that.getFingerprint()) && Objects.equals(this.id, that.getId()) && Objects.equals(this.kind, that.getKind()) + && Objects.equals(this.maintenancePolicy, that.getMaintenancePolicy()) && Objects.equals(this.name, that.getName()) && Objects.equals(this.nodeTemplate, that.getNodeTemplate()) && Objects.equals(this.selfLink, that.getSelfLink()) @@ -498,6 +597,18 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - creationTimestamp, description, id, kind, name, nodeTemplate, selfLink, size, status, zone); + autoscalingPolicy, + creationTimestamp, + description, + fingerprint, + id, + kind, + maintenancePolicy, + name, + nodeTemplate, + selfLink, + size, + status, + zone); } } diff --git a/src/main/java/com/google/cloud/compute/v1/NodeGroupAutoscalingPolicy.java b/src/main/java/com/google/cloud/compute/v1/NodeGroupAutoscalingPolicy.java new file mode 100644 index 000000000..c1323dd6c --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/NodeGroupAutoscalingPolicy.java @@ -0,0 +1,219 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 NodeGroupAutoscalingPolicy implements ApiMessage { + private final Integer maxNodes; + private final Integer minNodes; + private final String mode; + + private NodeGroupAutoscalingPolicy() { + this.maxNodes = null; + this.minNodes = null; + this.mode = null; + } + + private NodeGroupAutoscalingPolicy(Integer maxNodes, Integer minNodes, String mode) { + this.maxNodes = maxNodes; + this.minNodes = minNodes; + this.mode = mode; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("maxNodes".equals(fieldName)) { + return maxNodes; + } + if ("minNodes".equals(fieldName)) { + return minNodes; + } + if ("mode".equals(fieldName)) { + return mode; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** The maximum number of nodes that the group should have. */ + public Integer getMaxNodes() { + return maxNodes; + } + + /** The minimum number of nodes that the group should have. */ + public Integer getMinNodes() { + return minNodes; + } + + /** The autoscaling mode. */ + public String getMode() { + return mode; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(NodeGroupAutoscalingPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static NodeGroupAutoscalingPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final NodeGroupAutoscalingPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new NodeGroupAutoscalingPolicy(); + } + + public static class Builder { + private Integer maxNodes; + private Integer minNodes; + private String mode; + + Builder() {} + + public Builder mergeFrom(NodeGroupAutoscalingPolicy other) { + if (other == NodeGroupAutoscalingPolicy.getDefaultInstance()) return this; + if (other.getMaxNodes() != null) { + this.maxNodes = other.maxNodes; + } + if (other.getMinNodes() != null) { + this.minNodes = other.minNodes; + } + if (other.getMode() != null) { + this.mode = other.mode; + } + return this; + } + + Builder(NodeGroupAutoscalingPolicy source) { + this.maxNodes = source.maxNodes; + this.minNodes = source.minNodes; + this.mode = source.mode; + } + + /** The maximum number of nodes that the group should have. */ + public Integer getMaxNodes() { + return maxNodes; + } + + /** The maximum number of nodes that the group should have. */ + public Builder setMaxNodes(Integer maxNodes) { + this.maxNodes = maxNodes; + return this; + } + + /** The minimum number of nodes that the group should have. */ + public Integer getMinNodes() { + return minNodes; + } + + /** The minimum number of nodes that the group should have. */ + public Builder setMinNodes(Integer minNodes) { + this.minNodes = minNodes; + return this; + } + + /** The autoscaling mode. */ + public String getMode() { + return mode; + } + + /** The autoscaling mode. */ + public Builder setMode(String mode) { + this.mode = mode; + return this; + } + + public NodeGroupAutoscalingPolicy build() { + + return new NodeGroupAutoscalingPolicy(maxNodes, minNodes, mode); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setMaxNodes(this.maxNodes); + newBuilder.setMinNodes(this.minNodes); + newBuilder.setMode(this.mode); + return newBuilder; + } + } + + @Override + public String toString() { + return "NodeGroupAutoscalingPolicy{" + + "maxNodes=" + + maxNodes + + ", " + + "minNodes=" + + minNodes + + ", " + + "mode=" + + mode + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof NodeGroupAutoscalingPolicy) { + NodeGroupAutoscalingPolicy that = (NodeGroupAutoscalingPolicy) o; + return Objects.equals(this.maxNodes, that.getMaxNodes()) + && Objects.equals(this.minNodes, that.getMinNodes()) + && Objects.equals(this.mode, that.getMode()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(maxNodes, minNodes, mode); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java b/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java index 7fdad8f73..73c040a70 100644 --- a/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java +++ b/src/main/java/com/google/cloud/compute/v1/NodeGroupClient.java @@ -271,20 +271,29 @@ public final UnaryCallable addNodesNode * *


    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (NodeGroupsScopedList element : nodeGroupClient.aggregatedListNodeGroups(project).iterateAll()) {
+   *   for (NodeGroupsScopedList element : nodeGroupClient.aggregatedListNodeGroups(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(ProjectName project) { + public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups( + Boolean includeAllScopes, ProjectName project) { AggregatedListNodeGroupsHttpRequest request = AggregatedListNodeGroupsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListNodeGroups(request); @@ -299,20 +308,31 @@ public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(Proj * *

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (NodeGroupsScopedList element : nodeGroupClient.aggregatedListNodeGroups(project.toString()).iterateAll()) {
+   *   for (NodeGroupsScopedList element : nodeGroupClient.aggregatedListNodeGroups(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(String project) { + public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups( + Boolean includeAllScopes, String project) { AggregatedListNodeGroupsHttpRequest request = - AggregatedListNodeGroupsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListNodeGroupsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListNodeGroups(request); } @@ -325,8 +345,10 @@ public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(Stri * *

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeGroupsHttpRequest request = AggregatedListNodeGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (NodeGroupsScopedList element : nodeGroupClient.aggregatedListNodeGroups(request).iterateAll()) {
@@ -353,8 +375,10 @@ public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeGroupsHttpRequest request = AggregatedListNodeGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListNodeGroupsPagedResponse> future = nodeGroupClient.aggregatedListNodeGroupsPagedCallable().futureCall(request);
@@ -381,8 +405,10 @@ public final AggregatedListNodeGroupsPagedResponse aggregatedListNodeGroups(
    *
    * 

    * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeGroupsHttpRequest request = AggregatedListNodeGroupsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -1220,6 +1246,141 @@ public final ListNodesNodeGroupsPagedResponse listNodesNodeGroups(
     return stub.listNodesNodeGroupsCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Patch the node group.
+   *
+   * 

Sample code: + * + *


+   * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   NodeGroup nodeGroupResource = NodeGroup.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   Operation response = nodeGroupClient.patchNodeGroup(nodeGroup, nodeGroupResource, fieldMask);
+   * }
+   * 
+ * + * @param nodeGroup Name of the NodeGroup resource to update. + * @param nodeGroupResource Represent a sole-tenant Node Group resource. + *

A sole-tenant node is a physical server that is dedicated to hosting VM instances only + * for your specific project. Use sole-tenant nodes to keep your instances physically + * separated from instances in other projects, or to group your instances together on the same + * host hardware. For more information, read Sole-tenant nodes. (== resource_for + * {$api_version}.nodeGroups ==) + * @param fieldMask The fields that should be serialized (even if they have empty values). If the + * containing message object has a non-null fieldmask, then all the fields in the field mask + * (and only those fields in the field mask) will be serialized. If the containing object does + * not have a fieldmask, then only non-empty fields will be serialized. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation patchNodeGroup( + ProjectZoneNodeGroupName nodeGroup, NodeGroup nodeGroupResource, List fieldMask) { + PatchNodeGroupHttpRequest request = + PatchNodeGroupHttpRequest.newBuilder() + .setNodeGroup(nodeGroup == null ? null : nodeGroup.toString()) + .setNodeGroupResource(nodeGroupResource) + .addAllFieldMask(fieldMask) + .build(); + return patchNodeGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Patch the node group. + * + *

Sample code: + * + *


+   * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   ProjectZoneNodeGroupName nodeGroup = ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   NodeGroup nodeGroupResource = NodeGroup.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   Operation response = nodeGroupClient.patchNodeGroup(nodeGroup.toString(), nodeGroupResource, fieldMask);
+   * }
+   * 
+ * + * @param nodeGroup Name of the NodeGroup resource to update. + * @param nodeGroupResource Represent a sole-tenant Node Group resource. + *

A sole-tenant node is a physical server that is dedicated to hosting VM instances only + * for your specific project. Use sole-tenant nodes to keep your instances physically + * separated from instances in other projects, or to group your instances together on the same + * host hardware. For more information, read Sole-tenant nodes. (== resource_for + * {$api_version}.nodeGroups ==) + * @param fieldMask The fields that should be serialized (even if they have empty values). If the + * containing message object has a non-null fieldmask, then all the fields in the field mask + * (and only those fields in the field mask) will be serialized. If the containing object does + * not have a fieldmask, then only non-empty fields will be serialized. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation patchNodeGroup( + String nodeGroup, NodeGroup nodeGroupResource, List fieldMask) { + PatchNodeGroupHttpRequest request = + PatchNodeGroupHttpRequest.newBuilder() + .setNodeGroup(nodeGroup) + .setNodeGroupResource(nodeGroupResource) + .addAllFieldMask(fieldMask) + .build(); + return patchNodeGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Patch the node group. + * + *

Sample code: + * + *


+   * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   NodeGroup nodeGroupResource = NodeGroup.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   PatchNodeGroupHttpRequest request = PatchNodeGroupHttpRequest.newBuilder()
+   *     .setNodeGroup(formattedNodeGroup)
+   *     .setNodeGroupResource(nodeGroupResource)
+   *     .addAllFieldMask(fieldMask)
+   *     .build();
+   *   Operation response = nodeGroupClient.patchNodeGroup(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation patchNodeGroup(PatchNodeGroupHttpRequest request) { + return patchNodeGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Patch the node group. + * + *

Sample code: + * + *


+   * try (NodeGroupClient nodeGroupClient = NodeGroupClient.create()) {
+   *   String formattedNodeGroup = ProjectZoneNodeGroupName.format("[PROJECT]", "[ZONE]", "[NODE_GROUP]");
+   *   NodeGroup nodeGroupResource = NodeGroup.newBuilder().build();
+   *   List<String> fieldMask = new ArrayList<>();
+   *   PatchNodeGroupHttpRequest request = PatchNodeGroupHttpRequest.newBuilder()
+   *     .setNodeGroup(formattedNodeGroup)
+   *     .setNodeGroupResource(nodeGroupResource)
+   *     .addAllFieldMask(fieldMask)
+   *     .build();
+   *   ApiFuture<Operation> future = nodeGroupClient.patchNodeGroupCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable patchNodeGroupCallable() { + return stub.patchNodeGroupCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Sets the access control policy on the specified resource. Replaces any existing policy. diff --git a/src/main/java/com/google/cloud/compute/v1/NodeGroupNode.java b/src/main/java/com/google/cloud/compute/v1/NodeGroupNode.java index 7c15c8f49..ef40d65d7 100644 --- a/src/main/java/com/google/cloud/compute/v1/NodeGroupNode.java +++ b/src/main/java/com/google/cloud/compute/v1/NodeGroupNode.java @@ -30,6 +30,7 @@ public final class NodeGroupNode implements ApiMessage { private final String name; private final String nodeType; private final ServerBinding serverBinding; + private final String serverId; private final String status; private NodeGroupNode() { @@ -37,6 +38,7 @@ private NodeGroupNode() { this.name = null; this.nodeType = null; this.serverBinding = null; + this.serverId = null; this.status = null; } @@ -45,11 +47,13 @@ private NodeGroupNode( String name, String nodeType, ServerBinding serverBinding, + String serverId, String status) { this.instances = instances; this.name = name; this.nodeType = nodeType; this.serverBinding = serverBinding; + this.serverId = serverId; this.status = status; } @@ -67,6 +71,9 @@ public Object getFieldValue(String fieldName) { if ("serverBinding".equals(fieldName)) { return serverBinding; } + if ("serverId".equals(fieldName)) { + return serverId; + } if ("status".equals(fieldName)) { return status; } @@ -111,6 +118,11 @@ public ServerBinding getServerBinding() { return serverBinding; } + /** Server ID associated with this node. */ + public String getServerId() { + return serverId; + } + public String getStatus() { return status; } @@ -142,6 +154,7 @@ public static class Builder { private String name; private String nodeType; private ServerBinding serverBinding; + private String serverId; private String status; Builder() {} @@ -160,6 +173,9 @@ public Builder mergeFrom(NodeGroupNode other) { if (other.getServerBinding() != null) { this.serverBinding = other.serverBinding; } + if (other.getServerId() != null) { + this.serverId = other.serverId; + } if (other.getStatus() != null) { this.status = other.status; } @@ -171,6 +187,7 @@ public Builder mergeFrom(NodeGroupNode other) { this.name = source.name; this.nodeType = source.nodeType; this.serverBinding = source.serverBinding; + this.serverId = source.serverId; this.status = source.status; } @@ -230,6 +247,17 @@ public Builder setServerBinding(ServerBinding serverBinding) { return this; } + /** Server ID associated with this node. */ + public String getServerId() { + return serverId; + } + + /** Server ID associated with this node. */ + public Builder setServerId(String serverId) { + this.serverId = serverId; + return this; + } + public String getStatus() { return status; } @@ -241,7 +269,7 @@ public Builder setStatus(String status) { public NodeGroupNode build() { - return new NodeGroupNode(instances, name, nodeType, serverBinding, status); + return new NodeGroupNode(instances, name, nodeType, serverBinding, serverId, status); } public Builder clone() { @@ -250,6 +278,7 @@ public Builder clone() { newBuilder.setName(this.name); newBuilder.setNodeType(this.nodeType); newBuilder.setServerBinding(this.serverBinding); + newBuilder.setServerId(this.serverId); newBuilder.setStatus(this.status); return newBuilder; } @@ -270,6 +299,9 @@ public String toString() { + "serverBinding=" + serverBinding + ", " + + "serverId=" + + serverId + + ", " + "status=" + status + "}"; @@ -286,6 +318,7 @@ public boolean equals(Object o) { && Objects.equals(this.name, that.getName()) && Objects.equals(this.nodeType, that.getNodeType()) && Objects.equals(this.serverBinding, that.getServerBinding()) + && Objects.equals(this.serverId, that.getServerId()) && Objects.equals(this.status, that.getStatus()); } return false; @@ -293,6 +326,6 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(instances, name, nodeType, serverBinding, status); + return Objects.hash(instances, name, nodeType, serverBinding, serverId, status); } } diff --git a/src/main/java/com/google/cloud/compute/v1/NodeGroupSettings.java b/src/main/java/com/google/cloud/compute/v1/NodeGroupSettings.java index a7b6d6e59..5ef807240 100644 --- a/src/main/java/com/google/cloud/compute/v1/NodeGroupSettings.java +++ b/src/main/java/com/google/cloud/compute/v1/NodeGroupSettings.java @@ -124,6 +124,11 @@ public UnaryCallSettings insertNodeGroupS return ((NodeGroupStubSettings) getStubSettings()).listNodesNodeGroupsSettings(); } + /** Returns the object with the settings used for calls to patchNodeGroup. */ + public UnaryCallSettings patchNodeGroupSettings() { + return ((NodeGroupStubSettings) getStubSettings()).patchNodeGroupSettings(); + } + /** Returns the object with the settings used for calls to setIamPolicyNodeGroup. */ public UnaryCallSettings setIamPolicyNodeGroupSettings() { @@ -301,6 +306,12 @@ public UnaryCallSettings.Builder getNodeGrou return getStubSettingsBuilder().listNodesNodeGroupsSettings(); } + /** Returns the builder for the settings used for calls to patchNodeGroup. */ + public UnaryCallSettings.Builder + patchNodeGroupSettings() { + return getStubSettingsBuilder().patchNodeGroupSettings(); + } + /** Returns the builder for the settings used for calls to setIamPolicyNodeGroup. */ public UnaryCallSettings.Builder setIamPolicyNodeGroupSettings() { diff --git a/src/main/java/com/google/cloud/compute/v1/NodeTemplate.java b/src/main/java/com/google/cloud/compute/v1/NodeTemplate.java index cd438134f..62a247fc7 100644 --- a/src/main/java/com/google/cloud/compute/v1/NodeTemplate.java +++ b/src/main/java/com/google/cloud/compute/v1/NodeTemplate.java @@ -30,7 +30,7 @@ * *

You can use a template to define properties for nodes in a node group. For more information, * read Creating node groups and instances. (== resource_for {$api_version}.nodeTemplates ==) (== - * NextID: 18 ==) + * NextID: 19 ==) */ public final class NodeTemplate implements ApiMessage { private final String creationTimestamp; diff --git a/src/main/java/com/google/cloud/compute/v1/NodeTemplateClient.java b/src/main/java/com/google/cloud/compute/v1/NodeTemplateClient.java index 0605519aa..e939eb3b8 100644 --- a/src/main/java/com/google/cloud/compute/v1/NodeTemplateClient.java +++ b/src/main/java/com/google/cloud/compute/v1/NodeTemplateClient.java @@ -160,21 +160,29 @@ public NodeTemplateStub getStub() { * *


    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (NodeTemplatesScopedList element : nodeTemplateClient.aggregatedListNodeTemplates(project).iterateAll()) {
+   *   for (NodeTemplatesScopedList element : nodeTemplateClient.aggregatedListNodeTemplates(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplates( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListNodeTemplatesHttpRequest request = AggregatedListNodeTemplatesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListNodeTemplates(request); @@ -188,21 +196,31 @@ public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplate * *

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (NodeTemplatesScopedList element : nodeTemplateClient.aggregatedListNodeTemplates(project.toString()).iterateAll()) {
+   *   for (NodeTemplatesScopedList element : nodeTemplateClient.aggregatedListNodeTemplates(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplates( - String project) { + Boolean includeAllScopes, String project) { AggregatedListNodeTemplatesHttpRequest request = - AggregatedListNodeTemplatesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListNodeTemplatesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListNodeTemplates(request); } @@ -214,8 +232,10 @@ public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplate * *

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTemplatesHttpRequest request = AggregatedListNodeTemplatesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (NodeTemplatesScopedList element : nodeTemplateClient.aggregatedListNodeTemplates(request).iterateAll()) {
@@ -241,8 +261,10 @@ public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplate
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTemplatesHttpRequest request = AggregatedListNodeTemplatesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListNodeTemplatesPagedResponse> future = nodeTemplateClient.aggregatedListNodeTemplatesPagedCallable().futureCall(request);
@@ -268,8 +290,10 @@ public final AggregatedListNodeTemplatesPagedResponse aggregatedListNodeTemplate
    *
    * 

    * try (NodeTemplateClient nodeTemplateClient = NodeTemplateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTemplatesHttpRequest request = AggregatedListNodeTemplatesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -607,7 +631,7 @@ public final Policy getIamPolicyNodeTemplate(GetIamPolicyNodeTemplateHttpRequest
    * @param nodeTemplateResource Represent a sole-tenant Node Template resource.
    *     

You can use a template to define properties for nodes in a node group. For more * information, read Creating node groups and instances. (== resource_for - * {$api_version}.nodeTemplates ==) (== NextID: 18 ==) + * {$api_version}.nodeTemplates ==) (== NextID: 19 ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -640,7 +664,7 @@ public final Operation insertNodeTemplate( * @param nodeTemplateResource Represent a sole-tenant Node Template resource. *

You can use a template to define properties for nodes in a node group. For more * information, read Creating node groups and instances. (== resource_for - * {$api_version}.nodeTemplates ==) (== NextID: 18 ==) + * {$api_version}.nodeTemplates ==) (== NextID: 19 ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi diff --git a/src/main/java/com/google/cloud/compute/v1/NodeTypeClient.java b/src/main/java/com/google/cloud/compute/v1/NodeTypeClient.java index 269d646d1..6200f6b50 100644 --- a/src/main/java/com/google/cloud/compute/v1/NodeTypeClient.java +++ b/src/main/java/com/google/cloud/compute/v1/NodeTypeClient.java @@ -159,20 +159,29 @@ public NodeTypeStub getStub() { * *


    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (NodeTypesScopedList element : nodeTypeClient.aggregatedListNodeTypes(project).iterateAll()) {
+   *   for (NodeTypesScopedList element : nodeTypeClient.aggregatedListNodeTypes(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(ProjectName project) { + public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes( + Boolean includeAllScopes, ProjectName project) { AggregatedListNodeTypesHttpRequest request = AggregatedListNodeTypesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListNodeTypes(request); @@ -186,20 +195,31 @@ public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(Projec * *

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (NodeTypesScopedList element : nodeTypeClient.aggregatedListNodeTypes(project.toString()).iterateAll()) {
+   *   for (NodeTypesScopedList element : nodeTypeClient.aggregatedListNodeTypes(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(String project) { + public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes( + Boolean includeAllScopes, String project) { AggregatedListNodeTypesHttpRequest request = - AggregatedListNodeTypesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListNodeTypesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListNodeTypes(request); } @@ -211,8 +231,10 @@ public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(String * *

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTypesHttpRequest request = AggregatedListNodeTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (NodeTypesScopedList element : nodeTypeClient.aggregatedListNodeTypes(request).iterateAll()) {
@@ -238,8 +260,10 @@ public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTypesHttpRequest request = AggregatedListNodeTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListNodeTypesPagedResponse> future = nodeTypeClient.aggregatedListNodeTypesPagedCallable().futureCall(request);
@@ -265,8 +289,10 @@ public final AggregatedListNodeTypesPagedResponse aggregatedListNodeTypes(
    *
    * 

    * try (NodeTypeClient nodeTypeClient = NodeTypeClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListNodeTypesHttpRequest request = AggregatedListNodeTypesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/Operation.java b/src/main/java/com/google/cloud/compute/v1/Operation.java
index 1c2911eb0..c7f6e8285 100644
--- a/src/main/java/com/google/cloud/compute/v1/Operation.java
+++ b/src/main/java/com/google/cloud/compute/v1/Operation.java
@@ -30,16 +30,16 @@
  *
  * 

Google Compute Engine has three Operation resources: * - *

* [Global](/compute/docs/reference/rest/latest/globalOperations) * - * [Regional](/compute/docs/reference/rest/latest/regionOperations) * - * [Zonal](/compute/docs/reference/rest/latest/zoneOperations) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * + * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations) * *

You can use an operation resource to manage asynchronous API requests. For more information, * read Handling API responses. * *

Operations can be global, regional or zonal. - For global operations, use the globalOperations * resource. - For regional operations, use the regionOperations resource. - For zonal operations, - * use the zonalOperations resource. + * use the zoneOperations resource. * *

For more information, read Global, Regional, and Zonal Resources. (== resource_for * {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== diff --git a/src/main/java/com/google/cloud/compute/v1/PacketMirroringClient.java b/src/main/java/com/google/cloud/compute/v1/PacketMirroringClient.java index e2dca7f0b..09332dcd5 100644 --- a/src/main/java/com/google/cloud/compute/v1/PacketMirroringClient.java +++ b/src/main/java/com/google/cloud/compute/v1/PacketMirroringClient.java @@ -162,21 +162,29 @@ public PacketMirroringStub getStub() { * *


    * try (PacketMirroringClient packetMirroringClient = PacketMirroringClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (PacketMirroringsScopedList element : packetMirroringClient.aggregatedListPacketMirrorings(project).iterateAll()) {
+   *   for (PacketMirroringsScopedList element : packetMirroringClient.aggregatedListPacketMirrorings(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListPacketMirroringsPagedResponse aggregatedListPacketMirrorings( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListPacketMirroringsHttpRequest request = AggregatedListPacketMirroringsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListPacketMirrorings(request); @@ -190,21 +198,31 @@ public final AggregatedListPacketMirroringsPagedResponse aggregatedListPacketMir * *

    * try (PacketMirroringClient packetMirroringClient = PacketMirroringClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (PacketMirroringsScopedList element : packetMirroringClient.aggregatedListPacketMirrorings(project.toString()).iterateAll()) {
+   *   for (PacketMirroringsScopedList element : packetMirroringClient.aggregatedListPacketMirrorings(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListPacketMirroringsPagedResponse aggregatedListPacketMirrorings( - String project) { + Boolean includeAllScopes, String project) { AggregatedListPacketMirroringsHttpRequest request = - AggregatedListPacketMirroringsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListPacketMirroringsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListPacketMirrorings(request); } @@ -216,8 +234,10 @@ public final AggregatedListPacketMirroringsPagedResponse aggregatedListPacketMir * *

    * try (PacketMirroringClient packetMirroringClient = PacketMirroringClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListPacketMirroringsHttpRequest request = AggregatedListPacketMirroringsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (PacketMirroringsScopedList element : packetMirroringClient.aggregatedListPacketMirrorings(request).iterateAll()) {
@@ -243,8 +263,10 @@ public final AggregatedListPacketMirroringsPagedResponse aggregatedListPacketMir
    *
    * 

    * try (PacketMirroringClient packetMirroringClient = PacketMirroringClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListPacketMirroringsHttpRequest request = AggregatedListPacketMirroringsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListPacketMirroringsPagedResponse> future = packetMirroringClient.aggregatedListPacketMirroringsPagedCallable().futureCall(request);
@@ -270,8 +292,10 @@ public final AggregatedListPacketMirroringsPagedResponse aggregatedListPacketMir
    *
    * 

    * try (PacketMirroringClient packetMirroringClient = PacketMirroringClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListPacketMirroringsHttpRequest request = AggregatedListPacketMirroringsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/PatchAutoscalerHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchAutoscalerHttpRequest.java
index 04996d840..84b4a0a35 100644
--- a/src/main/java/com/google/cloud/compute/v1/PatchAutoscalerHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/PatchAutoscalerHttpRequest.java
@@ -148,8 +148,8 @@ public String getAutoscaler() {
    *
    * 

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups of @@ -353,8 +353,8 @@ public Builder setAutoscaler(String autoscaler) { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups @@ -374,8 +374,8 @@ public Autoscaler getAutoscalerResource() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups diff --git a/src/main/java/com/google/cloud/compute/v1/PatchBackendServiceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchBackendServiceHttpRequest.java index 085874824..49b26e996 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchBackendServiceHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchBackendServiceHttpRequest.java @@ -27,8 +27,8 @@ @BetaApi /** * Request object for method compute.backendServices.patch. Patches the specified BackendService - * resource with the data included in the request. There are several restrictions and guidelines to - * keep in mind when updating a backend service. Read Restrictions and Guidelines for more + * resource with the data included in the request. There are several Understanding backend services + * to keep in mind when updating a backend service. Read Understanding backend services for more * information. This method supports PATCH semantics and uses the JSON merge patch format and * processing rules. */ @@ -153,8 +153,8 @@ public String getBackendService() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -354,8 +354,8 @@ public Builder setBackendService(String backendService) { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -373,8 +373,8 @@ public BackendService getBackendServiceResource() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * diff --git a/src/main/java/com/google/cloud/compute/v1/PatchForwardingRuleHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchForwardingRuleHttpRequest.java index e63be0561..d26b15955 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchForwardingRuleHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchForwardingRuleHttpRequest.java @@ -168,8 +168,8 @@ public String getForwardingRule() { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of a * Google Cloud Platform load balancer. Forwarding rules can also reference target instances and @@ -412,8 +412,8 @@ public Builder setForwardingRule(String forwardingRule) { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of * a Google Cloud Platform load balancer. Forwarding rules can also reference target instances @@ -434,8 +434,8 @@ public ForwardingRule getForwardingRuleResource() { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of * a Google Cloud Platform load balancer. Forwarding rules can also reference target instances diff --git a/src/main/java/com/google/cloud/compute/v1/PatchGlobalForwardingRuleHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchGlobalForwardingRuleHttpRequest.java index ac858ad36..acce57755 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchGlobalForwardingRuleHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchGlobalForwardingRuleHttpRequest.java @@ -169,8 +169,8 @@ public String getForwardingRule() { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of a * Google Cloud Platform load balancer. Forwarding rules can also reference target instances and @@ -413,8 +413,8 @@ public Builder setForwardingRule(String forwardingRule) { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of * a Google Cloud Platform load balancer. Forwarding rules can also reference target instances @@ -435,8 +435,8 @@ public ForwardingRule getForwardingRuleResource() { * *

Forwarding rule resources in GCP can be either regional or global in scope: * - *

* [Global](/compute/docs/reference/rest/latest/globalForwardingRules) * - * [Regional](/compute/docs/reference/rest/latest/forwardingRules) + *

* [Global](/compute/docs/reference/rest/{$api_version}/globalForwardingRules) * + * [Regional](/compute/docs/reference/rest/{$api_version}/forwardingRules) * *

A forwarding rule and its corresponding IP address represent the frontend configuration of * a Google Cloud Platform load balancer. Forwarding rules can also reference target instances diff --git a/src/main/java/com/google/cloud/compute/v1/PatchHealthCheckHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchHealthCheckHttpRequest.java index bd3b745b4..be79b0713 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchHealthCheckHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchHealthCheckHttpRequest.java @@ -167,8 +167,8 @@ public String getHealthCheck() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -408,8 +408,8 @@ public Builder setHealthCheck(String healthCheck) { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -427,8 +427,8 @@ public HealthCheck getHealthCheckResource() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more diff --git a/src/main/java/com/google/cloud/compute/v1/PatchNodeGroupHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchNodeGroupHttpRequest.java new file mode 100644 index 000000000..13d1f3b10 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/PatchNodeGroupHttpRequest.java @@ -0,0 +1,619 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** Request object for method compute.nodeGroups.patch. Patch the node group. */ +public final class PatchNodeGroupHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final List fieldMask; + private final String fields; + private final String key; + private final String nodeGroup; + private final NodeGroup nodeGroupResource; + private final String prettyPrint; + private final String quotaUser; + private final String requestId; + private final String userIp; + + private PatchNodeGroupHttpRequest() { + this.access_token = null; + this.callback = null; + this.fieldMask = null; + this.fields = null; + this.key = null; + this.nodeGroup = null; + this.nodeGroupResource = null; + this.prettyPrint = null; + this.quotaUser = null; + this.requestId = null; + this.userIp = null; + } + + private PatchNodeGroupHttpRequest( + String access_token, + String callback, + List fieldMask, + String fields, + String key, + String nodeGroup, + NodeGroup nodeGroupResource, + String prettyPrint, + String quotaUser, + String requestId, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fieldMask = fieldMask; + this.fields = fields; + this.key = key; + this.nodeGroup = nodeGroup; + this.nodeGroupResource = nodeGroupResource; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.requestId = requestId; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fieldMask".equals(fieldName)) { + return fieldMask; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("key".equals(fieldName)) { + return key; + } + if ("nodeGroup".equals(fieldName)) { + return nodeGroup; + } + if ("nodeGroupResource".equals(fieldName)) { + return nodeGroupResource; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("requestId".equals(fieldName)) { + return requestId; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public NodeGroup getApiMessageRequestBody() { + return nodeGroupResource; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return fieldMask; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * Name of the NodeGroup resource to update. It must have the format + * `{project}/zones/{zone}/nodeGroups/{nodeGroup}`. \`{nodeGroup}\` must start with a letter, and + * contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores + * (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must + * be between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public String getNodeGroup() { + return nodeGroup; + } + + /** + * Represent a sole-tenant Node Group resource. + * + *

A sole-tenant node is a physical server that is dedicated to hosting VM instances only for + * your specific project. Use sole-tenant nodes to keep your instances physically separated from + * instances in other projects, or to group your instances together on the same host hardware. For + * more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==) + */ + public NodeGroup getNodeGroupResource() { + return nodeGroupResource; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(PatchNodeGroupHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static PatchNodeGroupHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final PatchNodeGroupHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new PatchNodeGroupHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private List fieldMask; + private String fields; + private String key; + private String nodeGroup; + private NodeGroup nodeGroupResource; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(PatchNodeGroupHttpRequest other) { + if (other == PatchNodeGroupHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFieldMask() != null) { + this.fieldMask = other.fieldMask; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getNodeGroup() != null) { + this.nodeGroup = other.nodeGroup; + } + if (other.getNodeGroupResource() != null) { + this.nodeGroupResource = other.nodeGroupResource; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(PatchNodeGroupHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fieldMask = source.fieldMask; + this.fields = source.fields; + this.key = source.key; + this.nodeGroup = source.nodeGroup; + this.nodeGroupResource = source.nodeGroupResource; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return fieldMask; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public Builder addAllFieldMask(List fieldMask) { + if (this.fieldMask == null) { + this.fieldMask = new LinkedList<>(); + } + this.fieldMask.addAll(fieldMask); + return this; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public Builder addFieldMask(String fieldMask) { + if (this.fieldMask == null) { + this.fieldMask = new LinkedList<>(); + } + this.fieldMask.add(fieldMask); + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * Name of the NodeGroup resource to update. It must have the format + * `{project}/zones/{zone}/nodeGroups/{nodeGroup}`. \`{nodeGroup}\` must start with a letter, + * and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * + * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs + * (\`%\`). It must be between 3 and 255 characters in length, and it * must not start with + * \`"goog"\`. + */ + public String getNodeGroup() { + return nodeGroup; + } + + /** + * Name of the NodeGroup resource to update. It must have the format + * `{project}/zones/{zone}/nodeGroups/{nodeGroup}`. \`{nodeGroup}\` must start with a letter, + * and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * + * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs + * (\`%\`). It must be between 3 and 255 characters in length, and it * must not start with + * \`"goog"\`. + */ + public Builder setNodeGroup(String nodeGroup) { + this.nodeGroup = nodeGroup; + return this; + } + + /** + * Represent a sole-tenant Node Group resource. + * + *

A sole-tenant node is a physical server that is dedicated to hosting VM instances only for + * your specific project. Use sole-tenant nodes to keep your instances physically separated from + * instances in other projects, or to group your instances together on the same host hardware. + * For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==) + */ + public NodeGroup getNodeGroupResource() { + return nodeGroupResource; + } + + /** + * Represent a sole-tenant Node Group resource. + * + *

A sole-tenant node is a physical server that is dedicated to hosting VM instances only for + * your specific project. Use sole-tenant nodes to keep your instances physically separated from + * instances in other projects, or to group your instances together on the same host hardware. + * For more information, read Sole-tenant nodes. (== resource_for {$api_version}.nodeGroups ==) + */ + public Builder setNodeGroupResource(NodeGroup nodeGroupResource) { + this.nodeGroupResource = nodeGroupResource; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public PatchNodeGroupHttpRequest build() { + String missing = ""; + + if (fieldMask == null) { + missing += " fieldMask"; + } + + if (nodeGroup == null) { + missing += " nodeGroup"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new PatchNodeGroupHttpRequest( + access_token, + callback, + fieldMask, + fields, + key, + nodeGroup, + nodeGroupResource, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.addAllFieldMask(this.fieldMask); + newBuilder.setFields(this.fields); + newBuilder.setKey(this.key); + newBuilder.setNodeGroup(this.nodeGroup); + newBuilder.setNodeGroupResource(this.nodeGroupResource); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "PatchNodeGroupHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fieldMask=" + + fieldMask + + ", " + + "fields=" + + fields + + ", " + + "key=" + + key + + ", " + + "nodeGroup=" + + nodeGroup + + ", " + + "nodeGroupResource=" + + nodeGroupResource + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof PatchNodeGroupHttpRequest) { + PatchNodeGroupHttpRequest that = (PatchNodeGroupHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fieldMask, that.getFieldMask()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.nodeGroup, that.getNodeGroup()) + && Objects.equals(this.nodeGroupResource, that.getNodeGroupResource()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fieldMask, + fields, + key, + nodeGroup, + nodeGroupResource, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/PatchRegionAutoscalerHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchRegionAutoscalerHttpRequest.java index f2a873cb7..84a9c7551 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchRegionAutoscalerHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchRegionAutoscalerHttpRequest.java @@ -148,8 +148,8 @@ public String getAutoscaler() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups of @@ -353,8 +353,8 @@ public Builder setAutoscaler(String autoscaler) { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups @@ -374,8 +374,8 @@ public Autoscaler getAutoscalerResource() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups diff --git a/src/main/java/com/google/cloud/compute/v1/PatchRegionBackendServiceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchRegionBackendServiceHttpRequest.java index da15de033..c53efb449 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchRegionBackendServiceHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchRegionBackendServiceHttpRequest.java @@ -27,10 +27,10 @@ @BetaApi /** * Request object for method compute.regionBackendServices.patch. Updates the specified regional - * BackendService resource with the data included in the request. There are several restrictions and - * guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for - * more information. This method supports PATCH semantics and uses the JSON merge patch format and - * processing rules. + * BackendService resource with the data included in the request. There are several Understanding + * backend services to keep in mind when updating a backend service. Read Understanding backend + * services for more information. This method supports PATCH semantics and uses the JSON merge patch + * format and processing rules. */ public final class PatchRegionBackendServiceHttpRequest implements ApiMessage { private final String access_token; @@ -153,8 +153,8 @@ public String getBackendService() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -354,8 +354,8 @@ public Builder setBackendService(String backendService) { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -373,8 +373,8 @@ public BackendService getBackendServiceResource() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * diff --git a/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckHttpRequest.java index a5c79347c..c3680234b 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckHttpRequest.java @@ -168,8 +168,8 @@ public String getHealthCheck() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -409,8 +409,8 @@ public Builder setHealthCheck(String healthCheck) { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -428,8 +428,8 @@ public HealthCheck getHealthCheckResource() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more diff --git a/src/main/java/com/google/cloud/compute/v1/PatchRegionUrlMapHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchRegionUrlMapHttpRequest.java index f7c9789b5..55af67ee7 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchRegionUrlMapHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchRegionUrlMapHttpRequest.java @@ -187,8 +187,8 @@ public String getUrlMap() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -445,8 +445,8 @@ public Builder setUrlMap(String urlMap) { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -471,8 +471,8 @@ public UrlMap getUrlMapResource() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. diff --git a/src/main/java/com/google/cloud/compute/v1/PatchUrlMapHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/PatchUrlMapHttpRequest.java index c4da87242..afbceef55 100644 --- a/src/main/java/com/google/cloud/compute/v1/PatchUrlMapHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/PatchUrlMapHttpRequest.java @@ -199,8 +199,8 @@ public String getUrlMap() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -481,8 +481,8 @@ public Builder setUrlMap(String urlMap) { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -507,8 +507,8 @@ public UrlMap getUrlMapResource() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. diff --git a/src/main/java/com/google/cloud/compute/v1/PerInstanceConfig.java b/src/main/java/com/google/cloud/compute/v1/PerInstanceConfig.java index 81f2c4160..31bd335af 100644 --- a/src/main/java/com/google/cloud/compute/v1/PerInstanceConfig.java +++ b/src/main/java/com/google/cloud/compute/v1/PerInstanceConfig.java @@ -68,8 +68,8 @@ public List getFieldMask() { } /** - * Fingerprint of this per-instance config. This field may be used in optimistic locking. It will - * be ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in + * Fingerprint of this per-instance config. This field can be used in optimistic locking. It is + * ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in * order to update an existing per-instance config or the field needs to be unset. */ public String getFingerprint() { @@ -77,11 +77,11 @@ public String getFingerprint() { } /** - * The name of the per-instance config and the corresponding instance. Serves as a merge key - * during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name + * The name of a per-instance config and its corresponding instance. Serves as a merge key during + * UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same name * exists then it will be updated, otherwise a new one will be created for the VM instance with * the same name. An attempt to create a per-instance config for a VM instance that either doesn't - * exist or is not part of the group will result in a failure. + * exist or is not part of the group will result in an error. */ public String getName() { return name; @@ -132,18 +132,18 @@ public Builder mergeFrom(PerInstanceConfig other) { } /** - * Fingerprint of this per-instance config. This field may be used in optimistic locking. It - * will be ignored when inserting a per-instance config. An up-to-date fingerprint must be - * provided in order to update an existing per-instance config or the field needs to be unset. + * Fingerprint of this per-instance config. This field can be used in optimistic locking. It is + * ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in + * order to update an existing per-instance config or the field needs to be unset. */ public String getFingerprint() { return fingerprint; } /** - * Fingerprint of this per-instance config. This field may be used in optimistic locking. It - * will be ignored when inserting a per-instance config. An up-to-date fingerprint must be - * provided in order to update an existing per-instance config or the field needs to be unset. + * Fingerprint of this per-instance config. This field can be used in optimistic locking. It is + * ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in + * order to update an existing per-instance config or the field needs to be unset. */ public Builder setFingerprint(String fingerprint) { this.fingerprint = fingerprint; @@ -151,22 +151,22 @@ public Builder setFingerprint(String fingerprint) { } /** - * The name of the per-instance config and the corresponding instance. Serves as a merge key - * during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name - * exists then it will be updated, otherwise a new one will be created for the VM instance with - * the same name. An attempt to create a per-instance config for a VM instance that either - * doesn't exist or is not part of the group will result in a failure. + * The name of a per-instance config and its corresponding instance. Serves as a merge key + * during UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same + * name exists then it will be updated, otherwise a new one will be created for the VM instance + * with the same name. An attempt to create a per-instance config for a VM instance that either + * doesn't exist or is not part of the group will result in an error. */ public String getName() { return name; } /** - * The name of the per-instance config and the corresponding instance. Serves as a merge key - * during UpdatePerInstanceConfigs operation, i.e. if per-instance config with the same name - * exists then it will be updated, otherwise a new one will be created for the VM instance with - * the same name. An attempt to create a per-instance config for a VM instance that either - * doesn't exist or is not part of the group will result in a failure. + * The name of a per-instance config and its corresponding instance. Serves as a merge key + * during UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same + * name exists then it will be updated, otherwise a new one will be created for the VM instance + * with the same name. An attempt to create a per-instance config for a VM instance that either + * doesn't exist or is not part of the group will result in an error. */ public Builder setName(String name) { this.name = name; diff --git a/src/main/java/com/google/cloud/compute/v1/ProjectGlobalNetworkEndpointGroupName.java b/src/main/java/com/google/cloud/compute/v1/ProjectGlobalNetworkEndpointGroupName.java new file mode 100644 index 000000000..4348fa624 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/ProjectGlobalNetworkEndpointGroupName.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.api.resourcenames.ResourceNameFactory; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +@Generated("by GAPIC") +@BetaApi +public final class ProjectGlobalNetworkEndpointGroupName implements ResourceName { + private final String networkEndpointGroup; + private final String project; + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "{project}/global/networkEndpointGroups/{networkEndpointGroup}"); + + public static final String SERVICE_ADDRESS = + "https://compute.googleapis.com/compute/v1/projects/"; + + private volatile Map fieldValuesMap; + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ProjectGlobalNetworkEndpointGroupName(Builder builder) { + networkEndpointGroup = Preconditions.checkNotNull(builder.getNetworkEndpointGroup()); + project = Preconditions.checkNotNull(builder.getProject()); + } + + public static ProjectGlobalNetworkEndpointGroupName of( + String networkEndpointGroup, String project) { + return newBuilder().setNetworkEndpointGroup(networkEndpointGroup).setProject(project).build(); + } + + public static String format(String networkEndpointGroup, String project) { + return of(networkEndpointGroup, project).toString(); + } + + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + public String getProject() { + return project; + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("networkEndpointGroup", networkEndpointGroup); + fieldMapBuilder.put("project", project); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + public static ResourceNameFactory newFactory() { + return new ResourceNameFactory() { + public ProjectGlobalNetworkEndpointGroupName parse(String formattedString) { + return ProjectGlobalNetworkEndpointGroupName.parse(formattedString); + } + }; + } + + public static ProjectGlobalNetworkEndpointGroupName parse(String formattedString) { + String resourcePath = formattedString; + if (formattedString.startsWith(SERVICE_ADDRESS)) { + resourcePath = formattedString.substring(SERVICE_ADDRESS.length()); + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + resourcePath, + "ProjectGlobalNetworkEndpointGroupName.parse: formattedString not in valid format"); + return of(matchMap.get("networkEndpointGroup"), matchMap.get("project")); + } + + public static boolean isParsableFrom(String formattedString) { + String resourcePath = formattedString; + if (formattedString.startsWith(SERVICE_ADDRESS)) { + resourcePath = formattedString.substring(SERVICE_ADDRESS.length()); + } + return PATH_TEMPLATE.matches(resourcePath); + } + + public static class Builder { + private String networkEndpointGroup; + private String project; + + public String getNetworkEndpointGroup() { + return networkEndpointGroup; + } + + public String getProject() { + return project; + } + + public Builder setNetworkEndpointGroup(String networkEndpointGroup) { + this.networkEndpointGroup = networkEndpointGroup; + return this; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder() {} + + public Builder(ProjectGlobalNetworkEndpointGroupName projectGlobalNetworkEndpointGroupName) { + networkEndpointGroup = projectGlobalNetworkEndpointGroupName.networkEndpointGroup; + project = projectGlobalNetworkEndpointGroupName.project; + } + + public ProjectGlobalNetworkEndpointGroupName build() { + return new ProjectGlobalNetworkEndpointGroupName(this); + } + } + + @Override + public String toString() { + return SERVICE_ADDRESS + + PATH_TEMPLATE.instantiate( + "networkEndpointGroup", networkEndpointGroup, + "project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ProjectGlobalNetworkEndpointGroupName) { + ProjectGlobalNetworkEndpointGroupName that = (ProjectGlobalNetworkEndpointGroupName) o; + return Objects.equals(this.networkEndpointGroup, that.getNetworkEndpointGroup()) + && Objects.equals(this.project, that.getProject()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(networkEndpointGroup, project); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerClient.java b/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerClient.java index 9d95c2168..3de639d65 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerClient.java @@ -363,8 +363,8 @@ public final Autoscaler getRegionAutoscaler(GetRegionAutoscalerHttpRequest reque * @param region Name of the region scoping this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -402,8 +402,8 @@ public final Operation insertRegionAutoscaler( * @param region Name of the region scoping this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -634,8 +634,8 @@ public final ListRegionAutoscalersPagedResponse listRegionAutoscalers( * @param region Name of the region scoping this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -686,8 +686,8 @@ public final Operation patchRegionAutoscaler( * @param region Name of the region scoping this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -796,8 +796,8 @@ public final Operation patchRegionAutoscaler(PatchRegionAutoscalerHttpRequest re * @param region Name of the region scoping this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. @@ -847,8 +847,8 @@ public final Operation updateRegionAutoscaler( * @param region Name of the region scoping this request. * @param autoscalerResource Represents an Autoscaler resource. *

Google Compute Engine has two Autoscaler resources: - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups * of Instances. diff --git a/src/main/java/com/google/cloud/compute/v1/RegionBackendServiceClient.java b/src/main/java/com/google/cloud/compute/v1/RegionBackendServiceClient.java index 02b49e032..989baba8d 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionBackendServiceClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionBackendServiceClient.java @@ -466,7 +466,7 @@ public final BackendServiceGroupHealth getHealthRegionBackendService( /** * Creates a regional BackendService resource in the specified project using the data included in * the request. There are several restrictions and guidelines to keep in mind when creating a - * regional backend service. Read Restrictions and Guidelines for more information. + * regional backend service. Read Understanding backend services for more information. * *

Sample code: * @@ -483,8 +483,8 @@ public final BackendServiceGroupHealth getHealthRegionBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -504,7 +504,7 @@ public final Operation insertRegionBackendService( /** * Creates a regional BackendService resource in the specified project using the data included in * the request. There are several restrictions and guidelines to keep in mind when creating a - * regional backend service. Read Restrictions and Guidelines for more information. + * regional backend service. Read Understanding backend services for more information. * *

Sample code: * @@ -521,8 +521,8 @@ public final Operation insertRegionBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -542,7 +542,7 @@ public final Operation insertRegionBackendService( /** * Creates a regional BackendService resource in the specified project using the data included in * the request. There are several restrictions and guidelines to keep in mind when creating a - * regional backend service. Read Restrictions and Guidelines for more information. + * regional backend service. Read Understanding backend services for more information. * *

Sample code: * @@ -570,7 +570,7 @@ public final Operation insertRegionBackendService(InsertRegionBackendServiceHttp /** * Creates a regional BackendService resource in the specified project using the data included in * the request. There are several restrictions and guidelines to keep in mind when creating a - * regional backend service. Read Restrictions and Guidelines for more information. + * regional backend service. Read Understanding backend services for more information. * *

Sample code: * @@ -742,9 +742,9 @@ public final ListRegionBackendServicesPagedResponse listRegionBackendServices( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified regional BackendService resource with the data included in the request. - * There are several restrictions and guidelines to keep in mind when updating a backend service. - * Read Restrictions and Guidelines for more information. This method supports PATCH semantics and - * uses the JSON merge patch format and processing rules. + * There are several Understanding backend services to keep in mind when updating a backend + * service. Read Understanding backend services for more information. This method supports PATCH + * semantics and uses the JSON merge patch format and processing rules. * *

Sample code: * @@ -762,8 +762,8 @@ public final ListRegionBackendServicesPagedResponse listRegionBackendServices( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @param fieldMask The fields that should be serialized (even if they have empty values). If the @@ -789,9 +789,9 @@ public final Operation patchRegionBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified regional BackendService resource with the data included in the request. - * There are several restrictions and guidelines to keep in mind when updating a backend service. - * Read Restrictions and Guidelines for more information. This method supports PATCH semantics and - * uses the JSON merge patch format and processing rules. + * There are several Understanding backend services to keep in mind when updating a backend + * service. Read Understanding backend services for more information. This method supports PATCH + * semantics and uses the JSON merge patch format and processing rules. * *

Sample code: * @@ -809,8 +809,8 @@ public final Operation patchRegionBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @param fieldMask The fields that should be serialized (even if they have empty values). If the @@ -834,9 +834,9 @@ public final Operation patchRegionBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified regional BackendService resource with the data included in the request. - * There are several restrictions and guidelines to keep in mind when updating a backend service. - * Read Restrictions and Guidelines for more information. This method supports PATCH semantics and - * uses the JSON merge patch format and processing rules. + * There are several Understanding backend services to keep in mind when updating a backend + * service. Read Understanding backend services for more information. This method supports PATCH + * semantics and uses the JSON merge patch format and processing rules. * *

Sample code: * @@ -865,9 +865,9 @@ public final Operation patchRegionBackendService(PatchRegionBackendServiceHttpRe // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified regional BackendService resource with the data included in the request. - * There are several restrictions and guidelines to keep in mind when updating a backend service. - * Read Restrictions and Guidelines for more information. This method supports PATCH semantics and - * uses the JSON merge patch format and processing rules. + * There are several Understanding backend services to keep in mind when updating a backend + * service. Read Understanding backend services for more information. This method supports PATCH + * semantics and uses the JSON merge patch format and processing rules. * *

Sample code: * @@ -896,8 +896,8 @@ public final Operation patchRegionBackendService(PatchRegionBackendServiceHttpRe // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified regional BackendService resource with the data included in the request. - * There are several restrictions and guidelines to keep in mind when updating a backend service. - * Read Restrictions and Guidelines for more information. + * There are several Understanding backend services to keep in mind when updating a backend + * service. Read Understanding backend services for more information. * *

Sample code: * @@ -915,8 +915,8 @@ public final Operation patchRegionBackendService(PatchRegionBackendServiceHttpRe *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @param fieldMask The fields that should be serialized (even if they have empty values). If the @@ -942,8 +942,8 @@ public final Operation updateRegionBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified regional BackendService resource with the data included in the request. - * There are several restrictions and guidelines to keep in mind when updating a backend service. - * Read Restrictions and Guidelines for more information. + * There are several Understanding backend services to keep in mind when updating a backend + * service. Read Understanding backend services for more information. * *

Sample code: * @@ -961,8 +961,8 @@ public final Operation updateRegionBackendService( *

A backend service contains configuration values for Google Cloud Platform load balancing * services. *

Backend services in Google Compute Engine can be either regionally or globally scoped. - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) *

For more information, read Backend Services. *

(== resource_for {$api_version}.backendService ==) * @param fieldMask The fields that should be serialized (even if they have empty values). If the @@ -986,8 +986,8 @@ public final Operation updateRegionBackendService( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified regional BackendService resource with the data included in the request. - * There are several restrictions and guidelines to keep in mind when updating a backend service. - * Read Restrictions and Guidelines for more information. + * There are several Understanding backend services to keep in mind when updating a backend + * service. Read Understanding backend services for more information. * *

Sample code: * @@ -1016,8 +1016,8 @@ public final Operation updateRegionBackendService(UpdateRegionBackendServiceHttp // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates the specified regional BackendService resource with the data included in the request. - * There are several restrictions and guidelines to keep in mind when updating a backend service. - * Read Restrictions and Guidelines for more information. + * There are several Understanding backend services to keep in mind when updating a backend + * service. Read Understanding backend services for more information. * *

Sample code: * diff --git a/src/main/java/com/google/cloud/compute/v1/RegionCommitmentClient.java b/src/main/java/com/google/cloud/compute/v1/RegionCommitmentClient.java index bf39b298a..0d0dc5b9a 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionCommitmentClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionCommitmentClient.java @@ -162,21 +162,29 @@ public RegionCommitmentStub getStub() { * *


    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (CommitmentsScopedList element : regionCommitmentClient.aggregatedListRegionCommitments(project).iterateAll()) {
+   *   for (CommitmentsScopedList element : regionCommitmentClient.aggregatedListRegionCommitments(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCommitments( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListRegionCommitmentsHttpRequest request = AggregatedListRegionCommitmentsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListRegionCommitments(request); @@ -190,21 +198,31 @@ public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCo * *

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (CommitmentsScopedList element : regionCommitmentClient.aggregatedListRegionCommitments(project.toString()).iterateAll()) {
+   *   for (CommitmentsScopedList element : regionCommitmentClient.aggregatedListRegionCommitments(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCommitments( - String project) { + Boolean includeAllScopes, String project) { AggregatedListRegionCommitmentsHttpRequest request = - AggregatedListRegionCommitmentsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListRegionCommitmentsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListRegionCommitments(request); } @@ -216,8 +234,10 @@ public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCo * *

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRegionCommitmentsHttpRequest request = AggregatedListRegionCommitmentsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (CommitmentsScopedList element : regionCommitmentClient.aggregatedListRegionCommitments(request).iterateAll()) {
@@ -243,8 +263,10 @@ public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCo
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRegionCommitmentsHttpRequest request = AggregatedListRegionCommitmentsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListRegionCommitmentsPagedResponse> future = regionCommitmentClient.aggregatedListRegionCommitmentsPagedCallable().futureCall(request);
@@ -270,8 +292,10 @@ public final AggregatedListRegionCommitmentsPagedResponse aggregatedListRegionCo
    *
    * 

    * try (RegionCommitmentClient regionCommitmentClient = RegionCommitmentClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRegionCommitmentsHttpRequest request = AggregatedListRegionCommitmentsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java b/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java
index 1771b1b94..c8283f6a3 100644
--- a/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java
+++ b/src/main/java/com/google/cloud/compute/v1/RegionDiskClient.java
@@ -599,8 +599,8 @@ public final UnaryCallable getRegionDiskCallable
    * @param region Name of the region for this request.
    * @param diskResource Represents a Persistent Disk resource.
    *     

Google Compute Engine has two Disk resources: - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) *

Persistent disks are required for running your VM instances. Create both boot and * non-boot (data) persistent disks. For more information, read Persistent Disks. For more * storage options, read Storage options. @@ -639,8 +639,8 @@ public final Operation insertRegionDisk(ProjectRegionName region, Disk diskResou * @param region Name of the region for this request. * @param diskResource Represents a Persistent Disk resource. *

Google Compute Engine has two Disk resources: - *

* [Global](/compute/docs/reference/rest/latest/disks) * - * [Regional](/compute/docs/reference/rest/latest/regionDisks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/disks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionDisks) *

Persistent disks are required for running your VM instances. Create both boot and * non-boot (data) persistent disks. For more information, read Persistent Disks. For more * storage options, read Storage options. diff --git a/src/main/java/com/google/cloud/compute/v1/RegionHealthCheckClient.java b/src/main/java/com/google/cloud/compute/v1/RegionHealthCheckClient.java index 1e0bd132a..e64a14363 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionHealthCheckClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionHealthCheckClient.java @@ -367,8 +367,8 @@ public final HealthCheck getRegionHealthCheck(GetRegionHealthCheckHttpRequest re * @param region Name of the region scoping this request. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -404,8 +404,8 @@ public final Operation insertRegionHealthCheck( * @param region Name of the region scoping this request. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -633,8 +633,8 @@ public final ListRegionHealthChecksPagedResponse listRegionHealthChecks( * @param healthCheck Name of the HealthCheck resource to patch. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -679,8 +679,8 @@ public final Operation patchRegionHealthCheck( * @param healthCheck Name of the HealthCheck resource to patch. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -780,8 +780,8 @@ public final Operation patchRegionHealthCheck(PatchRegionHealthCheckHttpRequest * @param healthCheck Name of the HealthCheck resource to update. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. @@ -825,8 +825,8 @@ public final Operation updateRegionHealthCheck( * @param healthCheck Name of the HealthCheck resource to update. * @param healthCheckResource Represents a Health Check resource. *

Google Compute Engine has two Health Check resources: - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more * information, read Health Check Concepts. diff --git a/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java b/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java index ce33a70e0..9dbf23c71 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClient.java @@ -323,6 +323,127 @@ public final Operation abandonInstancesRegionInstanceGroupManager( return stub.abandonInstancesRegionInstanceGroupManagerCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Apply updates to selected instances the managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   RegionInstanceGroupManagersApplyUpdatesRequest regionInstanceGroupManagersApplyUpdatesRequestResource = RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
+   *   Operation response = regionInstanceGroupManagerClient.applyUpdatesToInstancesRegionInstanceGroupManager(instanceGroupManager, regionInstanceGroupManagersApplyUpdatesRequestResource);
+   * }
+   * 
+ * + * @param instanceGroupManager The name of the managed instance group, should conform to RFC1035. + * @param regionInstanceGroupManagersApplyUpdatesRequestResource + * InstanceGroupManagers.applyUpdatesToInstances + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation applyUpdatesToInstancesRegionInstanceGroupManager( + ProjectRegionInstanceGroupManagerName instanceGroupManager, + RegionInstanceGroupManagersApplyUpdatesRequest + regionInstanceGroupManagersApplyUpdatesRequestResource) { + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest request = + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest.newBuilder() + .setInstanceGroupManager( + instanceGroupManager == null ? null : instanceGroupManager.toString()) + .setRegionInstanceGroupManagersApplyUpdatesRequestResource( + regionInstanceGroupManagersApplyUpdatesRequestResource) + .build(); + return applyUpdatesToInstancesRegionInstanceGroupManager(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Apply updates to selected instances the managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   RegionInstanceGroupManagersApplyUpdatesRequest regionInstanceGroupManagersApplyUpdatesRequestResource = RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
+   *   Operation response = regionInstanceGroupManagerClient.applyUpdatesToInstancesRegionInstanceGroupManager(instanceGroupManager.toString(), regionInstanceGroupManagersApplyUpdatesRequestResource);
+   * }
+   * 
+ * + * @param instanceGroupManager The name of the managed instance group, should conform to RFC1035. + * @param regionInstanceGroupManagersApplyUpdatesRequestResource + * InstanceGroupManagers.applyUpdatesToInstances + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation applyUpdatesToInstancesRegionInstanceGroupManager( + String instanceGroupManager, + RegionInstanceGroupManagersApplyUpdatesRequest + regionInstanceGroupManagersApplyUpdatesRequestResource) { + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest request = + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest.newBuilder() + .setInstanceGroupManager(instanceGroupManager) + .setRegionInstanceGroupManagersApplyUpdatesRequestResource( + regionInstanceGroupManagersApplyUpdatesRequestResource) + .build(); + return applyUpdatesToInstancesRegionInstanceGroupManager(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Apply updates to selected instances the managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   RegionInstanceGroupManagersApplyUpdatesRequest regionInstanceGroupManagersApplyUpdatesRequestResource = RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
+   *   ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest request = ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .setRegionInstanceGroupManagersApplyUpdatesRequestResource(regionInstanceGroupManagersApplyUpdatesRequestResource)
+   *     .build();
+   *   Operation response = regionInstanceGroupManagerClient.applyUpdatesToInstancesRegionInstanceGroupManager(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final Operation applyUpdatesToInstancesRegionInstanceGroupManager( + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest request) { + return applyUpdatesToInstancesRegionInstanceGroupManagerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Apply updates to selected instances the managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   RegionInstanceGroupManagersApplyUpdatesRequest regionInstanceGroupManagersApplyUpdatesRequestResource = RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
+   *   ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest request = ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .setRegionInstanceGroupManagersApplyUpdatesRequestResource(regionInstanceGroupManagersApplyUpdatesRequestResource)
+   *     .build();
+   *   ApiFuture<Operation> future = regionInstanceGroupManagerClient.applyUpdatesToInstancesRegionInstanceGroupManagerCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesRegionInstanceGroupManagerCallable() { + return stub.applyUpdatesToInstancesRegionInstanceGroupManagerCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates instances with per-instance configs in this regional managed instance group. Instances @@ -1114,6 +1235,159 @@ public final ListRegionInstanceGroupManagersPagedResponse listRegionInstanceGrou return stub.listRegionInstanceGroupManagersCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given regional managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   for (InstanceManagedByIgmError element : regionInstanceGroupManagerClient.listErrorsRegionInstanceGroupManagers(instanceGroupManager).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param instanceGroupManager The name of the managed instance group. It must be a string that + * meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListErrorsRegionInstanceGroupManagersPagedResponse + listErrorsRegionInstanceGroupManagers( + ProjectRegionInstanceGroupManagerName instanceGroupManager) { + ListErrorsRegionInstanceGroupManagersHttpRequest request = + ListErrorsRegionInstanceGroupManagersHttpRequest.newBuilder() + .setInstanceGroupManager( + instanceGroupManager == null ? null : instanceGroupManager.toString()) + .build(); + return listErrorsRegionInstanceGroupManagers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given regional managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   for (InstanceManagedByIgmError element : regionInstanceGroupManagerClient.listErrorsRegionInstanceGroupManagers(instanceGroupManager.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param instanceGroupManager The name of the managed instance group. It must be a string that + * meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: + * (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListErrorsRegionInstanceGroupManagersPagedResponse + listErrorsRegionInstanceGroupManagers(String instanceGroupManager) { + ListErrorsRegionInstanceGroupManagersHttpRequest request = + ListErrorsRegionInstanceGroupManagersHttpRequest.newBuilder() + .setInstanceGroupManager(instanceGroupManager) + .build(); + return listErrorsRegionInstanceGroupManagers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given regional managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   ListErrorsRegionInstanceGroupManagersHttpRequest request = ListErrorsRegionInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .build();
+   *   for (InstanceManagedByIgmError element : regionInstanceGroupManagerClient.listErrorsRegionInstanceGroupManagers(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi + public final ListErrorsRegionInstanceGroupManagersPagedResponse + listErrorsRegionInstanceGroupManagers( + ListErrorsRegionInstanceGroupManagersHttpRequest request) { + return listErrorsRegionInstanceGroupManagersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given regional managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   ListErrorsRegionInstanceGroupManagersHttpRequest request = ListErrorsRegionInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .build();
+   *   ApiFuture<ListErrorsRegionInstanceGroupManagersPagedResponse> future = regionInstanceGroupManagerClient.listErrorsRegionInstanceGroupManagersPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (InstanceManagedByIgmError element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersPagedCallable() { + return stub.listErrorsRegionInstanceGroupManagersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists all errors thrown by actions on instances for a given regional managed instance group. + * + *

Sample code: + * + *


+   * try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
+   *   String formattedInstanceGroupManager = ProjectRegionInstanceGroupManagerName.format("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
+   *   ListErrorsRegionInstanceGroupManagersHttpRequest request = ListErrorsRegionInstanceGroupManagersHttpRequest.newBuilder()
+   *     .setInstanceGroupManager(formattedInstanceGroupManager)
+   *     .build();
+   *   while (true) {
+   *     RegionInstanceGroupManagersListErrorsResponse response = regionInstanceGroupManagerClient.listErrorsRegionInstanceGroupManagersCallable().call(request);
+   *     for (InstanceManagedByIgmError element : response.getItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + @BetaApi + public final UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse> + listErrorsRegionInstanceGroupManagersCallable() { + return stub.listErrorsRegionInstanceGroupManagersCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists the instances in the managed instance group and instances that are scheduled to be @@ -2071,4 +2345,111 @@ protected ListRegionInstanceGroupManagersFixedSizeCollection createCollection( return new ListRegionInstanceGroupManagersFixedSizeCollection(pages, collectionSize); } } + + public static class ListErrorsRegionInstanceGroupManagersPagedResponse + extends AbstractPagedListResponse< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError, + ListErrorsRegionInstanceGroupManagersPage, + ListErrorsRegionInstanceGroupManagersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListErrorsRegionInstanceGroupManagersPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListErrorsRegionInstanceGroupManagersPage, + ListErrorsRegionInstanceGroupManagersPagedResponse>() { + @Override + public ListErrorsRegionInstanceGroupManagersPagedResponse apply( + ListErrorsRegionInstanceGroupManagersPage input) { + return new ListErrorsRegionInstanceGroupManagersPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListErrorsRegionInstanceGroupManagersPagedResponse( + ListErrorsRegionInstanceGroupManagersPage page) { + super(page, ListErrorsRegionInstanceGroupManagersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListErrorsRegionInstanceGroupManagersPage + extends AbstractPage< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError, + ListErrorsRegionInstanceGroupManagersPage> { + + private ListErrorsRegionInstanceGroupManagersPage( + PageContext< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + context, + RegionInstanceGroupManagersListErrorsResponse response) { + super(context, response); + } + + private static ListErrorsRegionInstanceGroupManagersPage createEmptyPage() { + return new ListErrorsRegionInstanceGroupManagersPage(null, null); + } + + @Override + protected ListErrorsRegionInstanceGroupManagersPage createPage( + PageContext< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + context, + RegionInstanceGroupManagersListErrorsResponse response) { + return new ListErrorsRegionInstanceGroupManagersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListErrorsRegionInstanceGroupManagersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError, + ListErrorsRegionInstanceGroupManagersPage, + ListErrorsRegionInstanceGroupManagersFixedSizeCollection> { + + private ListErrorsRegionInstanceGroupManagersFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListErrorsRegionInstanceGroupManagersFixedSizeCollection + createEmptyCollection() { + return new ListErrorsRegionInstanceGroupManagersFixedSizeCollection(null, 0); + } + + @Override + protected ListErrorsRegionInstanceGroupManagersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListErrorsRegionInstanceGroupManagersFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerSettings.java b/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerSettings.java index 8efa006a9..eb67adeb6 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerSettings.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerSettings.java @@ -15,6 +15,7 @@ */ package com.google.cloud.compute.v1; +import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListErrorsRegionInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListRegionInstanceGroupManagersPagedResponse; import com.google.api.core.ApiFunction; @@ -80,6 +81,16 @@ public class RegionInstanceGroupManagerSettings .abandonInstancesRegionInstanceGroupManagerSettings(); } + /** + * Returns the object with the settings used for calls to + * applyUpdatesToInstancesRegionInstanceGroupManager. + */ + public UnaryCallSettings + applyUpdatesToInstancesRegionInstanceGroupManagerSettings() { + return ((RegionInstanceGroupManagerStubSettings) getStubSettings()) + .applyUpdatesToInstancesRegionInstanceGroupManagerSettings(); + } + /** * Returns the object with the settings used for calls to * createInstancesRegionInstanceGroupManager. @@ -131,6 +142,18 @@ public class RegionInstanceGroupManagerSettings .listRegionInstanceGroupManagersSettings(); } + /** + * Returns the object with the settings used for calls to listErrorsRegionInstanceGroupManagers. + */ + public PagedCallSettings< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersSettings() { + return ((RegionInstanceGroupManagerStubSettings) getStubSettings()) + .listErrorsRegionInstanceGroupManagersSettings(); + } + /** * Returns the object with the settings used for calls to * listManagedInstancesRegionInstanceGroupManagers. @@ -300,6 +323,16 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().abandonInstancesRegionInstanceGroupManagerSettings(); } + /** + * Returns the builder for the settings used for calls to + * applyUpdatesToInstancesRegionInstanceGroupManager. + */ + public UnaryCallSettings.Builder< + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesRegionInstanceGroupManagerSettings() { + return getStubSettingsBuilder().applyUpdatesToInstancesRegionInstanceGroupManagerSettings(); + } + /** * Returns the builder for the settings used for calls to * createInstancesRegionInstanceGroupManager. @@ -347,6 +380,17 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listRegionInstanceGroupManagersSettings(); } + /** + * Returns the builder for the settings used for calls to listErrorsRegionInstanceGroupManagers. + */ + public PagedCallSettings.Builder< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersSettings() { + return getStubSettingsBuilder().listErrorsRegionInstanceGroupManagersSettings(); + } + /** * Returns the builder for the settings used for calls to * listManagedInstancesRegionInstanceGroupManagers. diff --git a/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListErrorsResponse.java b/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListErrorsResponse.java new file mode 100644 index 000000000..038c57ed4 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListErrorsResponse.java @@ -0,0 +1,217 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 RegionInstanceGroupManagersListErrorsResponse implements ApiMessage { + private final List items; + private final String nextPageToken; + + private RegionInstanceGroupManagersListErrorsResponse() { + this.items = null; + this.nextPageToken = null; + } + + private RegionInstanceGroupManagersListErrorsResponse( + List items, String nextPageToken) { + this.items = items; + this.nextPageToken = nextPageToken; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("items".equals(fieldName)) { + return items; + } + if ("nextPageToken".equals(fieldName)) { + return nextPageToken; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** [Output Only] The list of errors of the managed instance group. */ + public List getItemsList() { + return items; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(RegionInstanceGroupManagersListErrorsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static RegionInstanceGroupManagersListErrorsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final RegionInstanceGroupManagersListErrorsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new RegionInstanceGroupManagersListErrorsResponse(); + } + + public static class Builder { + private List items; + private String nextPageToken; + + Builder() {} + + public Builder mergeFrom(RegionInstanceGroupManagersListErrorsResponse other) { + if (other == RegionInstanceGroupManagersListErrorsResponse.getDefaultInstance()) return this; + if (other.getItemsList() != null) { + this.items = other.items; + } + if (other.getNextPageToken() != null) { + this.nextPageToken = other.nextPageToken; + } + return this; + } + + Builder(RegionInstanceGroupManagersListErrorsResponse source) { + this.items = source.items; + this.nextPageToken = source.nextPageToken; + } + + /** [Output Only] The list of errors of the managed instance group. */ + public List getItemsList() { + return items; + } + + /** [Output Only] The list of errors of the managed instance group. */ + public Builder addAllItems(List items) { + if (this.items == null) { + this.items = new LinkedList<>(); + } + this.items.addAll(items); + return this; + } + + /** [Output Only] The list of errors of the managed instance group. */ + public Builder addItems(InstanceManagedByIgmError items) { + if (this.items == null) { + this.items = new LinkedList<>(); + } + this.items.add(items); + return this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public String getNextPageToken() { + return nextPageToken; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the + * number of results is larger than maxResults, use the nextPageToken as a value for the query + * parameter pageToken in the next list request. Subsequent list requests will have their own + * nextPageToken to continue paging through the results. + */ + public Builder setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public RegionInstanceGroupManagersListErrorsResponse build() { + + return new RegionInstanceGroupManagersListErrorsResponse(items, nextPageToken); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.addAllItems(this.items); + newBuilder.setNextPageToken(this.nextPageToken); + return newBuilder; + } + } + + @Override + public String toString() { + return "RegionInstanceGroupManagersListErrorsResponse{" + + "items=" + + items + + ", " + + "nextPageToken=" + + nextPageToken + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof RegionInstanceGroupManagersListErrorsResponse) { + RegionInstanceGroupManagersListErrorsResponse that = + (RegionInstanceGroupManagersListErrorsResponse) o; + return Objects.equals(this.items, that.getItemsList()) + && Objects.equals(this.nextPageToken, that.getNextPageToken()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(items, nextPageToken); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/RegionSslCertificateClient.java b/src/main/java/com/google/cloud/compute/v1/RegionSslCertificateClient.java index 7755f96bd..c3ef4be6f 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionSslCertificateClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionSslCertificateClient.java @@ -364,32 +364,18 @@ public final SslCertificate getRegionSslCertificate(GetRegionSslCertificateHttpR *

    * try (RegionSslCertificateClient regionSslCertificateClient = RegionSslCertificateClient.create()) {
    *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
-   *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
-   *   Operation response = regionSslCertificateClient.insertRegionSslCertificate(region, sslCertificateResource);
+   *   Operation response = regionSslCertificateClient.insertRegionSslCertificate(region);
    * }
    * 
* * @param region Name of the region scoping this request. - * @param sslCertificateResource Represents an SSL Certificate resource. - *

Google Compute Engine has two SSL Certificate resources: - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load - * balancers - *

- regionSslCertificates are used by: - internal HTTPS load balancers - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating - * and Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== - * resource_for {$api_version}.regionSslCertificates ==) Next ID: 17 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final Operation insertRegionSslCertificate( - ProjectRegionName region, SslCertificate sslCertificateResource) { + public final Operation insertRegionSslCertificate(ProjectRegionName region) { InsertRegionSslCertificateHttpRequest request = InsertRegionSslCertificateHttpRequest.newBuilder() .setRegion(region == null ? null : region.toString()) - .setSslCertificateResource(sslCertificateResource) .build(); return insertRegionSslCertificate(request); } @@ -404,33 +390,17 @@ public final Operation insertRegionSslCertificate( *


    * try (RegionSslCertificateClient regionSslCertificateClient = RegionSslCertificateClient.create()) {
    *   ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]");
-   *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
-   *   Operation response = regionSslCertificateClient.insertRegionSslCertificate(region.toString(), sslCertificateResource);
+   *   Operation response = regionSslCertificateClient.insertRegionSslCertificate(region.toString());
    * }
    * 
* * @param region Name of the region scoping this request. - * @param sslCertificateResource Represents an SSL Certificate resource. - *

Google Compute Engine has two SSL Certificate resources: - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load - * balancers - *

- regionSslCertificates are used by: - internal HTTPS load balancers - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating - * and Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== - * resource_for {$api_version}.regionSslCertificates ==) Next ID: 17 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final Operation insertRegionSslCertificate( - String region, SslCertificate sslCertificateResource) { + public final Operation insertRegionSslCertificate(String region) { InsertRegionSslCertificateHttpRequest request = - InsertRegionSslCertificateHttpRequest.newBuilder() - .setRegion(region) - .setSslCertificateResource(sslCertificateResource) - .build(); + InsertRegionSslCertificateHttpRequest.newBuilder().setRegion(region).build(); return insertRegionSslCertificate(request); } @@ -444,10 +414,8 @@ public final Operation insertRegionSslCertificate( *


    * try (RegionSslCertificateClient regionSslCertificateClient = RegionSslCertificateClient.create()) {
    *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
-   *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
    *   InsertRegionSslCertificateHttpRequest request = InsertRegionSslCertificateHttpRequest.newBuilder()
    *     .setRegion(formattedRegion)
-   *     .setSslCertificateResource(sslCertificateResource)
    *     .build();
    *   Operation response = regionSslCertificateClient.insertRegionSslCertificate(request);
    * }
@@ -471,10 +439,8 @@ public final Operation insertRegionSslCertificate(InsertRegionSslCertificateHttp
    * 

    * try (RegionSslCertificateClient regionSslCertificateClient = RegionSslCertificateClient.create()) {
    *   String formattedRegion = ProjectRegionName.format("[PROJECT]", "[REGION]");
-   *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
    *   InsertRegionSslCertificateHttpRequest request = InsertRegionSslCertificateHttpRequest.newBuilder()
    *     .setRegion(formattedRegion)
-   *     .setSslCertificateResource(sslCertificateResource)
    *     .build();
    *   ApiFuture<Operation> future = regionSslCertificateClient.insertRegionSslCertificateCallable().futureCall(request);
    *   // Do something
diff --git a/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpProxyClient.java b/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpProxyClient.java
index 0e338c5f6..125dae9d6 100644
--- a/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpProxyClient.java
+++ b/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpProxyClient.java
@@ -376,8 +376,8 @@ public final TargetHttpProxy getRegionTargetHttpProxy(
    * @param region Name of the region scoping this request.
    * @param targetHttpProxyResource Represents a Target HTTP Proxy resource.
    *     

Google Compute Engine has two Target HTTP Proxy resources: - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) *

A target HTTP proxy is a component of GCP HTTP load balancers. *

* targetHttpProxies are used by external HTTP load balancers and Traffic Director. * * regionTargetHttpProxies are used by internal HTTP load balancers. @@ -416,8 +416,8 @@ public final Operation insertRegionTargetHttpProxy( * @param region Name of the region scoping this request. * @param targetHttpProxyResource Represents a Target HTTP Proxy resource. *

Google Compute Engine has two Target HTTP Proxy resources: - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) *

A target HTTP proxy is a component of GCP HTTP load balancers. *

* targetHttpProxies are used by external HTTP load balancers and Traffic Director. * * regionTargetHttpProxies are used by internal HTTP load balancers. diff --git a/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpsProxyClient.java b/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpsProxyClient.java index 544e6998f..ebcd6e8fd 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpsProxyClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpsProxyClient.java @@ -377,8 +377,8 @@ public final TargetHttpsProxy getRegionTargetHttpsProxy( * @param region Name of the region scoping this request. * @param targetHttpsProxyResource Represents a Target HTTPS Proxy resource. *

Google Compute Engine has two Target HTTPS Proxy resources: - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) *

A target HTTPS proxy is a component of GCP HTTPS load balancers. *

* targetHttpsProxies are used by external HTTPS load balancers. * * regionTargetHttpsProxies are used by internal HTTPS load balancers. @@ -417,8 +417,8 @@ public final Operation insertRegionTargetHttpsProxy( * @param region Name of the region scoping this request. * @param targetHttpsProxyResource Represents a Target HTTPS Proxy resource. *

Google Compute Engine has two Target HTTPS Proxy resources: - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) *

A target HTTPS proxy is a component of GCP HTTPS load balancers. *

* targetHttpsProxies are used by external HTTPS load balancers. * * regionTargetHttpsProxies are used by internal HTTPS load balancers. diff --git a/src/main/java/com/google/cloud/compute/v1/RegionUrlMapClient.java b/src/main/java/com/google/cloud/compute/v1/RegionUrlMapClient.java index 22bd16321..084d74aa2 100644 --- a/src/main/java/com/google/cloud/compute/v1/RegionUrlMapClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RegionUrlMapClient.java @@ -382,8 +382,8 @@ public final UnaryCallable getRegionUrlMapCa * @param region Name of the region scoping this request. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -428,8 +428,8 @@ public final Operation insertRegionUrlMap( * @param region Name of the region scoping this request. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -674,8 +674,8 @@ public final UnaryCallable listRegionU * idempotency. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -730,8 +730,8 @@ public final Operation patchRegionUrlMap( * idempotency. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -843,8 +843,8 @@ public final UnaryCallable patchRegionU * idempotency. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -898,8 +898,8 @@ public final Operation updateRegionUrlMap( * idempotency. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * diff --git a/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesInstanceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesInstanceHttpRequest.java new file mode 100644 index 000000000..33061d4a7 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesInstanceHttpRequest.java @@ -0,0 +1,551 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.instances.removeResourcePolicies. Removes resource policies + * from an instance. + */ +public final class RemoveResourcePoliciesInstanceHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final String fields; + private final String instance; + private final InstancesRemoveResourcePoliciesRequest + instancesRemoveResourcePoliciesRequestResource; + private final String key; + private final String prettyPrint; + private final String quotaUser; + private final String requestId; + private final String userIp; + + private RemoveResourcePoliciesInstanceHttpRequest() { + this.access_token = null; + this.callback = null; + this.fields = null; + this.instance = null; + this.instancesRemoveResourcePoliciesRequestResource = null; + this.key = null; + this.prettyPrint = null; + this.quotaUser = null; + this.requestId = null; + this.userIp = null; + } + + private RemoveResourcePoliciesInstanceHttpRequest( + String access_token, + String callback, + String fields, + String instance, + InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource, + String key, + String prettyPrint, + String quotaUser, + String requestId, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fields = fields; + this.instance = instance; + this.instancesRemoveResourcePoliciesRequestResource = + instancesRemoveResourcePoliciesRequestResource; + this.key = key; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.requestId = requestId; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("instance".equals(fieldName)) { + return instance; + } + if ("instancesRemoveResourcePoliciesRequestResource".equals(fieldName)) { + return instancesRemoveResourcePoliciesRequestResource; + } + if ("key".equals(fieldName)) { + return key; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("requestId".equals(fieldName)) { + return requestId; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public InstancesRemoveResourcePoliciesRequest getApiMessageRequestBody() { + return instancesRemoveResourcePoliciesRequestResource; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** + * The instance name for this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/removeResourcePolicies`. \`{instance}\` must start + * with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), + * * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs + * (\`%\`). It must be between 3 and 255 characters in length, and it * must not start with + * \`"goog"\`. + */ + public String getInstance() { + return instance; + } + + public InstancesRemoveResourcePoliciesRequest + getInstancesRemoveResourcePoliciesRequestResource() { + return instancesRemoveResourcePoliciesRequestResource; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(RemoveResourcePoliciesInstanceHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static RemoveResourcePoliciesInstanceHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final RemoveResourcePoliciesInstanceHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new RemoveResourcePoliciesInstanceHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private String fields; + private String instance; + private InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource; + private String key; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(RemoveResourcePoliciesInstanceHttpRequest other) { + if (other == RemoveResourcePoliciesInstanceHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getInstance() != null) { + this.instance = other.instance; + } + if (other.getInstancesRemoveResourcePoliciesRequestResource() != null) { + this.instancesRemoveResourcePoliciesRequestResource = + other.instancesRemoveResourcePoliciesRequestResource; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(RemoveResourcePoliciesInstanceHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fields = source.fields; + this.instance = source.instance; + this.instancesRemoveResourcePoliciesRequestResource = + source.instancesRemoveResourcePoliciesRequestResource; + this.key = source.key; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** + * The instance name for this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/removeResourcePolicies`. \`{instance}\` must + * start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes + * (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent + * * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not + * start with \`"goog"\`. + */ + public String getInstance() { + return instance; + } + + /** + * The instance name for this request. It must have the format + * `{project}/zones/{zone}/instances/{instance}/removeResourcePolicies`. \`{instance}\` must + * start with a letter, and contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes + * (\`-\`), * underscores (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent + * * signs (\`%\`). It must be between 3 and 255 characters in length, and it * must not + * start with \`"goog"\`. + */ + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public InstancesRemoveResourcePoliciesRequest + getInstancesRemoveResourcePoliciesRequestResource() { + return instancesRemoveResourcePoliciesRequestResource; + } + + public Builder setInstancesRemoveResourcePoliciesRequestResource( + InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource) { + this.instancesRemoveResourcePoliciesRequestResource = + instancesRemoveResourcePoliciesRequestResource; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public RemoveResourcePoliciesInstanceHttpRequest build() { + String missing = ""; + + if (instance == null) { + missing += " instance"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new RemoveResourcePoliciesInstanceHttpRequest( + access_token, + callback, + fields, + instance, + instancesRemoveResourcePoliciesRequestResource, + key, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.setFields(this.fields); + newBuilder.setInstance(this.instance); + newBuilder.setInstancesRemoveResourcePoliciesRequestResource( + this.instancesRemoveResourcePoliciesRequestResource); + newBuilder.setKey(this.key); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "RemoveResourcePoliciesInstanceHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fields=" + + fields + + ", " + + "instance=" + + instance + + ", " + + "instancesRemoveResourcePoliciesRequestResource=" + + instancesRemoveResourcePoliciesRequestResource + + ", " + + "key=" + + key + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof RemoveResourcePoliciesInstanceHttpRequest) { + RemoveResourcePoliciesInstanceHttpRequest that = + (RemoveResourcePoliciesInstanceHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.instance, that.getInstance()) + && Objects.equals( + this.instancesRemoveResourcePoliciesRequestResource, + that.getInstancesRemoveResourcePoliciesRequestResource()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fields, + instance, + instancesRemoveResourcePoliciesRequestResource, + key, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/ReservationClient.java b/src/main/java/com/google/cloud/compute/v1/ReservationClient.java index cc8cd9415..af4113bec 100644 --- a/src/main/java/com/google/cloud/compute/v1/ReservationClient.java +++ b/src/main/java/com/google/cloud/compute/v1/ReservationClient.java @@ -160,21 +160,29 @@ public ReservationStub getStub() { * *


    * try (ReservationClient reservationClient = ReservationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (ReservationsScopedList element : reservationClient.aggregatedListReservations(project).iterateAll()) {
+   *   for (ReservationsScopedList element : reservationClient.aggregatedListReservations(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListReservationsPagedResponse aggregatedListReservations( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListReservationsHttpRequest request = AggregatedListReservationsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListReservations(request); @@ -188,20 +196,31 @@ public final AggregatedListReservationsPagedResponse aggregatedListReservations( * *

    * try (ReservationClient reservationClient = ReservationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (ReservationsScopedList element : reservationClient.aggregatedListReservations(project.toString()).iterateAll()) {
+   *   for (ReservationsScopedList element : reservationClient.aggregatedListReservations(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListReservationsPagedResponse aggregatedListReservations(String project) { + public final AggregatedListReservationsPagedResponse aggregatedListReservations( + Boolean includeAllScopes, String project) { AggregatedListReservationsHttpRequest request = - AggregatedListReservationsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListReservationsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListReservations(request); } @@ -213,8 +232,10 @@ public final AggregatedListReservationsPagedResponse aggregatedListReservations( * *

    * try (ReservationClient reservationClient = ReservationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListReservationsHttpRequest request = AggregatedListReservationsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (ReservationsScopedList element : reservationClient.aggregatedListReservations(request).iterateAll()) {
@@ -240,8 +261,10 @@ public final AggregatedListReservationsPagedResponse aggregatedListReservations(
    *
    * 

    * try (ReservationClient reservationClient = ReservationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListReservationsHttpRequest request = AggregatedListReservationsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListReservationsPagedResponse> future = reservationClient.aggregatedListReservationsPagedCallable().futureCall(request);
@@ -267,8 +290,10 @@ public final AggregatedListReservationsPagedResponse aggregatedListReservations(
    *
    * 

    * try (ReservationClient reservationClient = ReservationClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListReservationsHttpRequest request = AggregatedListReservationsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/ResourcePolicy.java b/src/main/java/com/google/cloud/compute/v1/ResourcePolicy.java
index 8baefcc91..be2cc279a 100644
--- a/src/main/java/com/google/cloud/compute/v1/ResourcePolicy.java
+++ b/src/main/java/com/google/cloud/compute/v1/ResourcePolicy.java
@@ -24,9 +24,16 @@
 
 @Generated("by GAPIC")
 @BetaApi
+/**
+ * Represents a Resource Policy resource. You can use resource policies to schedule actions for some
+ * Compute Engine resources. For example, you can use them to schedule persistent disk snapshots.
+ *
+ * 

(== resource_for {$api_version}.resourcePolicies ==) + */ public final class ResourcePolicy implements ApiMessage { private final String creationTimestamp; private final String description; + private final ResourcePolicyGroupPlacementPolicy groupPlacementPolicy; private final String id; private final String kind; private final String name; @@ -38,6 +45,7 @@ public final class ResourcePolicy implements ApiMessage { private ResourcePolicy() { this.creationTimestamp = null; this.description = null; + this.groupPlacementPolicy = null; this.id = null; this.kind = null; this.name = null; @@ -50,6 +58,7 @@ private ResourcePolicy() { private ResourcePolicy( String creationTimestamp, String description, + ResourcePolicyGroupPlacementPolicy groupPlacementPolicy, String id, String kind, String name, @@ -59,6 +68,7 @@ private ResourcePolicy( String status) { this.creationTimestamp = creationTimestamp; this.description = description; + this.groupPlacementPolicy = groupPlacementPolicy; this.id = id; this.kind = kind; this.name = name; @@ -76,6 +86,9 @@ public Object getFieldValue(String fieldName) { if ("description".equals(fieldName)) { return description; } + if ("groupPlacementPolicy".equals(fieldName)) { + return groupPlacementPolicy; + } if ("id".equals(fieldName)) { return id; } @@ -127,6 +140,11 @@ public String getDescription() { return description; } + /** Resource policy for instacnes for placement configuration. */ + public ResourcePolicyGroupPlacementPolicy getGroupPlacementPolicy() { + return groupPlacementPolicy; + } + /** * [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ @@ -194,6 +212,7 @@ public static ResourcePolicy getDefaultInstance() { public static class Builder { private String creationTimestamp; private String description; + private ResourcePolicyGroupPlacementPolicy groupPlacementPolicy; private String id; private String kind; private String name; @@ -212,6 +231,9 @@ public Builder mergeFrom(ResourcePolicy other) { if (other.getDescription() != null) { this.description = other.description; } + if (other.getGroupPlacementPolicy() != null) { + this.groupPlacementPolicy = other.groupPlacementPolicy; + } if (other.getId() != null) { this.id = other.id; } @@ -239,6 +261,7 @@ public Builder mergeFrom(ResourcePolicy other) { Builder(ResourcePolicy source) { this.creationTimestamp = source.creationTimestamp; this.description = source.description; + this.groupPlacementPolicy = source.groupPlacementPolicy; this.id = source.id; this.kind = source.kind; this.name = source.name; @@ -268,6 +291,18 @@ public Builder setDescription(String description) { return this; } + /** Resource policy for instacnes for placement configuration. */ + public ResourcePolicyGroupPlacementPolicy getGroupPlacementPolicy() { + return groupPlacementPolicy; + } + + /** Resource policy for instacnes for placement configuration. */ + public Builder setGroupPlacementPolicy( + ResourcePolicyGroupPlacementPolicy groupPlacementPolicy) { + this.groupPlacementPolicy = groupPlacementPolicy; + return this; + } + /** * [Output Only] The unique identifier for the resource. This identifier is defined by the * server. @@ -373,6 +408,7 @@ public ResourcePolicy build() { return new ResourcePolicy( creationTimestamp, description, + groupPlacementPolicy, id, kind, name, @@ -386,6 +422,7 @@ public Builder clone() { Builder newBuilder = new Builder(); newBuilder.setCreationTimestamp(this.creationTimestamp); newBuilder.setDescription(this.description); + newBuilder.setGroupPlacementPolicy(this.groupPlacementPolicy); newBuilder.setId(this.id); newBuilder.setKind(this.kind); newBuilder.setName(this.name); @@ -406,6 +443,9 @@ public String toString() { + "description=" + description + ", " + + "groupPlacementPolicy=" + + groupPlacementPolicy + + ", " + "id=" + id + ", " @@ -438,6 +478,7 @@ public boolean equals(Object o) { ResourcePolicy that = (ResourcePolicy) o; return Objects.equals(this.creationTimestamp, that.getCreationTimestamp()) && Objects.equals(this.description, that.getDescription()) + && Objects.equals(this.groupPlacementPolicy, that.getGroupPlacementPolicy()) && Objects.equals(this.id, that.getId()) && Objects.equals(this.kind, that.getKind()) && Objects.equals(this.name, that.getName()) @@ -454,6 +495,7 @@ public int hashCode() { return Objects.hash( creationTimestamp, description, + groupPlacementPolicy, id, kind, name, diff --git a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyClient.java b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyClient.java index b70c36dcf..c7b5fe9f2 100644 --- a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyClient.java +++ b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyClient.java @@ -161,21 +161,29 @@ public ResourcePolicyStub getStub() { * *


    * try (ResourcePolicyClient resourcePolicyClient = ResourcePolicyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (ResourcePoliciesScopedList element : resourcePolicyClient.aggregatedListResourcePolicies(project).iterateAll()) {
+   *   for (ResourcePoliciesScopedList element : resourcePolicyClient.aggregatedListResourcePolicies(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListResourcePoliciesPagedResponse aggregatedListResourcePolicies( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListResourcePoliciesHttpRequest request = AggregatedListResourcePoliciesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListResourcePolicies(request); @@ -189,21 +197,31 @@ public final AggregatedListResourcePoliciesPagedResponse aggregatedListResourceP * *

    * try (ResourcePolicyClient resourcePolicyClient = ResourcePolicyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (ResourcePoliciesScopedList element : resourcePolicyClient.aggregatedListResourcePolicies(project.toString()).iterateAll()) {
+   *   for (ResourcePoliciesScopedList element : resourcePolicyClient.aggregatedListResourcePolicies(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListResourcePoliciesPagedResponse aggregatedListResourcePolicies( - String project) { + Boolean includeAllScopes, String project) { AggregatedListResourcePoliciesHttpRequest request = - AggregatedListResourcePoliciesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListResourcePoliciesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListResourcePolicies(request); } @@ -215,8 +233,10 @@ public final AggregatedListResourcePoliciesPagedResponse aggregatedListResourceP * *

    * try (ResourcePolicyClient resourcePolicyClient = ResourcePolicyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListResourcePoliciesHttpRequest request = AggregatedListResourcePoliciesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (ResourcePoliciesScopedList element : resourcePolicyClient.aggregatedListResourcePolicies(request).iterateAll()) {
@@ -242,8 +262,10 @@ public final AggregatedListResourcePoliciesPagedResponse aggregatedListResourceP
    *
    * 

    * try (ResourcePolicyClient resourcePolicyClient = ResourcePolicyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListResourcePoliciesHttpRequest request = AggregatedListResourcePoliciesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListResourcePoliciesPagedResponse> future = resourcePolicyClient.aggregatedListResourcePoliciesPagedCallable().futureCall(request);
@@ -269,8 +291,10 @@ public final AggregatedListResourcePoliciesPagedResponse aggregatedListResourceP
    *
    * 

    * try (ResourcePolicyClient resourcePolicyClient = ResourcePolicyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListResourcePoliciesHttpRequest request = AggregatedListResourcePoliciesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -602,7 +626,10 @@ public final Policy getIamPolicyResourcePolicy(GetIamPolicyResourcePolicyHttpReq
    * 
* * @param region Name of the region for this request. - * @param resourcePolicyResource + * @param resourcePolicyResource Represents a Resource Policy resource. You can use resource + * policies to schedule actions for some Compute Engine resources. For example, you can use + * them to schedule persistent disk snapshots. + *

(== resource_for {$api_version}.resourcePolicies ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi @@ -631,7 +658,10 @@ public final Operation insertResourcePolicy( *

* * @param region Name of the region for this request. - * @param resourcePolicyResource + * @param resourcePolicyResource Represents a Resource Policy resource. You can use resource + * policies to schedule actions for some Compute Engine resources. For example, you can use + * them to schedule persistent disk snapshots. + *

(== resource_for {$api_version}.resourcePolicies ==) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi diff --git a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyDailyCycle.java b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyDailyCycle.java index ee9101659..b4f801d8f 100644 --- a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyDailyCycle.java +++ b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyDailyCycle.java @@ -74,7 +74,10 @@ public List getFieldMask() { return null; } - /** Defines a schedule that runs every nth day of the month. */ + /** + * Defines a schedule with units measured in months. The value determines how many months pass + * between the start of each cycle. + */ public Integer getDaysInCycle() { return daysInCycle; } @@ -144,12 +147,18 @@ public Builder mergeFrom(ResourcePolicyDailyCycle other) { this.startTime = source.startTime; } - /** Defines a schedule that runs every nth day of the month. */ + /** + * Defines a schedule with units measured in months. The value determines how many months pass + * between the start of each cycle. + */ public Integer getDaysInCycle() { return daysInCycle; } - /** Defines a schedule that runs every nth day of the month. */ + /** + * Defines a schedule with units measured in months. The value determines how many months pass + * between the start of each cycle. + */ public Builder setDaysInCycle(Integer daysInCycle) { this.daysInCycle = daysInCycle; return this; diff --git a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyGroupPlacementPolicy.java b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyGroupPlacementPolicy.java new file mode 100644 index 000000000..7bb44a1a4 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyGroupPlacementPolicy.java @@ -0,0 +1,233 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +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 +/** + * A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure + * bucket separation as well as network locality + */ +public final class ResourcePolicyGroupPlacementPolicy implements ApiMessage { + private final Integer availabilityDomainCount; + private final String collocation; + private final Integer vmCount; + + private ResourcePolicyGroupPlacementPolicy() { + this.availabilityDomainCount = null; + this.collocation = null; + this.vmCount = null; + } + + private ResourcePolicyGroupPlacementPolicy( + Integer availabilityDomainCount, String collocation, Integer vmCount) { + this.availabilityDomainCount = availabilityDomainCount; + this.collocation = collocation; + this.vmCount = vmCount; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("availabilityDomainCount".equals(fieldName)) { + return availabilityDomainCount; + } + if ("collocation".equals(fieldName)) { + return collocation; + } + if ("vmCount".equals(fieldName)) { + return vmCount; + } + return null; + } + + @Nullable + @Override + public ApiMessage getApiMessageRequestBody() { + return null; + } + + @Nullable + @Override + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return null; + } + + /** + * The number of availability domains instances will be spread across. If two instances are in + * different availability domain, they will not be put in the same low latency network + */ + public Integer getAvailabilityDomainCount() { + return availabilityDomainCount; + } + + /** Specifies network collocation */ + public String getCollocation() { + return collocation; + } + + /** Number of vms in this placement group */ + public Integer getVmCount() { + return vmCount; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ResourcePolicyGroupPlacementPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static ResourcePolicyGroupPlacementPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final ResourcePolicyGroupPlacementPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ResourcePolicyGroupPlacementPolicy(); + } + + public static class Builder { + private Integer availabilityDomainCount; + private String collocation; + private Integer vmCount; + + Builder() {} + + public Builder mergeFrom(ResourcePolicyGroupPlacementPolicy other) { + if (other == ResourcePolicyGroupPlacementPolicy.getDefaultInstance()) return this; + if (other.getAvailabilityDomainCount() != null) { + this.availabilityDomainCount = other.availabilityDomainCount; + } + if (other.getCollocation() != null) { + this.collocation = other.collocation; + } + if (other.getVmCount() != null) { + this.vmCount = other.vmCount; + } + return this; + } + + Builder(ResourcePolicyGroupPlacementPolicy source) { + this.availabilityDomainCount = source.availabilityDomainCount; + this.collocation = source.collocation; + this.vmCount = source.vmCount; + } + + /** + * The number of availability domains instances will be spread across. If two instances are in + * different availability domain, they will not be put in the same low latency network + */ + public Integer getAvailabilityDomainCount() { + return availabilityDomainCount; + } + + /** + * The number of availability domains instances will be spread across. If two instances are in + * different availability domain, they will not be put in the same low latency network + */ + public Builder setAvailabilityDomainCount(Integer availabilityDomainCount) { + this.availabilityDomainCount = availabilityDomainCount; + return this; + } + + /** Specifies network collocation */ + public String getCollocation() { + return collocation; + } + + /** Specifies network collocation */ + public Builder setCollocation(String collocation) { + this.collocation = collocation; + return this; + } + + /** Number of vms in this placement group */ + public Integer getVmCount() { + return vmCount; + } + + /** Number of vms in this placement group */ + public Builder setVmCount(Integer vmCount) { + this.vmCount = vmCount; + return this; + } + + public ResourcePolicyGroupPlacementPolicy build() { + + return new ResourcePolicyGroupPlacementPolicy(availabilityDomainCount, collocation, vmCount); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAvailabilityDomainCount(this.availabilityDomainCount); + newBuilder.setCollocation(this.collocation); + newBuilder.setVmCount(this.vmCount); + return newBuilder; + } + } + + @Override + public String toString() { + return "ResourcePolicyGroupPlacementPolicy{" + + "availabilityDomainCount=" + + availabilityDomainCount + + ", " + + "collocation=" + + collocation + + ", " + + "vmCount=" + + vmCount + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ResourcePolicyGroupPlacementPolicy) { + ResourcePolicyGroupPlacementPolicy that = (ResourcePolicyGroupPlacementPolicy) o; + return Objects.equals(this.availabilityDomainCount, that.getAvailabilityDomainCount()) + && Objects.equals(this.collocation, that.getCollocation()) + && Objects.equals(this.vmCount, that.getVmCount()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash(availabilityDomainCount, collocation, vmCount); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyHourlyCycle.java b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyHourlyCycle.java index 188c46b1c..c57c95f67 100644 --- a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyHourlyCycle.java +++ b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyHourlyCycle.java @@ -82,7 +82,10 @@ public String getDuration() { return duration; } - /** Allows to define schedule that runs every nth hour. */ + /** + * Defines a schedule with units measured in hours. The value determines how many hours pass + * between the start of each cycle. + */ public Integer getHoursInCycle() { return hoursInCycle; } @@ -161,12 +164,18 @@ public Builder setDuration(String duration) { return this; } - /** Allows to define schedule that runs every nth hour. */ + /** + * Defines a schedule with units measured in hours. The value determines how many hours pass + * between the start of each cycle. + */ public Integer getHoursInCycle() { return hoursInCycle; } - /** Allows to define schedule that runs every nth hour. */ + /** + * Defines a schedule with units measured in hours. The value determines how many hours pass + * between the start of each cycle. + */ public Builder setHoursInCycle(Integer hoursInCycle) { this.hoursInCycle = hoursInCycle; return this; diff --git a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycleDayOfWeek.java b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycleDayOfWeek.java index 9988cc88a..5ab524bc4 100644 --- a/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycleDayOfWeek.java +++ b/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycleDayOfWeek.java @@ -73,7 +73,11 @@ public List getFieldMask() { return null; } - /** Allows to define schedule that runs specified day of the week. */ + /** + * Defines a schedule that runs on specific days of the week. Specify one or more days. The + * following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, + * SUNDAY. + */ public String getDay() { return day; } @@ -143,12 +147,20 @@ public Builder mergeFrom(ResourcePolicyWeeklyCycleDayOfWeek other) { this.startTime = source.startTime; } - /** Allows to define schedule that runs specified day of the week. */ + /** + * Defines a schedule that runs on specific days of the week. Specify one or more days. The + * following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, + * SUNDAY. + */ public String getDay() { return day; } - /** Allows to define schedule that runs specified day of the week. */ + /** + * Defines a schedule that runs on specific days of the week. Specify one or more days. The + * following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, + * SUNDAY. + */ public Builder setDay(String day) { this.day = day; return this; diff --git a/src/main/java/com/google/cloud/compute/v1/RouterClient.java b/src/main/java/com/google/cloud/compute/v1/RouterClient.java index bda57d074..6ac202bfa 100644 --- a/src/main/java/com/google/cloud/compute/v1/RouterClient.java +++ b/src/main/java/com/google/cloud/compute/v1/RouterClient.java @@ -159,20 +159,29 @@ public RouterStub getStub() { * *


    * try (RouterClient routerClient = RouterClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (RoutersScopedList element : routerClient.aggregatedListRouters(project).iterateAll()) {
+   *   for (RoutersScopedList element : routerClient.aggregatedListRouters(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListRoutersPagedResponse aggregatedListRouters(ProjectName project) { + public final AggregatedListRoutersPagedResponse aggregatedListRouters( + Boolean includeAllScopes, ProjectName project) { AggregatedListRoutersHttpRequest request = AggregatedListRoutersHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListRouters(request); @@ -186,20 +195,31 @@ public final AggregatedListRoutersPagedResponse aggregatedListRouters(ProjectNam * *

    * try (RouterClient routerClient = RouterClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (RoutersScopedList element : routerClient.aggregatedListRouters(project.toString()).iterateAll()) {
+   *   for (RoutersScopedList element : routerClient.aggregatedListRouters(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListRoutersPagedResponse aggregatedListRouters(String project) { + public final AggregatedListRoutersPagedResponse aggregatedListRouters( + Boolean includeAllScopes, String project) { AggregatedListRoutersHttpRequest request = - AggregatedListRoutersHttpRequest.newBuilder().setProject(project).build(); + AggregatedListRoutersHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListRouters(request); } @@ -211,8 +231,10 @@ public final AggregatedListRoutersPagedResponse aggregatedListRouters(String pro * *

    * try (RouterClient routerClient = RouterClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRoutersHttpRequest request = AggregatedListRoutersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (RoutersScopedList element : routerClient.aggregatedListRouters(request).iterateAll()) {
@@ -238,8 +260,10 @@ public final AggregatedListRoutersPagedResponse aggregatedListRouters(
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRoutersHttpRequest request = AggregatedListRoutersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListRoutersPagedResponse> future = routerClient.aggregatedListRoutersPagedCallable().futureCall(request);
@@ -264,8 +288,10 @@ public final AggregatedListRoutersPagedResponse aggregatedListRouters(
    *
    * 

    * try (RouterClient routerClient = RouterClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListRoutersHttpRequest request = AggregatedListRoutersHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/Scheduling.java b/src/main/java/com/google/cloud/compute/v1/Scheduling.java
index 7c3636d1b..f6252422c 100644
--- a/src/main/java/com/google/cloud/compute/v1/Scheduling.java
+++ b/src/main/java/com/google/cloud/compute/v1/Scheduling.java
@@ -25,7 +25,7 @@
 
 @Generated("by GAPIC")
 @BetaApi
-/** Sets the scheduling options for an Instance. NextID: 9 */
+/** Sets the scheduling options for an Instance. NextID: 10 */
 public final class Scheduling implements ApiMessage {
   private final Boolean automaticRestart;
   private final List nodeAffinities;
@@ -99,7 +99,7 @@ public Boolean getAutomaticRestart() {
 
   /**
    * A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for
-   * more information.
+   * more information. Overrides reservationAffinity.
    */
   public List getNodeAffinitiesList() {
     return nodeAffinities;
@@ -203,7 +203,7 @@ public Builder setAutomaticRestart(Boolean automaticRestart) {
 
     /**
      * A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity
-     * for more information.
+     * for more information. Overrides reservationAffinity.
      */
     public List getNodeAffinitiesList() {
       return nodeAffinities;
@@ -211,7 +211,7 @@ public List getNodeAffinitiesList() {
 
     /**
      * A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity
-     * for more information.
+     * for more information. Overrides reservationAffinity.
      */
     public Builder addAllNodeAffinities(List nodeAffinities) {
       if (this.nodeAffinities == null) {
@@ -223,7 +223,7 @@ public Builder addAllNodeAffinities(List nodeAffinities)
 
     /**
      * A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity
-     * for more information.
+     * for more information. Overrides reservationAffinity.
      */
     public Builder addNodeAffinities(SchedulingNodeAffinity nodeAffinities) {
       if (this.nodeAffinities == null) {
diff --git a/src/main/java/com/google/cloud/compute/v1/SetIamPolicyLicenseHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/SetIamPolicyLicenseHttpRequest.java
index 98ee84029..afb1e003a 100644
--- a/src/main/java/com/google/cloud/compute/v1/SetIamPolicyLicenseHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/SetIamPolicyLicenseHttpRequest.java
@@ -26,7 +26,8 @@
 @BetaApi
 /**
  * Request object for method compute.licenses.setIamPolicy. Sets the access control policy on the
- * specified resource. Replaces any existing policy.
+ * specified resource. Replaces any existing policy. Caution This resource is intended for use only
+ * by third-party partners who are creating Cloud Marketplace images.
  */
 public final class SetIamPolicyLicenseHttpRequest implements ApiMessage {
   private final String access_token;
diff --git a/src/main/java/com/google/cloud/compute/v1/SetSchedulingInstanceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/SetSchedulingInstanceHttpRequest.java
index f5e341ba8..fd1c2d5a1 100644
--- a/src/main/java/com/google/cloud/compute/v1/SetSchedulingInstanceHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/SetSchedulingInstanceHttpRequest.java
@@ -187,7 +187,7 @@ public String getRequestId() {
     return requestId;
   }
 
-  /** Sets the scheduling options for an Instance. NextID: 9 */
+  /** Sets the scheduling options for an Instance. NextID: 10 */
   public Scheduling getSchedulingResource() {
     return schedulingResource;
   }
@@ -407,12 +407,12 @@ public Builder setRequestId(String requestId) {
       return this;
     }
 
-    /** Sets the scheduling options for an Instance. NextID: 9 */
+    /** Sets the scheduling options for an Instance. NextID: 10 */
     public Scheduling getSchedulingResource() {
       return schedulingResource;
     }
 
-    /** Sets the scheduling options for an Instance. NextID: 9 */
+    /** Sets the scheduling options for an Instance. NextID: 10 */
     public Builder setSchedulingResource(Scheduling schedulingResource) {
       this.schedulingResource = schedulingResource;
       return this;
diff --git a/src/main/java/com/google/cloud/compute/v1/SslCertificate.java b/src/main/java/com/google/cloud/compute/v1/SslCertificate.java
index bce2a52f7..c47902a19 100644
--- a/src/main/java/com/google/cloud/compute/v1/SslCertificate.java
+++ b/src/main/java/com/google/cloud/compute/v1/SslCertificate.java
@@ -29,17 +29,19 @@
  *
  * 

Google Compute Engine has two SSL Certificate resources: * - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) + *

* [Global](/compute/docs/reference/rest/{$api_version}/sslCertificates) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionSslCertificates) * - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers + *

The sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers * - *

- regionSslCertificates are used by: - internal HTTPS load balancers + *

The regionSslCertificates are used by internal HTTPS load balancers. * - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating and - * Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== resource_for - * {$api_version}.regionSslCertificates ==) Next ID: 17 + *

Optionally, certificate file contents that you upload can contain a set of up to five + * PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this data. + * You can use SSL keys and certificates to secure connections to a load balancer. For more + * information, read Creating and using SSL certificates and SSL certificates quotas and limits. (== + * resource_for {$api_version}.sslCertificates ==) (== resource_for + * {$api_version}.regionSslCertificates ==) */ public final class SslCertificate implements ApiMessage { private final String certificate; diff --git a/src/main/java/com/google/cloud/compute/v1/SslCertificateClient.java b/src/main/java/com/google/cloud/compute/v1/SslCertificateClient.java index 569916e6b..48689e120 100644 --- a/src/main/java/com/google/cloud/compute/v1/SslCertificateClient.java +++ b/src/main/java/com/google/cloud/compute/v1/SslCertificateClient.java @@ -162,21 +162,29 @@ public SslCertificateStub getStub() { * *


    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (SslCertificatesScopedList element : sslCertificateClient.aggregatedListSslCertificates(project).iterateAll()) {
+   *   for (SslCertificatesScopedList element : sslCertificateClient.aggregatedListSslCertificates(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListSslCertificatesPagedResponse aggregatedListSslCertificates( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListSslCertificatesHttpRequest request = AggregatedListSslCertificatesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListSslCertificates(request); @@ -191,21 +199,31 @@ public final AggregatedListSslCertificatesPagedResponse aggregatedListSslCertifi * *

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (SslCertificatesScopedList element : sslCertificateClient.aggregatedListSslCertificates(project.toString()).iterateAll()) {
+   *   for (SslCertificatesScopedList element : sslCertificateClient.aggregatedListSslCertificates(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListSslCertificatesPagedResponse aggregatedListSslCertificates( - String project) { + Boolean includeAllScopes, String project) { AggregatedListSslCertificatesHttpRequest request = - AggregatedListSslCertificatesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListSslCertificatesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListSslCertificates(request); } @@ -218,8 +236,10 @@ public final AggregatedListSslCertificatesPagedResponse aggregatedListSslCertifi * *

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSslCertificatesHttpRequest request = AggregatedListSslCertificatesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (SslCertificatesScopedList element : sslCertificateClient.aggregatedListSslCertificates(request).iterateAll()) {
@@ -246,8 +266,10 @@ public final AggregatedListSslCertificatesPagedResponse aggregatedListSslCertifi
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSslCertificatesHttpRequest request = AggregatedListSslCertificatesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListSslCertificatesPagedResponse> future = sslCertificateClient.aggregatedListSslCertificatesPagedCallable().futureCall(request);
@@ -274,8 +296,10 @@ public final AggregatedListSslCertificatesPagedResponse aggregatedListSslCertifi
    *
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSslCertificatesHttpRequest request = AggregatedListSslCertificatesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -505,32 +529,18 @@ public final SslCertificate getSslCertificate(GetSslCertificateHttpRequest reque
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
-   *   Operation response = sslCertificateClient.insertSslCertificate(project, sslCertificateResource);
+   *   Operation response = sslCertificateClient.insertSslCertificate(project);
    * }
    * 
* * @param project Project ID for this request. - * @param sslCertificateResource Represents an SSL Certificate resource. - *

Google Compute Engine has two SSL Certificate resources: - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load - * balancers - *

- regionSslCertificates are used by: - internal HTTPS load balancers - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating - * and Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== - * resource_for {$api_version}.regionSslCertificates ==) Next ID: 17 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final Operation insertSslCertificate( - ProjectName project, SslCertificate sslCertificateResource) { + public final Operation insertSslCertificate(ProjectName project) { InsertSslCertificateHttpRequest request = InsertSslCertificateHttpRequest.newBuilder() .setProject(project == null ? null : project.toString()) - .setSslCertificateResource(sslCertificateResource) .build(); return insertSslCertificate(request); } @@ -545,33 +555,17 @@ public final Operation insertSslCertificate( *


    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
-   *   Operation response = sslCertificateClient.insertSslCertificate(project.toString(), sslCertificateResource);
+   *   Operation response = sslCertificateClient.insertSslCertificate(project.toString());
    * }
    * 
* * @param project Project ID for this request. - * @param sslCertificateResource Represents an SSL Certificate resource. - *

Google Compute Engine has two SSL Certificate resources: - *

* [Global](/compute/docs/reference/rest/latest/sslCertificates) * - * [Regional](/compute/docs/reference/rest/latest/regionSslCertificates) - *

- sslCertificates are used by: - external HTTPS load balancers - SSL proxy load - * balancers - *

- regionSslCertificates are used by: - internal HTTPS load balancers - *

This SSL certificate resource also contains a private key. You can use SSL keys and - * certificates to secure connections to a load balancer. For more information, read Creating - * and Using SSL Certificates. (== resource_for {$api_version}.sslCertificates ==) (== - * resource_for {$api_version}.regionSslCertificates ==) Next ID: 17 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final Operation insertSslCertificate( - String project, SslCertificate sslCertificateResource) { + public final Operation insertSslCertificate(String project) { InsertSslCertificateHttpRequest request = - InsertSslCertificateHttpRequest.newBuilder() - .setProject(project) - .setSslCertificateResource(sslCertificateResource) - .build(); + InsertSslCertificateHttpRequest.newBuilder().setProject(project).build(); return insertSslCertificate(request); } @@ -585,10 +579,8 @@ public final Operation insertSslCertificate( *


    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
    *   String formattedProject = ProjectName.format("[PROJECT]");
-   *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
    *   InsertSslCertificateHttpRequest request = InsertSslCertificateHttpRequest.newBuilder()
    *     .setProject(formattedProject)
-   *     .setSslCertificateResource(sslCertificateResource)
    *     .build();
    *   Operation response = sslCertificateClient.insertSslCertificate(request);
    * }
@@ -612,10 +604,8 @@ public final Operation insertSslCertificate(InsertSslCertificateHttpRequest requ
    * 

    * try (SslCertificateClient sslCertificateClient = SslCertificateClient.create()) {
    *   String formattedProject = ProjectName.format("[PROJECT]");
-   *   SslCertificate sslCertificateResource = SslCertificate.newBuilder().build();
    *   InsertSslCertificateHttpRequest request = InsertSslCertificateHttpRequest.newBuilder()
    *     .setProject(formattedProject)
-   *     .setSslCertificateResource(sslCertificateResource)
    *     .build();
    *   ApiFuture<Operation> future = sslCertificateClient.insertSslCertificateCallable().futureCall(request);
    *   // Do something
diff --git a/src/main/java/com/google/cloud/compute/v1/Subnetwork.java b/src/main/java/com/google/cloud/compute/v1/Subnetwork.java
index f3366483b..9c40de446 100644
--- a/src/main/java/com/google/cloud/compute/v1/Subnetwork.java
+++ b/src/main/java/com/google/cloud/compute/v1/Subnetwork.java
@@ -308,7 +308,7 @@ public String getRegion() {
   }
 
   /**
-   * The role of subnetwork. Currenly, this field is only used when purpose =
+   * The role of subnetwork. Currently, this field is only used when purpose =
    * INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is
    * one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is
    * one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated
@@ -721,7 +721,7 @@ public Builder setRegion(String region) {
     }
 
     /**
-     * The role of subnetwork. Currenly, this field is only used when purpose =
+     * The role of subnetwork. Currently, this field is only used when purpose =
      * INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork
      * is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork
      * is one that is ready to be promoted to ACTIVE or is currently draining. This field can be
@@ -732,7 +732,7 @@ public String getRole() {
     }
 
     /**
-     * The role of subnetwork. Currenly, this field is only used when purpose =
+     * The role of subnetwork. Currently, this field is only used when purpose =
      * INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork
      * is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork
      * is one that is ready to be promoted to ACTIVE or is currently draining. This field can be
diff --git a/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java b/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java
index 401d5794d..717e358ac 100644
--- a/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java
+++ b/src/main/java/com/google/cloud/compute/v1/SubnetworkClient.java
@@ -159,21 +159,29 @@ public SubnetworkStub getStub() {
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (SubnetworksScopedList element : subnetworkClient.aggregatedListSubnetworks(project).iterateAll()) {
+   *   for (SubnetworksScopedList element : subnetworkClient.aggregatedListSubnetworks(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListSubnetworksHttpRequest request = AggregatedListSubnetworksHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListSubnetworks(request); @@ -187,20 +195,31 @@ public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks( * *

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (SubnetworksScopedList element : subnetworkClient.aggregatedListSubnetworks(project.toString()).iterateAll()) {
+   *   for (SubnetworksScopedList element : subnetworkClient.aggregatedListSubnetworks(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks(String project) { + public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks( + Boolean includeAllScopes, String project) { AggregatedListSubnetworksHttpRequest request = - AggregatedListSubnetworksHttpRequest.newBuilder().setProject(project).build(); + AggregatedListSubnetworksHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListSubnetworks(request); } @@ -212,8 +231,10 @@ public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks(St * *

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSubnetworksHttpRequest request = AggregatedListSubnetworksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (SubnetworksScopedList element : subnetworkClient.aggregatedListSubnetworks(request).iterateAll()) {
@@ -239,8 +260,10 @@ public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSubnetworksHttpRequest request = AggregatedListSubnetworksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListSubnetworksPagedResponse> future = subnetworkClient.aggregatedListSubnetworksPagedCallable().futureCall(request);
@@ -266,8 +289,10 @@ public final AggregatedListSubnetworksPagedResponse aggregatedListSubnetworks(
    *
    * 

    * try (SubnetworkClient subnetworkClient = SubnetworkClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListSubnetworksHttpRequest request = AggregatedListSubnetworksHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/SubnetworkLogConfig.java b/src/main/java/com/google/cloud/compute/v1/SubnetworkLogConfig.java
index fb2ae2a4e..199b2e6fb 100644
--- a/src/main/java/com/google/cloud/compute/v1/SubnetworkLogConfig.java
+++ b/src/main/java/com/google/cloud/compute/v1/SubnetworkLogConfig.java
@@ -17,6 +17,7 @@
 
 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;
@@ -28,22 +29,33 @@
 public final class SubnetworkLogConfig implements ApiMessage {
   private final String aggregationInterval;
   private final Boolean enable;
+  private final String filterExpr;
   private final Float flowSampling;
   private final String metadata;
+  private final List metadataFields;
 
   private SubnetworkLogConfig() {
     this.aggregationInterval = null;
     this.enable = null;
+    this.filterExpr = null;
     this.flowSampling = null;
     this.metadata = null;
+    this.metadataFields = null;
   }
 
   private SubnetworkLogConfig(
-      String aggregationInterval, Boolean enable, Float flowSampling, String metadata) {
+      String aggregationInterval,
+      Boolean enable,
+      String filterExpr,
+      Float flowSampling,
+      String metadata,
+      List metadataFields) {
     this.aggregationInterval = aggregationInterval;
     this.enable = enable;
+    this.filterExpr = filterExpr;
     this.flowSampling = flowSampling;
     this.metadata = metadata;
+    this.metadataFields = metadataFields;
   }
 
   @Override
@@ -54,12 +66,18 @@ public Object getFieldValue(String fieldName) {
     if ("enable".equals(fieldName)) {
       return enable;
     }
+    if ("filterExpr".equals(fieldName)) {
+      return filterExpr;
+    }
     if ("flowSampling".equals(fieldName)) {
       return flowSampling;
     }
     if ("metadata".equals(fieldName)) {
       return metadata;
     }
+    if ("metadataFields".equals(fieldName)) {
+      return metadataFields;
+    }
     return null;
   }
 
@@ -99,6 +117,14 @@ public Boolean getEnable() {
     return enable;
   }
 
+  /**
+   * Can only be specified if VPC flow logs for this subnetwork is enabled. Export filter used to
+   * define which VPC flow logs should be logged.
+   */
+  public String getFilterExpr() {
+    return filterExpr;
+  }
+
   /**
    * Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the
    * field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0
@@ -118,6 +144,14 @@ public String getMetadata() {
     return metadata;
   }
 
+  /**
+   * Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to
+   * CUSTOM_METADATA.
+   */
+  public List getMetadataFieldsList() {
+    return metadataFields;
+  }
+
   public static Builder newBuilder() {
     return DEFAULT_INSTANCE.toBuilder();
   }
@@ -143,8 +177,10 @@ public static SubnetworkLogConfig getDefaultInstance() {
   public static class Builder {
     private String aggregationInterval;
     private Boolean enable;
+    private String filterExpr;
     private Float flowSampling;
     private String metadata;
+    private List metadataFields;
 
     Builder() {}
 
@@ -156,20 +192,28 @@ public Builder mergeFrom(SubnetworkLogConfig other) {
       if (other.getEnable() != null) {
         this.enable = other.enable;
       }
+      if (other.getFilterExpr() != null) {
+        this.filterExpr = other.filterExpr;
+      }
       if (other.getFlowSampling() != null) {
         this.flowSampling = other.flowSampling;
       }
       if (other.getMetadata() != null) {
         this.metadata = other.metadata;
       }
+      if (other.getMetadataFieldsList() != null) {
+        this.metadataFields = other.metadataFields;
+      }
       return this;
     }
 
     Builder(SubnetworkLogConfig source) {
       this.aggregationInterval = source.aggregationInterval;
       this.enable = source.enable;
+      this.filterExpr = source.filterExpr;
       this.flowSampling = source.flowSampling;
       this.metadata = source.metadata;
+      this.metadataFields = source.metadataFields;
     }
 
     /**
@@ -210,6 +254,23 @@ public Builder setEnable(Boolean enable) {
       return this;
     }
 
+    /**
+     * Can only be specified if VPC flow logs for this subnetwork is enabled. Export filter used to
+     * define which VPC flow logs should be logged.
+     */
+    public String getFilterExpr() {
+      return filterExpr;
+    }
+
+    /**
+     * Can only be specified if VPC flow logs for this subnetwork is enabled. Export filter used to
+     * define which VPC flow logs should be logged.
+     */
+    public Builder setFilterExpr(String filterExpr) {
+      this.filterExpr = filterExpr;
+      return this;
+    }
+
     /**
      * Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the
      * field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where
@@ -250,17 +311,52 @@ public Builder setMetadata(String metadata) {
       return this;
     }
 
+    /**
+     * Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set
+     * to CUSTOM_METADATA.
+     */
+    public List getMetadataFieldsList() {
+      return metadataFields;
+    }
+
+    /**
+     * Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set
+     * to CUSTOM_METADATA.
+     */
+    public Builder addAllMetadataFields(List metadataFields) {
+      if (this.metadataFields == null) {
+        this.metadataFields = new LinkedList<>();
+      }
+      this.metadataFields.addAll(metadataFields);
+      return this;
+    }
+
+    /**
+     * Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set
+     * to CUSTOM_METADATA.
+     */
+    public Builder addMetadataFields(String metadataFields) {
+      if (this.metadataFields == null) {
+        this.metadataFields = new LinkedList<>();
+      }
+      this.metadataFields.add(metadataFields);
+      return this;
+    }
+
     public SubnetworkLogConfig build() {
 
-      return new SubnetworkLogConfig(aggregationInterval, enable, flowSampling, metadata);
+      return new SubnetworkLogConfig(
+          aggregationInterval, enable, filterExpr, flowSampling, metadata, metadataFields);
     }
 
     public Builder clone() {
       Builder newBuilder = new Builder();
       newBuilder.setAggregationInterval(this.aggregationInterval);
       newBuilder.setEnable(this.enable);
+      newBuilder.setFilterExpr(this.filterExpr);
       newBuilder.setFlowSampling(this.flowSampling);
       newBuilder.setMetadata(this.metadata);
+      newBuilder.addAllMetadataFields(this.metadataFields);
       return newBuilder;
     }
   }
@@ -274,11 +370,17 @@ public String toString() {
         + "enable="
         + enable
         + ", "
+        + "filterExpr="
+        + filterExpr
+        + ", "
         + "flowSampling="
         + flowSampling
         + ", "
         + "metadata="
         + metadata
+        + ", "
+        + "metadataFields="
+        + metadataFields
         + "}";
   }
 
@@ -291,14 +393,17 @@ public boolean equals(Object o) {
       SubnetworkLogConfig that = (SubnetworkLogConfig) o;
       return Objects.equals(this.aggregationInterval, that.getAggregationInterval())
           && Objects.equals(this.enable, that.getEnable())
+          && Objects.equals(this.filterExpr, that.getFilterExpr())
           && Objects.equals(this.flowSampling, that.getFlowSampling())
-          && Objects.equals(this.metadata, that.getMetadata());
+          && Objects.equals(this.metadata, that.getMetadata())
+          && Objects.equals(this.metadataFields, that.getMetadataFieldsList());
     }
     return false;
   }
 
   @Override
   public int hashCode() {
-    return Objects.hash(aggregationInterval, enable, flowSampling, metadata);
+    return Objects.hash(
+        aggregationInterval, enable, filterExpr, flowSampling, metadata, metadataFields);
   }
 }
diff --git a/src/main/java/com/google/cloud/compute/v1/TargetHttpProxy.java b/src/main/java/com/google/cloud/compute/v1/TargetHttpProxy.java
index c6c22587e..44a0ebedd 100644
--- a/src/main/java/com/google/cloud/compute/v1/TargetHttpProxy.java
+++ b/src/main/java/com/google/cloud/compute/v1/TargetHttpProxy.java
@@ -29,8 +29,8 @@
  *
  * 

Google Compute Engine has two Target HTTP Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) * *

A target HTTP proxy is a component of GCP HTTP load balancers. * diff --git a/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyClient.java b/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyClient.java index ee60f3ec9..f9ed056d5 100644 --- a/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyClient.java +++ b/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyClient.java @@ -163,21 +163,29 @@ public TargetHttpProxyStub getStub() { * *


    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetHttpProxiesScopedList element : targetHttpProxyClient.aggregatedListTargetHttpProxies(project).iterateAll()) {
+   *   for (TargetHttpProxiesScopedList element : targetHttpProxyClient.aggregatedListTargetHttpProxies(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetHttpProxiesPagedResponse aggregatedListTargetHttpProxies( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListTargetHttpProxiesHttpRequest request = AggregatedListTargetHttpProxiesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListTargetHttpProxies(request); @@ -192,21 +200,31 @@ public final AggregatedListTargetHttpProxiesPagedResponse aggregatedListTargetHt * *

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetHttpProxiesScopedList element : targetHttpProxyClient.aggregatedListTargetHttpProxies(project.toString()).iterateAll()) {
+   *   for (TargetHttpProxiesScopedList element : targetHttpProxyClient.aggregatedListTargetHttpProxies(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetHttpProxiesPagedResponse aggregatedListTargetHttpProxies( - String project) { + Boolean includeAllScopes, String project) { AggregatedListTargetHttpProxiesHttpRequest request = - AggregatedListTargetHttpProxiesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListTargetHttpProxiesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListTargetHttpProxies(request); } @@ -219,8 +237,10 @@ public final AggregatedListTargetHttpProxiesPagedResponse aggregatedListTargetHt * *

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetHttpProxiesHttpRequest request = AggregatedListTargetHttpProxiesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (TargetHttpProxiesScopedList element : targetHttpProxyClient.aggregatedListTargetHttpProxies(request).iterateAll()) {
@@ -247,8 +267,10 @@ public final AggregatedListTargetHttpProxiesPagedResponse aggregatedListTargetHt
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetHttpProxiesHttpRequest request = AggregatedListTargetHttpProxiesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListTargetHttpProxiesPagedResponse> future = targetHttpProxyClient.aggregatedListTargetHttpProxiesPagedCallable().futureCall(request);
@@ -275,8 +297,10 @@ public final AggregatedListTargetHttpProxiesPagedResponse aggregatedListTargetHt
    *
    * 

    * try (TargetHttpProxyClient targetHttpProxyClient = TargetHttpProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetHttpProxiesHttpRequest request = AggregatedListTargetHttpProxiesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -516,8 +540,8 @@ public final TargetHttpProxy getTargetHttpProxy(GetTargetHttpProxyHttpRequest re
    * @param project Project ID for this request.
    * @param targetHttpProxyResource Represents a Target HTTP Proxy resource.
    *     

Google Compute Engine has two Target HTTP Proxy resources: - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) *

A target HTTP proxy is a component of GCP HTTP load balancers. *

* targetHttpProxies are used by external HTTP load balancers and Traffic Director. * * regionTargetHttpProxies are used by internal HTTP load balancers. @@ -556,8 +580,8 @@ public final Operation insertTargetHttpProxy( * @param project Project ID for this request. * @param targetHttpProxyResource Represents a Target HTTP Proxy resource. *

Google Compute Engine has two Target HTTP Proxy resources: - *

* [Global](/compute/docs/reference/rest/latest/targetHttpProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpProxies) *

A target HTTP proxy is a component of GCP HTTP load balancers. *

* targetHttpProxies are used by external HTTP load balancers and Traffic Director. * * regionTargetHttpProxies are used by internal HTTP load balancers. diff --git a/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxy.java b/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxy.java index 314f34652..b8e80672c 100644 --- a/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxy.java +++ b/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxy.java @@ -30,8 +30,8 @@ * *

Google Compute Engine has two Target HTTPS Proxy resources: * - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) * *

A target HTTPS proxy is a component of GCP HTTPS load balancers. * diff --git a/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyClient.java b/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyClient.java index 17da62b3c..c0bd558dd 100644 --- a/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyClient.java +++ b/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyClient.java @@ -163,21 +163,29 @@ public TargetHttpsProxyStub getStub() { * *


    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetHttpsProxiesScopedList element : targetHttpsProxyClient.aggregatedListTargetHttpsProxies(project).iterateAll()) {
+   *   for (TargetHttpsProxiesScopedList element : targetHttpsProxyClient.aggregatedListTargetHttpsProxies(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetHttpsProxiesPagedResponse aggregatedListTargetHttpsProxies( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListTargetHttpsProxiesHttpRequest request = AggregatedListTargetHttpsProxiesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListTargetHttpsProxies(request); @@ -192,21 +200,31 @@ public final AggregatedListTargetHttpsProxiesPagedResponse aggregatedListTargetH * *

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetHttpsProxiesScopedList element : targetHttpsProxyClient.aggregatedListTargetHttpsProxies(project.toString()).iterateAll()) {
+   *   for (TargetHttpsProxiesScopedList element : targetHttpsProxyClient.aggregatedListTargetHttpsProxies(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetHttpsProxiesPagedResponse aggregatedListTargetHttpsProxies( - String project) { + Boolean includeAllScopes, String project) { AggregatedListTargetHttpsProxiesHttpRequest request = - AggregatedListTargetHttpsProxiesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListTargetHttpsProxiesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListTargetHttpsProxies(request); } @@ -219,8 +237,10 @@ public final AggregatedListTargetHttpsProxiesPagedResponse aggregatedListTargetH * *

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetHttpsProxiesHttpRequest request = AggregatedListTargetHttpsProxiesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (TargetHttpsProxiesScopedList element : targetHttpsProxyClient.aggregatedListTargetHttpsProxies(request).iterateAll()) {
@@ -247,8 +267,10 @@ public final AggregatedListTargetHttpsProxiesPagedResponse aggregatedListTargetH
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetHttpsProxiesHttpRequest request = AggregatedListTargetHttpsProxiesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListTargetHttpsProxiesPagedResponse> future = targetHttpsProxyClient.aggregatedListTargetHttpsProxiesPagedCallable().futureCall(request);
@@ -276,8 +298,10 @@ public final AggregatedListTargetHttpsProxiesPagedResponse aggregatedListTargetH
    *
    * 

    * try (TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetHttpsProxiesHttpRequest request = AggregatedListTargetHttpsProxiesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -520,8 +544,8 @@ public final TargetHttpsProxy getTargetHttpsProxy(GetTargetHttpsProxyHttpRequest
    * @param project Project ID for this request.
    * @param targetHttpsProxyResource Represents a Target HTTPS Proxy resource.
    *     

Google Compute Engine has two Target HTTPS Proxy resources: - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) *

A target HTTPS proxy is a component of GCP HTTPS load balancers. *

* targetHttpsProxies are used by external HTTPS load balancers. * * regionTargetHttpsProxies are used by internal HTTPS load balancers. @@ -560,8 +584,8 @@ public final Operation insertTargetHttpsProxy( * @param project Project ID for this request. * @param targetHttpsProxyResource Represents a Target HTTPS Proxy resource. *

Google Compute Engine has two Target HTTPS Proxy resources: - *

* [Global](/compute/docs/reference/rest/latest/targetHttpsProxies) * - * [Regional](/compute/docs/reference/rest/latest/regionTargetHttpsProxies) + *

* [Global](/compute/docs/reference/rest/{$api_version}/targetHttpsProxies) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionTargetHttpsProxies) *

A target HTTPS proxy is a component of GCP HTTPS load balancers. *

* targetHttpsProxies are used by external HTTPS load balancers. * * regionTargetHttpsProxies are used by internal HTTPS load balancers. diff --git a/src/main/java/com/google/cloud/compute/v1/TargetInstanceClient.java b/src/main/java/com/google/cloud/compute/v1/TargetInstanceClient.java index d0eeda0da..1a8d189d7 100644 --- a/src/main/java/com/google/cloud/compute/v1/TargetInstanceClient.java +++ b/src/main/java/com/google/cloud/compute/v1/TargetInstanceClient.java @@ -161,21 +161,29 @@ public TargetInstanceStub getStub() { * *


    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetInstancesScopedList element : targetInstanceClient.aggregatedListTargetInstances(project).iterateAll()) {
+   *   for (TargetInstancesScopedList element : targetInstanceClient.aggregatedListTargetInstances(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInstances( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListTargetInstancesHttpRequest request = AggregatedListTargetInstancesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListTargetInstances(request); @@ -189,21 +197,31 @@ public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInst * *

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetInstancesScopedList element : targetInstanceClient.aggregatedListTargetInstances(project.toString()).iterateAll()) {
+   *   for (TargetInstancesScopedList element : targetInstanceClient.aggregatedListTargetInstances(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInstances( - String project) { + Boolean includeAllScopes, String project) { AggregatedListTargetInstancesHttpRequest request = - AggregatedListTargetInstancesHttpRequest.newBuilder().setProject(project).build(); + AggregatedListTargetInstancesHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListTargetInstances(request); } @@ -215,8 +233,10 @@ public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInst * *

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetInstancesHttpRequest request = AggregatedListTargetInstancesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (TargetInstancesScopedList element : targetInstanceClient.aggregatedListTargetInstances(request).iterateAll()) {
@@ -242,8 +262,10 @@ public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInst
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetInstancesHttpRequest request = AggregatedListTargetInstancesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListTargetInstancesPagedResponse> future = targetInstanceClient.aggregatedListTargetInstancesPagedCallable().futureCall(request);
@@ -269,8 +291,10 @@ public final AggregatedListTargetInstancesPagedResponse aggregatedListTargetInst
    *
    * 

    * try (TargetInstanceClient targetInstanceClient = TargetInstanceClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetInstancesHttpRequest request = AggregatedListTargetInstancesHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java b/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java
index 964b1c123..d24bd20bb 100644
--- a/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java
+++ b/src/main/java/com/google/cloud/compute/v1/TargetPoolClient.java
@@ -383,21 +383,29 @@ public final Operation addInstanceTargetPool(AddInstanceTargetPoolHttpRequest re
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetPoolsScopedList element : targetPoolClient.aggregatedListTargetPools(project).iterateAll()) {
+   *   for (TargetPoolsScopedList element : targetPoolClient.aggregatedListTargetPools(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListTargetPoolsHttpRequest request = AggregatedListTargetPoolsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListTargetPools(request); @@ -411,20 +419,31 @@ public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools( * *

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetPoolsScopedList element : targetPoolClient.aggregatedListTargetPools(project.toString()).iterateAll()) {
+   *   for (TargetPoolsScopedList element : targetPoolClient.aggregatedListTargetPools(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools(String project) { + public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools( + Boolean includeAllScopes, String project) { AggregatedListTargetPoolsHttpRequest request = - AggregatedListTargetPoolsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListTargetPoolsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListTargetPools(request); } @@ -436,8 +455,10 @@ public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools(St * *

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetPoolsHttpRequest request = AggregatedListTargetPoolsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (TargetPoolsScopedList element : targetPoolClient.aggregatedListTargetPools(request).iterateAll()) {
@@ -463,8 +484,10 @@ public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetPoolsHttpRequest request = AggregatedListTargetPoolsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListTargetPoolsPagedResponse> future = targetPoolClient.aggregatedListTargetPoolsPagedCallable().futureCall(request);
@@ -490,8 +513,10 @@ public final AggregatedListTargetPoolsPagedResponse aggregatedListTargetPools(
    *
    * 

    * try (TargetPoolClient targetPoolClient = TargetPoolClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetPoolsHttpRequest request = AggregatedListTargetPoolsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayClient.java b/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayClient.java
index 508aa15f9..85cb7a161 100644
--- a/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayClient.java
+++ b/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayClient.java
@@ -162,21 +162,29 @@ public TargetVpnGatewayStub getStub() {
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetVpnGatewaysScopedList element : targetVpnGatewayClient.aggregatedListTargetVpnGateways(project).iterateAll()) {
+   *   for (TargetVpnGatewaysScopedList element : targetVpnGatewayClient.aggregatedListTargetVpnGateways(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVpnGateways( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListTargetVpnGatewaysHttpRequest request = AggregatedListTargetVpnGatewaysHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListTargetVpnGateways(request); @@ -190,21 +198,31 @@ public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVp * *

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (TargetVpnGatewaysScopedList element : targetVpnGatewayClient.aggregatedListTargetVpnGateways(project.toString()).iterateAll()) {
+   *   for (TargetVpnGatewaysScopedList element : targetVpnGatewayClient.aggregatedListTargetVpnGateways(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVpnGateways( - String project) { + Boolean includeAllScopes, String project) { AggregatedListTargetVpnGatewaysHttpRequest request = - AggregatedListTargetVpnGatewaysHttpRequest.newBuilder().setProject(project).build(); + AggregatedListTargetVpnGatewaysHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListTargetVpnGateways(request); } @@ -216,8 +234,10 @@ public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVp * *

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetVpnGatewaysHttpRequest request = AggregatedListTargetVpnGatewaysHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (TargetVpnGatewaysScopedList element : targetVpnGatewayClient.aggregatedListTargetVpnGateways(request).iterateAll()) {
@@ -243,8 +263,10 @@ public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVp
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetVpnGatewaysHttpRequest request = AggregatedListTargetVpnGatewaysHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListTargetVpnGatewaysPagedResponse> future = targetVpnGatewayClient.aggregatedListTargetVpnGatewaysPagedCallable().futureCall(request);
@@ -270,8 +292,10 @@ public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVp
    *
    * 

    * try (TargetVpnGatewayClient targetVpnGatewayClient = TargetVpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListTargetVpnGatewaysHttpRequest request = AggregatedListTargetVpnGatewaysHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseCodeHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseCodeHttpRequest.java
index cc340425d..b7e30b636 100644
--- a/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseCodeHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseCodeHttpRequest.java
@@ -26,7 +26,8 @@
 @BetaApi
 /**
  * Request object for method compute.licenseCodes.testIamPermissions. Returns permissions that a
- * caller has on the specified resource.
+ * caller has on the specified resource. Caution This resource is intended for use only by
+ * third-party partners who are creating Cloud Marketplace images.
  */
 public final class TestIamPermissionsLicenseCodeHttpRequest implements ApiMessage {
   private final String access_token;
diff --git a/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseHttpRequest.java
index 6e555e170..9703bb12d 100644
--- a/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseHttpRequest.java
@@ -26,7 +26,8 @@
 @BetaApi
 /**
  * Request object for method compute.licenses.testIamPermissions. Returns permissions that a caller
- * has on the specified resource.
+ * has on the specified resource. Caution This resource is intended for use only by third-party
+ * partners who are creating Cloud Marketplace images.
  */
 public final class TestIamPermissionsLicenseHttpRequest implements ApiMessage {
   private final String access_token;
diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateAutoscalerHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateAutoscalerHttpRequest.java
index 86c7ff92f..e72f53edd 100644
--- a/src/main/java/com/google/cloud/compute/v1/UpdateAutoscalerHttpRequest.java
+++ b/src/main/java/com/google/cloud/compute/v1/UpdateAutoscalerHttpRequest.java
@@ -147,8 +147,8 @@ public String getAutoscaler() {
    *
    * 

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups of @@ -352,8 +352,8 @@ public Builder setAutoscaler(String autoscaler) { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups @@ -373,8 +373,8 @@ public Autoscaler getAutoscalerResource() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateBackendServiceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateBackendServiceHttpRequest.java index c97d53d5d..98db578dc 100644 --- a/src/main/java/com/google/cloud/compute/v1/UpdateBackendServiceHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/UpdateBackendServiceHttpRequest.java @@ -27,8 +27,8 @@ @BetaApi /** * Request object for method compute.backendServices.update. Updates the specified BackendService - * resource with the data included in the request. There are several restrictions and guidelines to - * keep in mind when updating a backend service. Read Restrictions and Guidelines for more + * resource with the data included in the request. There are several Understanding backend services + * to keep in mind when updating a backend service. Read Understanding backend services for more * information. */ public final class UpdateBackendServiceHttpRequest implements ApiMessage { @@ -152,8 +152,8 @@ public String getBackendService() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -353,8 +353,8 @@ public Builder setBackendService(String backendService) { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -372,8 +372,8 @@ public BackendService getBackendServiceResource() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateHealthCheckHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateHealthCheckHttpRequest.java index d1d7d000d..5a5b5109a 100644 --- a/src/main/java/com/google/cloud/compute/v1/UpdateHealthCheckHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/UpdateHealthCheckHttpRequest.java @@ -166,8 +166,8 @@ public String getHealthCheck() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -407,8 +407,8 @@ public Builder setHealthCheck(String healthCheck) { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -426,8 +426,8 @@ public HealthCheck getHealthCheckResource() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateInstanceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateInstanceHttpRequest.java new file mode 100644 index 000000000..c7b5049d6 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/UpdateInstanceHttpRequest.java @@ -0,0 +1,712 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.ApiMessage; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +@Generated("by GAPIC") +@BetaApi +/** + * Request object for method compute.instances.update. Updates an instance only if the necessary + * resources are available. This method can update only a specific set of instance properties. See + * Updating a running instance for a list of updatable instance properties. + */ +public final class UpdateInstanceHttpRequest implements ApiMessage { + private final String access_token; + private final String callback; + private final List fieldMask; + private final String fields; + private final String instance; + private final Instance instanceResource; + private final String key; + private final String minimalAction; + private final String mostDisruptiveAllowedAction; + private final String prettyPrint; + private final String quotaUser; + private final String requestId; + private final String userIp; + + private UpdateInstanceHttpRequest() { + this.access_token = null; + this.callback = null; + this.fieldMask = null; + this.fields = null; + this.instance = null; + this.instanceResource = null; + this.key = null; + this.minimalAction = null; + this.mostDisruptiveAllowedAction = null; + this.prettyPrint = null; + this.quotaUser = null; + this.requestId = null; + this.userIp = null; + } + + private UpdateInstanceHttpRequest( + String access_token, + String callback, + List fieldMask, + String fields, + String instance, + Instance instanceResource, + String key, + String minimalAction, + String mostDisruptiveAllowedAction, + String prettyPrint, + String quotaUser, + String requestId, + String userIp) { + this.access_token = access_token; + this.callback = callback; + this.fieldMask = fieldMask; + this.fields = fields; + this.instance = instance; + this.instanceResource = instanceResource; + this.key = key; + this.minimalAction = minimalAction; + this.mostDisruptiveAllowedAction = mostDisruptiveAllowedAction; + this.prettyPrint = prettyPrint; + this.quotaUser = quotaUser; + this.requestId = requestId; + this.userIp = userIp; + } + + @Override + public Object getFieldValue(String fieldName) { + if ("access_token".equals(fieldName)) { + return access_token; + } + if ("callback".equals(fieldName)) { + return callback; + } + if ("fieldMask".equals(fieldName)) { + return fieldMask; + } + if ("fields".equals(fieldName)) { + return fields; + } + if ("instance".equals(fieldName)) { + return instance; + } + if ("instanceResource".equals(fieldName)) { + return instanceResource; + } + if ("key".equals(fieldName)) { + return key; + } + if ("minimalAction".equals(fieldName)) { + return minimalAction; + } + if ("mostDisruptiveAllowedAction".equals(fieldName)) { + return mostDisruptiveAllowedAction; + } + if ("prettyPrint".equals(fieldName)) { + return prettyPrint; + } + if ("quotaUser".equals(fieldName)) { + return quotaUser; + } + if ("requestId".equals(fieldName)) { + return requestId; + } + if ("userIp".equals(fieldName)) { + return userIp; + } + return null; + } + + @Nullable + @Override + public Instance getApiMessageRequestBody() { + return instanceResource; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only those + * fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return fieldMask; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** + * Name of the instance resource to update. It must have the format + * `{project}/zones/{zone}/instances/{instance}`. \`{instance}\` must start with a letter, and + * contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores + * (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It must + * be between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public String getInstance() { + return instance; + } + + /** + * Represents an Instance resource. + * + *

An instance is a virtual machine that is hosted on Google Cloud Platform. For more + * information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==) + */ + public Instance getInstanceResource() { + return instanceResource; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** + * Specifies the action to take when updating an instance even if the updated properties do not + * require it. If not specified, then Compute Engine acts based on the minimum action that the + * updated properties require. + */ + public String getMinimalAction() { + return minimalAction; + } + + /** + * Specifies the most disruptive action that can be taken on the instance as part of the update. + * Compute Engine returns an error if the instance properties require a more disruptive action as + * part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and + * RESTART. + */ + public String getMostDisruptiveAllowedAction() { + return mostDisruptiveAllowedAction; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(UpdateInstanceHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + public static UpdateInstanceHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final UpdateInstanceHttpRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new UpdateInstanceHttpRequest(); + } + + public static class Builder { + private String access_token; + private String callback; + private List fieldMask; + private String fields; + private String instance; + private Instance instanceResource; + private String key; + private String minimalAction; + private String mostDisruptiveAllowedAction; + private String prettyPrint; + private String quotaUser; + private String requestId; + private String userIp; + + Builder() {} + + public Builder mergeFrom(UpdateInstanceHttpRequest other) { + if (other == UpdateInstanceHttpRequest.getDefaultInstance()) return this; + if (other.getAccessToken() != null) { + this.access_token = other.access_token; + } + if (other.getCallback() != null) { + this.callback = other.callback; + } + if (other.getFieldMask() != null) { + this.fieldMask = other.fieldMask; + } + if (other.getFields() != null) { + this.fields = other.fields; + } + if (other.getInstance() != null) { + this.instance = other.instance; + } + if (other.getInstanceResource() != null) { + this.instanceResource = other.instanceResource; + } + if (other.getKey() != null) { + this.key = other.key; + } + if (other.getMinimalAction() != null) { + this.minimalAction = other.minimalAction; + } + if (other.getMostDisruptiveAllowedAction() != null) { + this.mostDisruptiveAllowedAction = other.mostDisruptiveAllowedAction; + } + if (other.getPrettyPrint() != null) { + this.prettyPrint = other.prettyPrint; + } + if (other.getQuotaUser() != null) { + this.quotaUser = other.quotaUser; + } + if (other.getRequestId() != null) { + this.requestId = other.requestId; + } + if (other.getUserIp() != null) { + this.userIp = other.userIp; + } + return this; + } + + Builder(UpdateInstanceHttpRequest source) { + this.access_token = source.access_token; + this.callback = source.callback; + this.fieldMask = source.fieldMask; + this.fields = source.fields; + this.instance = source.instance; + this.instanceResource = source.instanceResource; + this.key = source.key; + this.minimalAction = source.minimalAction; + this.mostDisruptiveAllowedAction = source.mostDisruptiveAllowedAction; + this.prettyPrint = source.prettyPrint; + this.quotaUser = source.quotaUser; + this.requestId = source.requestId; + this.userIp = source.userIp; + } + + /** OAuth 2.0 token for the current user. */ + public String getAccessToken() { + return access_token; + } + + /** OAuth 2.0 token for the current user. */ + public Builder setAccessToken(String access_token) { + this.access_token = access_token; + return this; + } + + /** Name of the JavaScript callback function that handles the response. */ + public String getCallback() { + return callback; + } + + /** Name of the JavaScript callback function that handles the response. */ + public Builder setCallback(String callback) { + this.callback = callback; + return this; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public List getFieldMask() { + return fieldMask; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public Builder addAllFieldMask(List fieldMask) { + if (this.fieldMask == null) { + this.fieldMask = new LinkedList<>(); + } + this.fieldMask.addAll(fieldMask); + return this; + } + + /** + * The fields that should be serialized (even if they have empty values). If the containing + * message object has a non-null fieldmask, then all the fields in the field mask (and only + * those fields in the field mask) will be serialized. If the containing object does not have a + * fieldmask, then only non-empty fields will be serialized. + */ + public Builder addFieldMask(String fieldMask) { + if (this.fieldMask == null) { + this.fieldMask = new LinkedList<>(); + } + this.fieldMask.add(fieldMask); + return this; + } + + /** Selector specifying a subset of fields to include in the response. */ + public String getFields() { + return fields; + } + + /** Selector specifying a subset of fields to include in the response. */ + public Builder setFields(String fields) { + this.fields = fields; + return this; + } + + /** + * Name of the instance resource to update. It must have the format + * `{project}/zones/{zone}/instances/{instance}`. \`{instance}\` must start with a letter, and + * contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores + * (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It + * must be between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public String getInstance() { + return instance; + } + + /** + * Name of the instance resource to update. It must have the format + * `{project}/zones/{zone}/instances/{instance}`. \`{instance}\` must start with a letter, and + * contain only letters (\`[A-Za-z]\`), numbers (\`[0-9]\`), dashes (\`-\`), * underscores + * (\`_\`), periods (\`.\`), tildes (\`~\`), plus (\`+\`) or percent * signs (\`%\`). It + * must be between 3 and 255 characters in length, and it * must not start with \`"goog"\`. + */ + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + /** + * Represents an Instance resource. + * + *

An instance is a virtual machine that is hosted on Google Cloud Platform. For more + * information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==) + */ + public Instance getInstanceResource() { + return instanceResource; + } + + /** + * Represents an Instance resource. + * + *

An instance is a virtual machine that is hosted on Google Cloud Platform. For more + * information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==) + */ + public Builder setInstanceResource(Instance instanceResource) { + this.instanceResource = instanceResource; + return this; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public String getKey() { + return key; + } + + /** API key. Required unless you provide an OAuth 2.0 token. */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * Specifies the action to take when updating an instance even if the updated properties do not + * require it. If not specified, then Compute Engine acts based on the minimum action that the + * updated properties require. + */ + public String getMinimalAction() { + return minimalAction; + } + + /** + * Specifies the action to take when updating an instance even if the updated properties do not + * require it. If not specified, then Compute Engine acts based on the minimum action that the + * updated properties require. + */ + public Builder setMinimalAction(String minimalAction) { + this.minimalAction = minimalAction; + return this; + } + + /** + * Specifies the most disruptive action that can be taken on the instance as part of the update. + * Compute Engine returns an error if the instance properties require a more disruptive action + * as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, + * and RESTART. + */ + public String getMostDisruptiveAllowedAction() { + return mostDisruptiveAllowedAction; + } + + /** + * Specifies the most disruptive action that can be taken on the instance as part of the update. + * Compute Engine returns an error if the instance properties require a more disruptive action + * as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, + * and RESTART. + */ + public Builder setMostDisruptiveAllowedAction(String mostDisruptiveAllowedAction) { + this.mostDisruptiveAllowedAction = mostDisruptiveAllowedAction; + return this; + } + + /** Returns response with indentations and line breaks. */ + public String getPrettyPrint() { + return prettyPrint; + } + + /** Returns response with indentations and line breaks. */ + public Builder setPrettyPrint(String prettyPrint) { + this.prettyPrint = prettyPrint; + return this; + } + + /** Alternative to userIp. */ + public String getQuotaUser() { + return quotaUser; + } + + /** Alternative to userIp. */ + public Builder setQuotaUser(String quotaUser) { + this.quotaUser = quotaUser; + return this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public String getRequestId() { + return requestId; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has already been + * completed. + * + *

For example, consider a situation where you make an initial request and the request times + * out. If you make the request again with the same request ID, the server can check if original + * operation with the same request ID was received, and if so, will ignore the second request. + * This prevents clients from accidentally creating duplicate commitments. + * + *

The request ID must be a valid UUID with the exception that zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + */ + public Builder setRequestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** IP address of the end user for whom the API call is being made. */ + public String getUserIp() { + return userIp; + } + + /** IP address of the end user for whom the API call is being made. */ + public Builder setUserIp(String userIp) { + this.userIp = userIp; + return this; + } + + public UpdateInstanceHttpRequest build() { + String missing = ""; + + if (fieldMask == null) { + missing += " fieldMask"; + } + + if (instance == null) { + missing += " instance"; + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Missing required properties:" + missing); + } + return new UpdateInstanceHttpRequest( + access_token, + callback, + fieldMask, + fields, + instance, + instanceResource, + key, + minimalAction, + mostDisruptiveAllowedAction, + prettyPrint, + quotaUser, + requestId, + userIp); + } + + public Builder clone() { + Builder newBuilder = new Builder(); + newBuilder.setAccessToken(this.access_token); + newBuilder.setCallback(this.callback); + newBuilder.addAllFieldMask(this.fieldMask); + newBuilder.setFields(this.fields); + newBuilder.setInstance(this.instance); + newBuilder.setInstanceResource(this.instanceResource); + newBuilder.setKey(this.key); + newBuilder.setMinimalAction(this.minimalAction); + newBuilder.setMostDisruptiveAllowedAction(this.mostDisruptiveAllowedAction); + newBuilder.setPrettyPrint(this.prettyPrint); + newBuilder.setQuotaUser(this.quotaUser); + newBuilder.setRequestId(this.requestId); + newBuilder.setUserIp(this.userIp); + return newBuilder; + } + } + + @Override + public String toString() { + return "UpdateInstanceHttpRequest{" + + "access_token=" + + access_token + + ", " + + "callback=" + + callback + + ", " + + "fieldMask=" + + fieldMask + + ", " + + "fields=" + + fields + + ", " + + "instance=" + + instance + + ", " + + "instanceResource=" + + instanceResource + + ", " + + "key=" + + key + + ", " + + "minimalAction=" + + minimalAction + + ", " + + "mostDisruptiveAllowedAction=" + + mostDisruptiveAllowedAction + + ", " + + "prettyPrint=" + + prettyPrint + + ", " + + "quotaUser=" + + quotaUser + + ", " + + "requestId=" + + requestId + + ", " + + "userIp=" + + userIp + + "}"; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof UpdateInstanceHttpRequest) { + UpdateInstanceHttpRequest that = (UpdateInstanceHttpRequest) o; + return Objects.equals(this.access_token, that.getAccessToken()) + && Objects.equals(this.callback, that.getCallback()) + && Objects.equals(this.fieldMask, that.getFieldMask()) + && Objects.equals(this.fields, that.getFields()) + && Objects.equals(this.instance, that.getInstance()) + && Objects.equals(this.instanceResource, that.getInstanceResource()) + && Objects.equals(this.key, that.getKey()) + && Objects.equals(this.minimalAction, that.getMinimalAction()) + && Objects.equals(this.mostDisruptiveAllowedAction, that.getMostDisruptiveAllowedAction()) + && Objects.equals(this.prettyPrint, that.getPrettyPrint()) + && Objects.equals(this.quotaUser, that.getQuotaUser()) + && Objects.equals(this.requestId, that.getRequestId()) + && Objects.equals(this.userIp, that.getUserIp()); + } + return false; + } + + @Override + public int hashCode() { + return Objects.hash( + access_token, + callback, + fieldMask, + fields, + instance, + instanceResource, + key, + minimalAction, + mostDisruptiveAllowedAction, + prettyPrint, + quotaUser, + requestId, + userIp); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateRegionAutoscalerHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateRegionAutoscalerHttpRequest.java index 183ec4ee0..b09050fb5 100644 --- a/src/main/java/com/google/cloud/compute/v1/UpdateRegionAutoscalerHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/UpdateRegionAutoscalerHttpRequest.java @@ -147,8 +147,8 @@ public String getAutoscaler() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups of @@ -352,8 +352,8 @@ public Builder setAutoscaler(String autoscaler) { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups @@ -373,8 +373,8 @@ public Autoscaler getAutoscalerResource() { * *

Google Compute Engine has two Autoscaler resources: * - *

* [Global](/compute/docs/reference/rest/latest/autoscalers) * - * [Regional](/compute/docs/reference/rest/latest/regionAutoscalers) + *

* [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers) * *

Use autoscalers to automatically add or delete instances from a managed instance group * according to your defined autoscaling policy. For more information, read Autoscaling Groups diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateRegionBackendServiceHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateRegionBackendServiceHttpRequest.java index 96eedec10..c902efb62 100644 --- a/src/main/java/com/google/cloud/compute/v1/UpdateRegionBackendServiceHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/UpdateRegionBackendServiceHttpRequest.java @@ -27,9 +27,9 @@ @BetaApi /** * Request object for method compute.regionBackendServices.update. Updates the specified regional - * BackendService resource with the data included in the request. There are several restrictions and - * guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for - * more information. + * BackendService resource with the data included in the request. There are several Understanding + * backend services to keep in mind when updating a backend service. Read Understanding backend + * services for more information. */ public final class UpdateRegionBackendServiceHttpRequest implements ApiMessage { private final String access_token; @@ -152,8 +152,8 @@ public String getBackendService() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -353,8 +353,8 @@ public Builder setBackendService(String backendService) { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * @@ -372,8 +372,8 @@ public BackendService getBackendServiceResource() { * *

Backend services in Google Compute Engine can be either regionally or globally scoped. * - *

* [Global](/compute/docs/reference/rest/latest/backendServices) * - * [Regional](/compute/docs/reference/rest/latest/regionBackendServices) + *

* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices) * *

For more information, read Backend Services. * diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateRegionHealthCheckHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateRegionHealthCheckHttpRequest.java index acfcc423f..97eebed76 100644 --- a/src/main/java/com/google/cloud/compute/v1/UpdateRegionHealthCheckHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/UpdateRegionHealthCheckHttpRequest.java @@ -167,8 +167,8 @@ public String getHealthCheck() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -408,8 +408,8 @@ public Builder setHealthCheck(String healthCheck) { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more @@ -427,8 +427,8 @@ public HealthCheck getHealthCheckResource() { * *

Google Compute Engine has two Health Check resources: * - *

* [Global](/compute/docs/reference/rest/latest/healthChecks) * - * [Regional](/compute/docs/reference/rest/latest/regionHealthChecks) + *

* [Global](/compute/docs/reference/rest/{$api_version}/healthChecks) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionHealthChecks) * *

Internal HTTP(S) load balancers use regional health checks. All other types of GCP load * balancers and managed instance group auto-healing use global health checks. For more diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateRegionUrlMapHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateRegionUrlMapHttpRequest.java index 962f6e2a5..919fc9542 100644 --- a/src/main/java/com/google/cloud/compute/v1/UpdateRegionUrlMapHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/UpdateRegionUrlMapHttpRequest.java @@ -186,8 +186,8 @@ public String getUrlMap() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -444,8 +444,8 @@ public Builder setUrlMap(String urlMap) { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -470,8 +470,8 @@ public UrlMap getUrlMapResource() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. diff --git a/src/main/java/com/google/cloud/compute/v1/UpdateUrlMapHttpRequest.java b/src/main/java/com/google/cloud/compute/v1/UpdateUrlMapHttpRequest.java index b2165e764..4dc826541 100644 --- a/src/main/java/com/google/cloud/compute/v1/UpdateUrlMapHttpRequest.java +++ b/src/main/java/com/google/cloud/compute/v1/UpdateUrlMapHttpRequest.java @@ -198,8 +198,8 @@ public String getUrlMap() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -480,8 +480,8 @@ public Builder setUrlMap(String urlMap) { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. @@ -506,8 +506,8 @@ public UrlMap getUrlMapResource() { * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. diff --git a/src/main/java/com/google/cloud/compute/v1/UrlMap.java b/src/main/java/com/google/cloud/compute/v1/UrlMap.java index 9fbca4b7c..ffe415c62 100644 --- a/src/main/java/com/google/cloud/compute/v1/UrlMap.java +++ b/src/main/java/com/google/cloud/compute/v1/UrlMap.java @@ -30,8 +30,8 @@ * *

Google Compute Engine has two URL Map resources: * - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) * *

A URL map resource is a component of certain types of GCP load balancers and Traffic Director. * diff --git a/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java b/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java index 80facc52c..e81681ee7 100644 --- a/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java +++ b/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java @@ -160,20 +160,29 @@ public UrlMapStub getStub() { * *


    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (UrlMapsScopedList element : urlMapClient.aggregatedListUrlMaps(project).iterateAll()) {
+   *   for (UrlMapsScopedList element : urlMapClient.aggregatedListUrlMaps(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListUrlMapsPagedResponse aggregatedListUrlMaps(ProjectName project) { + public final AggregatedListUrlMapsPagedResponse aggregatedListUrlMaps( + Boolean includeAllScopes, ProjectName project) { AggregatedListUrlMapsHttpRequest request = AggregatedListUrlMapsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListUrlMaps(request); @@ -188,20 +197,31 @@ public final AggregatedListUrlMapsPagedResponse aggregatedListUrlMaps(ProjectNam * *

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (UrlMapsScopedList element : urlMapClient.aggregatedListUrlMaps(project.toString()).iterateAll()) {
+   *   for (UrlMapsScopedList element : urlMapClient.aggregatedListUrlMaps(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Name of the project scoping this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListUrlMapsPagedResponse aggregatedListUrlMaps(String project) { + public final AggregatedListUrlMapsPagedResponse aggregatedListUrlMaps( + Boolean includeAllScopes, String project) { AggregatedListUrlMapsHttpRequest request = - AggregatedListUrlMapsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListUrlMapsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListUrlMaps(request); } @@ -214,8 +234,10 @@ public final AggregatedListUrlMapsPagedResponse aggregatedListUrlMaps(String pro * *

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListUrlMapsHttpRequest request = AggregatedListUrlMapsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (UrlMapsScopedList element : urlMapClient.aggregatedListUrlMaps(request).iterateAll()) {
@@ -242,8 +264,10 @@ public final AggregatedListUrlMapsPagedResponse aggregatedListUrlMaps(
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListUrlMapsHttpRequest request = AggregatedListUrlMapsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListUrlMapsPagedResponse> future = urlMapClient.aggregatedListUrlMapsPagedCallable().futureCall(request);
@@ -269,8 +293,10 @@ public final AggregatedListUrlMapsPagedResponse aggregatedListUrlMaps(
    *
    * 

    * try (UrlMapClient urlMapClient = UrlMapClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListUrlMapsHttpRequest request = AggregatedListUrlMapsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
@@ -504,8 +530,8 @@ public final UnaryCallable getUrlMapCallable() {
    * @param project Project ID for this request.
    * @param urlMapResource Represents a URL Map resource.
    *     

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -545,8 +571,8 @@ public final Operation insertUrlMap(ProjectName project, UrlMap urlMapResource) * @param project Project ID for this request. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -889,8 +915,8 @@ public final UnaryCallable listUrlMapsCallab * @param urlMap Name of the UrlMap resource to patch. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -938,8 +964,8 @@ public final Operation patchUrlMap( * @param urlMap Name of the UrlMap resource to patch. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -1042,8 +1068,8 @@ public final UnaryCallable patchUrlMapCallabl * @param urlMap Name of the UrlMap resource to update. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * @@ -1090,8 +1116,8 @@ public final Operation updateUrlMap( * @param urlMap Name of the UrlMap resource to update. * @param urlMapResource Represents a URL Map resource. *

Google Compute Engine has two URL Map resources: - *

* [Global](/compute/docs/reference/rest/latest/urlMaps) * - * [Regional](/compute/docs/reference/rest/latest/regionUrlMaps) + *

* [Global](/compute/docs/reference/rest/{$api_version}/urlMaps) * + * [Regional](/compute/docs/reference/rest/{$api_version}/regionUrlMaps) *

A URL map resource is a component of certain types of GCP load balancers and Traffic * Director. *

* urlMaps are used by external HTTP(S) load balancers and Traffic Director. * diff --git a/src/main/java/com/google/cloud/compute/v1/VpnGatewayClient.java b/src/main/java/com/google/cloud/compute/v1/VpnGatewayClient.java index 30c444c85..1762e9a1c 100644 --- a/src/main/java/com/google/cloud/compute/v1/VpnGatewayClient.java +++ b/src/main/java/com/google/cloud/compute/v1/VpnGatewayClient.java @@ -159,21 +159,29 @@ public VpnGatewayStub getStub() { * *


    * try (VpnGatewayClient vpnGatewayClient = VpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (VpnGatewaysScopedList element : vpnGatewayClient.aggregatedListVpnGateways(project).iterateAll()) {
+   *   for (VpnGatewaysScopedList element : vpnGatewayClient.aggregatedListVpnGateways(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi public final AggregatedListVpnGatewaysPagedResponse aggregatedListVpnGateways( - ProjectName project) { + Boolean includeAllScopes, ProjectName project) { AggregatedListVpnGatewaysHttpRequest request = AggregatedListVpnGatewaysHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListVpnGateways(request); @@ -187,20 +195,31 @@ public final AggregatedListVpnGatewaysPagedResponse aggregatedListVpnGateways( * *

    * try (VpnGatewayClient vpnGatewayClient = VpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (VpnGatewaysScopedList element : vpnGatewayClient.aggregatedListVpnGateways(project.toString()).iterateAll()) {
+   *   for (VpnGatewaysScopedList element : vpnGatewayClient.aggregatedListVpnGateways(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListVpnGatewaysPagedResponse aggregatedListVpnGateways(String project) { + public final AggregatedListVpnGatewaysPagedResponse aggregatedListVpnGateways( + Boolean includeAllScopes, String project) { AggregatedListVpnGatewaysHttpRequest request = - AggregatedListVpnGatewaysHttpRequest.newBuilder().setProject(project).build(); + AggregatedListVpnGatewaysHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListVpnGateways(request); } @@ -212,8 +231,10 @@ public final AggregatedListVpnGatewaysPagedResponse aggregatedListVpnGateways(St * *

    * try (VpnGatewayClient vpnGatewayClient = VpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnGatewaysHttpRequest request = AggregatedListVpnGatewaysHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (VpnGatewaysScopedList element : vpnGatewayClient.aggregatedListVpnGateways(request).iterateAll()) {
@@ -239,8 +260,10 @@ public final AggregatedListVpnGatewaysPagedResponse aggregatedListVpnGateways(
    *
    * 

    * try (VpnGatewayClient vpnGatewayClient = VpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnGatewaysHttpRequest request = AggregatedListVpnGatewaysHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListVpnGatewaysPagedResponse> future = vpnGatewayClient.aggregatedListVpnGatewaysPagedCallable().futureCall(request);
@@ -266,8 +289,10 @@ public final AggregatedListVpnGatewaysPagedResponse aggregatedListVpnGateways(
    *
    * 

    * try (VpnGatewayClient vpnGatewayClient = VpnGatewayClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnGatewaysHttpRequest request = AggregatedListVpnGatewaysHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/VpnTunnelClient.java b/src/main/java/com/google/cloud/compute/v1/VpnTunnelClient.java
index 63045d6ef..e6fcf3e3d 100644
--- a/src/main/java/com/google/cloud/compute/v1/VpnTunnelClient.java
+++ b/src/main/java/com/google/cloud/compute/v1/VpnTunnelClient.java
@@ -159,20 +159,29 @@ public VpnTunnelStub getStub() {
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (VpnTunnelsScopedList element : vpnTunnelClient.aggregatedListVpnTunnels(project).iterateAll()) {
+   *   for (VpnTunnelsScopedList element : vpnTunnelClient.aggregatedListVpnTunnels(includeAllScopes, project).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(ProjectName project) { + public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels( + Boolean includeAllScopes, ProjectName project) { AggregatedListVpnTunnelsHttpRequest request = AggregatedListVpnTunnelsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) .setProject(project == null ? null : project.toString()) .build(); return aggregatedListVpnTunnels(request); @@ -186,20 +195,31 @@ public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(Proj * *

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (VpnTunnelsScopedList element : vpnTunnelClient.aggregatedListVpnTunnels(project.toString()).iterateAll()) {
+   *   for (VpnTunnelsScopedList element : vpnTunnelClient.aggregatedListVpnTunnels(includeAllScopes, project.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
* + * @param includeAllScopes Indicates whether every visible scope for each scope type (zone, + * region, global) should be included in the response. For new resource types added after this + * field, the flag has no effect as new resource types will always include every visible scope + * for each scope type in response. For resource types which predate this field, if this flag + * is omitted or false, only scopes of the scope types where the resource type is expected to + * be found will be included. * @param project Project ID for this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi - public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(String project) { + public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels( + Boolean includeAllScopes, String project) { AggregatedListVpnTunnelsHttpRequest request = - AggregatedListVpnTunnelsHttpRequest.newBuilder().setProject(project).build(); + AggregatedListVpnTunnelsHttpRequest.newBuilder() + .setIncludeAllScopes(includeAllScopes) + .setProject(project) + .build(); return aggregatedListVpnTunnels(request); } @@ -211,8 +231,10 @@ public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(Stri * *

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnTunnelsHttpRequest request = AggregatedListVpnTunnelsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   for (VpnTunnelsScopedList element : vpnTunnelClient.aggregatedListVpnTunnels(request).iterateAll()) {
@@ -238,8 +260,10 @@ public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnTunnelsHttpRequest request = AggregatedListVpnTunnelsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   ApiFuture<AggregatedListVpnTunnelsPagedResponse> future = vpnTunnelClient.aggregatedListVpnTunnelsPagedCallable().futureCall(request);
@@ -265,8 +289,10 @@ public final AggregatedListVpnTunnelsPagedResponse aggregatedListVpnTunnels(
    *
    * 

    * try (VpnTunnelClient vpnTunnelClient = VpnTunnelClient.create()) {
+   *   Boolean includeAllScopes = false;
    *   String formattedProject = ProjectName.format("[PROJECT]");
    *   AggregatedListVpnTunnelsHttpRequest request = AggregatedListVpnTunnelsHttpRequest.newBuilder()
+   *     .setIncludeAllScopes(includeAllScopes)
    *     .setProject(formattedProject)
    *     .build();
    *   while (true) {
diff --git a/src/main/java/com/google/cloud/compute/v1/package-info.java b/src/main/java/com/google/cloud/compute/v1/package-info.java
index 904c3ca62..b792555d6 100644
--- a/src/main/java/com/google/cloud/compute/v1/package-info.java
+++ b/src/main/java/com/google/cloud/compute/v1/package-info.java
@@ -202,6 +202,23 @@
  * 
  * 
* + * ================================ GlobalNetworkEndpointGroupClient + * ================================ + * + *

Service Description: Creates and runs virtual machines on Google Cloud Platform. + * + *

Sample for GlobalNetworkEndpointGroupClient: + * + *

+ * 
+ * try (GlobalNetworkEndpointGroupClient globalNetworkEndpointGroupClient = GlobalNetworkEndpointGroupClient.create()) {
+ *   ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]");
+ *   GlobalNetworkEndpointGroupsAttachEndpointsRequest globalNetworkEndpointGroupsAttachEndpointsRequestResource = GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build();
+ *   Operation response = globalNetworkEndpointGroupClient.attachNetworkEndpointsGlobalNetworkEndpointGroup(networkEndpointGroup, globalNetworkEndpointGroupsAttachEndpointsRequestResource);
+ * }
+ * 
+ * 
+ * * ===================== GlobalOperationClient ===================== * *

Service Description: Creates and runs virtual machines on Google Cloud Platform. diff --git a/src/main/java/com/google/cloud/compute/v1/stub/GlobalNetworkEndpointGroupStub.java b/src/main/java/com/google/cloud/compute/v1/stub/GlobalNetworkEndpointGroupStub.java new file mode 100644 index 000000000..69fe282b0 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/stub/GlobalNetworkEndpointGroupStub.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1.stub; + +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListGlobalNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints; +import com.google.cloud.compute.v1.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for compute. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class GlobalNetworkEndpointGroupStub implements BackgroundResource { + + @BetaApi + public UnaryCallable + attachNetworkEndpointsGlobalNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: attachNetworkEndpointsGlobalNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + deleteGlobalNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteGlobalNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + detachNetworkEndpointsGlobalNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: detachNetworkEndpointsGlobalNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + getGlobalNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: getGlobalNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable + insertGlobalNetworkEndpointGroupCallable() { + throw new UnsupportedOperationException( + "Not implemented: insertGlobalNetworkEndpointGroupCallable()"); + } + + @BetaApi + public UnaryCallable< + ListGlobalNetworkEndpointGroupsHttpRequest, ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listGlobalNetworkEndpointGroupsPagedCallable()"); + } + + @BetaApi + public UnaryCallable + listGlobalNetworkEndpointGroupsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listGlobalNetworkEndpointGroupsCallable()"); + } + + @BetaApi + public UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable()"); + } + + @BetaApi + public UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsGlobalNetworkEndpointGroupsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listNetworkEndpointsGlobalNetworkEndpointGroupsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/src/main/java/com/google/cloud/compute/v1/stub/GlobalNetworkEndpointGroupStubSettings.java b/src/main/java/com/google/cloud/compute/v1/stub/GlobalNetworkEndpointGroupStubSettings.java new file mode 100644 index 000000000..c92c89e13 --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/stub/GlobalNetworkEndpointGroupStubSettings.java @@ -0,0 +1,707 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1.stub; + +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListGlobalNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints; +import com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus; +import com.google.cloud.compute.v1.Operation; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link GlobalNetworkEndpointGroupStub}. + * + *

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

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

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of attachNetworkEndpointsGlobalNetworkEndpointGroup to + * 30 seconds: + * + *

+ * 
+ * GlobalNetworkEndpointGroupStubSettings.Builder globalNetworkEndpointGroupSettingsBuilder =
+ *     GlobalNetworkEndpointGroupStubSettings.newBuilder();
+ * globalNetworkEndpointGroupSettingsBuilder
+ *     .attachNetworkEndpointsGlobalNetworkEndpointGroupSettings()
+ *     .setRetrySettings(
+ *         globalNetworkEndpointGroupSettingsBuilder.attachNetworkEndpointsGlobalNetworkEndpointGroupSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GlobalNetworkEndpointGroupStubSettings globalNetworkEndpointGroupSettings = globalNetworkEndpointGroupSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class GlobalNetworkEndpointGroupStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/compute") + .add("https://www.googleapis.com/auth/compute.readonly") + .add("https://www.googleapis.com/auth/devstorage.full_control") + .add("https://www.googleapis.com/auth/devstorage.read_only") + .add("https://www.googleapis.com/auth/devstorage.read_write") + .build(); + + private final UnaryCallSettings< + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings; + private final UnaryCallSettings + deleteGlobalNetworkEndpointGroupSettings; + private final UnaryCallSettings< + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings; + private final UnaryCallSettings + getGlobalNetworkEndpointGroupSettings; + private final UnaryCallSettings + insertGlobalNetworkEndpointGroupSettings; + private final PagedCallSettings< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsSettings; + private final PagedCallSettings< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings; + + /** + * Returns the object with the settings used for calls to + * attachNetworkEndpointsGlobalNetworkEndpointGroup. + */ + public UnaryCallSettings + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings() { + return attachNetworkEndpointsGlobalNetworkEndpointGroupSettings; + } + + /** Returns the object with the settings used for calls to deleteGlobalNetworkEndpointGroup. */ + public UnaryCallSettings + deleteGlobalNetworkEndpointGroupSettings() { + return deleteGlobalNetworkEndpointGroupSettings; + } + + /** + * Returns the object with the settings used for calls to + * detachNetworkEndpointsGlobalNetworkEndpointGroup. + */ + public UnaryCallSettings + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings() { + return detachNetworkEndpointsGlobalNetworkEndpointGroupSettings; + } + + /** Returns the object with the settings used for calls to getGlobalNetworkEndpointGroup. */ + public UnaryCallSettings + getGlobalNetworkEndpointGroupSettings() { + return getGlobalNetworkEndpointGroupSettings; + } + + /** Returns the object with the settings used for calls to insertGlobalNetworkEndpointGroup. */ + public UnaryCallSettings + insertGlobalNetworkEndpointGroupSettings() { + return insertGlobalNetworkEndpointGroupSettings; + } + + /** Returns the object with the settings used for calls to listGlobalNetworkEndpointGroups. */ + public PagedCallSettings< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsSettings() { + return listGlobalNetworkEndpointGroupsSettings; + } + + /** + * Returns the object with the settings used for calls to + * listNetworkEndpointsGlobalNetworkEndpointGroups. + */ + public PagedCallSettings< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings() { + return listNetworkEndpointsGlobalNetworkEndpointGroupsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public GlobalNetworkEndpointGroupStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonGlobalNetworkEndpointGroupStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "https://compute.googleapis.com/compute/v1/projects/"; + } + + /** Returns the default service port. */ + public static int getDefaultServicePort() { + return 443; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultHttpJsonTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(GlobalNetworkEndpointGroupStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GlobalNetworkEndpointGroupStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings = + settingsBuilder.attachNetworkEndpointsGlobalNetworkEndpointGroupSettings().build(); + deleteGlobalNetworkEndpointGroupSettings = + settingsBuilder.deleteGlobalNetworkEndpointGroupSettings().build(); + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings = + settingsBuilder.detachNetworkEndpointsGlobalNetworkEndpointGroupSettings().build(); + getGlobalNetworkEndpointGroupSettings = + settingsBuilder.getGlobalNetworkEndpointGroupSettings().build(); + insertGlobalNetworkEndpointGroupSettings = + settingsBuilder.insertGlobalNetworkEndpointGroupSettings().build(); + listGlobalNetworkEndpointGroupsSettings = + settingsBuilder.listGlobalNetworkEndpointGroupsSettings().build(); + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings = + settingsBuilder.listNetworkEndpointsGlobalNetworkEndpointGroupsSettings().build(); + } + + private static final PagedListDescriptor< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + LIST_GLOBAL_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListGlobalNetworkEndpointGroupsHttpRequest injectToken( + ListGlobalNetworkEndpointGroupsHttpRequest payload, String token) { + return ListGlobalNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListGlobalNetworkEndpointGroupsHttpRequest injectPageSize( + ListGlobalNetworkEndpointGroupsHttpRequest payload, int pageSize) { + return ListGlobalNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setMaxResults(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListGlobalNetworkEndpointGroupsHttpRequest payload) { + return payload.getMaxResults(); + } + + @Override + public String extractNextToken(NetworkEndpointGroupList payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + NetworkEndpointGroupList payload) { + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + LIST_NETWORK_ENDPOINTS_GLOBAL_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest injectToken( + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest payload, String token) { + return ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest injectPageSize( + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest payload, int pageSize) { + return ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest.newBuilder(payload) + .setMaxResults(pageSize) + .build(); + } + + @Override + public Integer extractPageSize( + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest payload) { + return payload.getMaxResults(); + } + + @Override + public String extractNextToken(NetworkEndpointGroupsListNetworkEndpoints payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + NetworkEndpointGroupsListNetworkEndpoints payload) { + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListGlobalNetworkEndpointGroupsPagedResponse> + LIST_GLOBAL_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListGlobalNetworkEndpointGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListGlobalNetworkEndpointGroupsHttpRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + NetworkEndpointGroup> + pageContext = + PageContext.create( + callable, + LIST_GLOBAL_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC, + request, + context); + return ListGlobalNetworkEndpointGroupsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + LIST_NETWORK_ENDPOINTS_GLOBAL_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + callable, + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + NetworkEndpointWithHealthStatus> + pageContext = + PageContext.create( + callable, + LIST_NETWORK_ENDPOINTS_GLOBAL_NETWORK_ENDPOINT_GROUPS_PAGE_STR_DESC, + request, + context); + return ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Builder for GlobalNetworkEndpointGroupStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder< + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings; + private final UnaryCallSettings.Builder + deleteGlobalNetworkEndpointGroupSettings; + private final UnaryCallSettings.Builder< + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings; + private final UnaryCallSettings.Builder< + GetGlobalNetworkEndpointGroupHttpRequest, NetworkEndpointGroup> + getGlobalNetworkEndpointGroupSettings; + private final UnaryCallSettings.Builder + insertGlobalNetworkEndpointGroupSettings; + private final PagedCallSettings.Builder< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsSettings; + private final PagedCallSettings.Builder< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteGlobalNetworkEndpointGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getGlobalNetworkEndpointGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + insertGlobalNetworkEndpointGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listGlobalNetworkEndpointGroupsSettings = + PagedCallSettings.newBuilder(LIST_GLOBAL_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT); + + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings = + PagedCallSettings.newBuilder( + LIST_NETWORK_ENDPOINTS_GLOBAL_NETWORK_ENDPOINT_GROUPS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings, + deleteGlobalNetworkEndpointGroupSettings, + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings, + getGlobalNetworkEndpointGroupSettings, + insertGlobalNetworkEndpointGroupSettings, + listGlobalNetworkEndpointGroupsSettings, + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .attachNetworkEndpointsGlobalNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteGlobalNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .detachNetworkEndpointsGlobalNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getGlobalNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .insertGlobalNetworkEndpointGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listGlobalNetworkEndpointGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listNetworkEndpointsGlobalNetworkEndpointGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(GlobalNetworkEndpointGroupStubSettings settings) { + super(settings); + + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings = + settings.attachNetworkEndpointsGlobalNetworkEndpointGroupSettings.toBuilder(); + deleteGlobalNetworkEndpointGroupSettings = + settings.deleteGlobalNetworkEndpointGroupSettings.toBuilder(); + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings = + settings.detachNetworkEndpointsGlobalNetworkEndpointGroupSettings.toBuilder(); + getGlobalNetworkEndpointGroupSettings = + settings.getGlobalNetworkEndpointGroupSettings.toBuilder(); + insertGlobalNetworkEndpointGroupSettings = + settings.insertGlobalNetworkEndpointGroupSettings.toBuilder(); + listGlobalNetworkEndpointGroupsSettings = + settings.listGlobalNetworkEndpointGroupsSettings.toBuilder(); + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings = + settings.listNetworkEndpointsGlobalNetworkEndpointGroupsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings, + deleteGlobalNetworkEndpointGroupSettings, + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings, + getGlobalNetworkEndpointGroupSettings, + insertGlobalNetworkEndpointGroupSettings, + listGlobalNetworkEndpointGroupsSettings, + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** + * Returns the builder for the settings used for calls to + * attachNetworkEndpointsGlobalNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsGlobalNetworkEndpointGroupSettings() { + return attachNetworkEndpointsGlobalNetworkEndpointGroupSettings; + } + + /** Returns the builder for the settings used for calls to deleteGlobalNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + deleteGlobalNetworkEndpointGroupSettings() { + return deleteGlobalNetworkEndpointGroupSettings; + } + + /** + * Returns the builder for the settings used for calls to + * detachNetworkEndpointsGlobalNetworkEndpointGroup. + */ + public UnaryCallSettings.Builder< + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsGlobalNetworkEndpointGroupSettings() { + return detachNetworkEndpointsGlobalNetworkEndpointGroupSettings; + } + + /** Returns the builder for the settings used for calls to getGlobalNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + getGlobalNetworkEndpointGroupSettings() { + return getGlobalNetworkEndpointGroupSettings; + } + + /** Returns the builder for the settings used for calls to insertGlobalNetworkEndpointGroup. */ + public UnaryCallSettings.Builder + insertGlobalNetworkEndpointGroupSettings() { + return insertGlobalNetworkEndpointGroupSettings; + } + + /** Returns the builder for the settings used for calls to listGlobalNetworkEndpointGroups. */ + public PagedCallSettings.Builder< + ListGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupList, + ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsSettings() { + return listGlobalNetworkEndpointGroupsSettings; + } + + /** + * Returns the builder for the settings used for calls to + * listNetworkEndpointsGlobalNetworkEndpointGroups. + */ + public PagedCallSettings.Builder< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsSettings() { + return listNetworkEndpointsGlobalNetworkEndpointGroupsSettings; + } + + @Override + public GlobalNetworkEndpointGroupStubSettings build() throws IOException { + return new GlobalNetworkEndpointGroupStubSettings(this); + } + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAcceleratorTypeStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAcceleratorTypeStub.java index c2b7c77ab..2557d1713 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAcceleratorTypeStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAcceleratorTypeStub.java @@ -68,7 +68,8 @@ public class HttpJsonAcceleratorTypeStub extends AcceleratorTypeStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/acceleratorTypes")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAddressStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAddressStub.java index 010c52aa6..3d93ad895 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAddressStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAddressStub.java @@ -68,7 +68,8 @@ public class HttpJsonAddressStub extends AddressStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/addresses")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAutoscalerStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAutoscalerStub.java index 17548e12d..b4eaa51b4 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAutoscalerStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonAutoscalerStub.java @@ -71,7 +71,8 @@ public class HttpJsonAutoscalerStub extends AutoscalerStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/autoscalers")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonBackendServiceStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonBackendServiceStub.java index 8ed7e2970..9365f5848 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonBackendServiceStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonBackendServiceStub.java @@ -98,7 +98,8 @@ public class HttpJsonBackendServiceStub extends BackendServiceStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/backendServices")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonDiskStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonDiskStub.java index 28ecca49d..5f30a4c14 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonDiskStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonDiskStub.java @@ -99,7 +99,8 @@ public class HttpJsonDiskStub extends DiskStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/disks")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonDiskTypeStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonDiskTypeStub.java index fb7c16268..d1a499cdf 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonDiskTypeStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonDiskTypeStub.java @@ -66,7 +66,8 @@ public class HttpJsonDiskTypeStub extends DiskTypeStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/diskTypes")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonForwardingRuleStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonForwardingRuleStub.java index 48f94e74b..ed8fb66f0 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonForwardingRuleStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonForwardingRuleStub.java @@ -72,7 +72,8 @@ public class HttpJsonForwardingRuleStub extends ForwardingRuleStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/forwardingRules")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalNetworkEndpointGroupCallableFactory.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalNetworkEndpointGroupCallableFactory.java new file mode 100644 index 000000000..ead0d63ad --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalNetworkEndpointGroupCallableFactory.java @@ -0,0 +1,84 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.ApiMessage; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import javax.annotation.Generated; +import javax.annotation.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * HTTP callable factory implementation for compute. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class HttpJsonGlobalNetworkEndpointGroupCallableFactory + implements HttpJsonStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + @Nullable + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + BackgroundResource operationsStub) { + return null; + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, batchingCallSettings, clientContext); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalNetworkEndpointGroupStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalNetworkEndpointGroupStub.java new file mode 100644 index 000000000..25d70f01d --- /dev/null +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalNetworkEndpointGroupStub.java @@ -0,0 +1,491 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1.stub; + +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListGlobalNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse; + +import com.google.api.client.http.HttpMethods; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMessageHttpRequestFormatter; +import com.google.api.gax.httpjson.ApiMessageHttpResponseParser; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; +import com.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupHttpRequest; +import com.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest; +import com.google.cloud.compute.v1.NetworkEndpointGroup; +import com.google.cloud.compute.v1.NetworkEndpointGroupList; +import com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints; +import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.ProjectGlobalNetworkEndpointGroupName; +import com.google.cloud.compute.v1.ProjectName; +import com.google.common.collect.Sets; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * HTTP stub implementation for compute. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class HttpJsonGlobalNetworkEndpointGroupStub extends GlobalNetworkEndpointGroupStub { + @InternalApi + public static final ApiMethodDescriptor< + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsGlobalNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.globalNetworkEndpointGroups.attachNetworkEndpoints") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/global/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectGlobalNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor + deleteGlobalNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.globalNetworkEndpointGroups.delete") + .setHttpMethod(HttpMethods.DELETE) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/global/networkEndpointGroups/{networkEndpointGroup}")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectGlobalNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsGlobalNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.globalNetworkEndpointGroups.detachNetworkEndpoints") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/global/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectGlobalNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + GetGlobalNetworkEndpointGroupHttpRequest, NetworkEndpointGroup> + getGlobalNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.globalNetworkEndpointGroups.get") + .setHttpMethod(HttpMethods.GET) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/global/networkEndpointGroups/{networkEndpointGroup}")) + .setQueryParams(Sets.newHashSet()) + .setResourceNameFactory(ProjectGlobalNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(NetworkEndpointGroup.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor + insertGlobalNetworkEndpointGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.globalNetworkEndpointGroups.insert") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create("{project}/global/networkEndpointGroups")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectName.newFactory()) + .setResourceNameField("project") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + ListGlobalNetworkEndpointGroupsHttpRequest, NetworkEndpointGroupList> + listGlobalNetworkEndpointGroupsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.globalNetworkEndpointGroups.list") + .setHttpMethod(HttpMethods.GET) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create("{project}/global/networkEndpointGroups")) + .setQueryParams( + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + .setResourceNameFactory(ProjectName.newFactory()) + .setResourceNameField("project") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(NetworkEndpointGroupList.getDefaultInstance()) + .build()) + .build(); + + @InternalApi + public static final ApiMethodDescriptor< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsGlobalNetworkEndpointGroupsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName("compute.globalNetworkEndpointGroups.listNetworkEndpoints") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/global/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints")) + .setQueryParams( + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + .setResourceNameFactory(ProjectGlobalNetworkEndpointGroupName.newFactory()) + .setResourceNameField("networkEndpointGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser + .newBuilder() + .setResponseInstance( + NetworkEndpointGroupsListNetworkEndpoints.getDefaultInstance()) + .build()) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable< + AttachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + attachNetworkEndpointsGlobalNetworkEndpointGroupCallable; + private final UnaryCallable + deleteGlobalNetworkEndpointGroupCallable; + private final UnaryCallable< + DetachNetworkEndpointsGlobalNetworkEndpointGroupHttpRequest, Operation> + detachNetworkEndpointsGlobalNetworkEndpointGroupCallable; + private final UnaryCallable + getGlobalNetworkEndpointGroupCallable; + private final UnaryCallable + insertGlobalNetworkEndpointGroupCallable; + private final UnaryCallable + listGlobalNetworkEndpointGroupsCallable; + private final UnaryCallable< + ListGlobalNetworkEndpointGroupsHttpRequest, ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsPagedCallable; + private final UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsGlobalNetworkEndpointGroupsCallable; + private final UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable; + + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonGlobalNetworkEndpointGroupStub create( + GlobalNetworkEndpointGroupStubSettings settings) throws IOException { + return new HttpJsonGlobalNetworkEndpointGroupStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonGlobalNetworkEndpointGroupStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonGlobalNetworkEndpointGroupStub( + GlobalNetworkEndpointGroupStubSettings.newBuilder().build(), clientContext); + } + + public static final HttpJsonGlobalNetworkEndpointGroupStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonGlobalNetworkEndpointGroupStub( + GlobalNetworkEndpointGroupStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonGlobalNetworkEndpointGroupStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected HttpJsonGlobalNetworkEndpointGroupStub( + GlobalNetworkEndpointGroupStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonGlobalNetworkEndpointGroupCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonGlobalNetworkEndpointGroupStub, using the given settings. + * This is protected so that it is easy to make a subclass, but otherwise, the static factory + * methods should be preferred. + */ + protected HttpJsonGlobalNetworkEndpointGroupStub( + GlobalNetworkEndpointGroupStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + attachNetworkEndpointsGlobalNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor( + attachNetworkEndpointsGlobalNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + deleteGlobalNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(deleteGlobalNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + detachNetworkEndpointsGlobalNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor( + detachNetworkEndpointsGlobalNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + getGlobalNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getGlobalNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + insertGlobalNetworkEndpointGroupTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(insertGlobalNetworkEndpointGroupMethodDescriptor) + .build(); + HttpJsonCallSettings + listGlobalNetworkEndpointGroupsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listGlobalNetworkEndpointGroupsMethodDescriptor) + .build(); + HttpJsonCallSettings< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsGlobalNetworkEndpointGroupsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor( + listNetworkEndpointsGlobalNetworkEndpointGroupsMethodDescriptor) + .build(); + + this.attachNetworkEndpointsGlobalNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + attachNetworkEndpointsGlobalNetworkEndpointGroupTransportSettings, + settings.attachNetworkEndpointsGlobalNetworkEndpointGroupSettings(), + clientContext); + this.deleteGlobalNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + deleteGlobalNetworkEndpointGroupTransportSettings, + settings.deleteGlobalNetworkEndpointGroupSettings(), + clientContext); + this.detachNetworkEndpointsGlobalNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + detachNetworkEndpointsGlobalNetworkEndpointGroupTransportSettings, + settings.detachNetworkEndpointsGlobalNetworkEndpointGroupSettings(), + clientContext); + this.getGlobalNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + getGlobalNetworkEndpointGroupTransportSettings, + settings.getGlobalNetworkEndpointGroupSettings(), + clientContext); + this.insertGlobalNetworkEndpointGroupCallable = + callableFactory.createUnaryCallable( + insertGlobalNetworkEndpointGroupTransportSettings, + settings.insertGlobalNetworkEndpointGroupSettings(), + clientContext); + this.listGlobalNetworkEndpointGroupsCallable = + callableFactory.createUnaryCallable( + listGlobalNetworkEndpointGroupsTransportSettings, + settings.listGlobalNetworkEndpointGroupsSettings(), + clientContext); + this.listGlobalNetworkEndpointGroupsPagedCallable = + callableFactory.createPagedCallable( + listGlobalNetworkEndpointGroupsTransportSettings, + settings.listGlobalNetworkEndpointGroupsSettings(), + clientContext); + this.listNetworkEndpointsGlobalNetworkEndpointGroupsCallable = + callableFactory.createUnaryCallable( + listNetworkEndpointsGlobalNetworkEndpointGroupsTransportSettings, + settings.listNetworkEndpointsGlobalNetworkEndpointGroupsSettings(), + clientContext); + this.listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable = + callableFactory.createPagedCallable( + listNetworkEndpointsGlobalNetworkEndpointGroupsTransportSettings, + settings.listNetworkEndpointsGlobalNetworkEndpointGroupsSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @BetaApi + public UnaryCallable + attachNetworkEndpointsGlobalNetworkEndpointGroupCallable() { + return attachNetworkEndpointsGlobalNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + deleteGlobalNetworkEndpointGroupCallable() { + return deleteGlobalNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + detachNetworkEndpointsGlobalNetworkEndpointGroupCallable() { + return detachNetworkEndpointsGlobalNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + getGlobalNetworkEndpointGroupCallable() { + return getGlobalNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable + insertGlobalNetworkEndpointGroupCallable() { + return insertGlobalNetworkEndpointGroupCallable; + } + + @BetaApi + public UnaryCallable< + ListGlobalNetworkEndpointGroupsHttpRequest, ListGlobalNetworkEndpointGroupsPagedResponse> + listGlobalNetworkEndpointGroupsPagedCallable() { + return listGlobalNetworkEndpointGroupsPagedCallable; + } + + @BetaApi + public UnaryCallable + listGlobalNetworkEndpointGroupsCallable() { + return listGlobalNetworkEndpointGroupsCallable; + } + + @BetaApi + public UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse> + listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable() { + return listNetworkEndpointsGlobalNetworkEndpointGroupsPagedCallable; + } + + @BetaApi + public UnaryCallable< + ListNetworkEndpointsGlobalNetworkEndpointGroupsHttpRequest, + NetworkEndpointGroupsListNetworkEndpoints> + listNetworkEndpointsGlobalNetworkEndpointGroupsCallable() { + return listNetworkEndpointsGlobalNetworkEndpointGroupsCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalOperationStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalOperationStub.java index 28bbb75ba..67413a575 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalOperationStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonGlobalOperationStub.java @@ -68,7 +68,8 @@ public class HttpJsonGlobalOperationStub extends GlobalOperationStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/operations")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonHealthCheckStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonHealthCheckStub.java index c3a47ad1d..235638907 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonHealthCheckStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonHealthCheckStub.java @@ -70,7 +70,8 @@ public class HttpJsonHealthCheckStub extends HealthCheckStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/healthChecks")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceGroupManagerStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceGroupManagerStub.java index 7e4d3aca3..00a0aa6af 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceGroupManagerStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceGroupManagerStub.java @@ -16,6 +16,7 @@ package com.google.cloud.compute.v1.stub; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.AggregatedListInstanceGroupManagersPagedResponse; +import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListErrorsInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListInstanceGroupManagersPagedResponse; import com.google.api.client.http.HttpMethods; @@ -33,6 +34,7 @@ import com.google.api.pathtemplate.PathTemplate; import com.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.AggregatedListInstanceGroupManagersHttpRequest; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerHttpRequest; @@ -41,7 +43,9 @@ import com.google.cloud.compute.v1.InstanceGroupManager; import com.google.cloud.compute.v1.InstanceGroupManagerAggregatedList; import com.google.cloud.compute.v1.InstanceGroupManagerList; +import com.google.cloud.compute.v1.InstanceGroupManagersListErrorsResponse; import com.google.cloud.compute.v1.InstanceGroupManagersListManagedInstancesResponse; +import com.google.cloud.compute.v1.ListErrorsInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.Operation; @@ -106,7 +110,8 @@ public class HttpJsonInstanceGroupManagerStub extends InstanceGroupManagerStub { .setPathTemplate( PathTemplate.create("{project}/aggregated/instanceGroupManagers")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) @@ -116,6 +121,30 @@ public class HttpJsonInstanceGroupManagerStub extends InstanceGroupManagerStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor< + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesInstanceGroupManagerMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.instanceGroupManagers.applyUpdatesToInstances") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances")) + .setQueryParams(Sets.newHashSet()) + .setResourceNameFactory(ProjectZoneInstanceGroupManagerName.newFactory()) + .setResourceNameField("instanceGroupManager") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor createInstancesInstanceGroupManagerMethodDescriptor = @@ -247,6 +276,33 @@ public class HttpJsonInstanceGroupManagerStub extends InstanceGroupManagerStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor< + ListErrorsInstanceGroupManagersHttpRequest, InstanceGroupManagersListErrorsResponse> + listErrorsInstanceGroupManagersMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName("compute.instanceGroupManagers.listErrors") + .setHttpMethod(HttpMethods.GET) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors")) + .setQueryParams( + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + .setResourceNameFactory(ProjectZoneInstanceGroupManagerName.newFactory()) + .setResourceNameField("instanceGroupManager") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance( + InstanceGroupManagersListErrorsResponse.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor< ListManagedInstancesInstanceGroupManagersHttpRequest, @@ -265,7 +321,7 @@ public class HttpJsonInstanceGroupManagerStub extends InstanceGroupManagerStub { PathTemplate.create( "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "order_by", "pageToken")) + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectZoneInstanceGroupManagerName.newFactory()) .setResourceNameField("instanceGroupManager") .build()) @@ -400,6 +456,8 @@ public class HttpJsonInstanceGroupManagerStub extends InstanceGroupManagerStub { AggregatedListInstanceGroupManagersHttpRequest, AggregatedListInstanceGroupManagersPagedResponse> aggregatedListInstanceGroupManagersPagedCallable; + private final UnaryCallable + applyUpdatesToInstancesInstanceGroupManagerCallable; private final UnaryCallable createInstancesInstanceGroupManagerCallable; private final UnaryCallable @@ -415,6 +473,12 @@ public class HttpJsonInstanceGroupManagerStub extends InstanceGroupManagerStub { private final UnaryCallable< ListInstanceGroupManagersHttpRequest, ListInstanceGroupManagersPagedResponse> listInstanceGroupManagersPagedCallable; + private final UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, InstanceGroupManagersListErrorsResponse> + listErrorsInstanceGroupManagersCallable; + private final UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersPagedCallable; private final UnaryCallable< ListManagedInstancesInstanceGroupManagersHttpRequest, InstanceGroupManagersListManagedInstancesResponse> @@ -486,6 +550,12 @@ protected HttpJsonInstanceGroupManagerStub( newBuilder() .setMethodDescriptor(aggregatedListInstanceGroupManagersMethodDescriptor) .build(); + HttpJsonCallSettings + applyUpdatesToInstancesInstanceGroupManagerTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(applyUpdatesToInstancesInstanceGroupManagerMethodDescriptor) + .build(); HttpJsonCallSettings createInstancesInstanceGroupManagerTransportSettings = HttpJsonCallSettings @@ -520,6 +590,15 @@ protected HttpJsonInstanceGroupManagerStub( .newBuilder() .setMethodDescriptor(listInstanceGroupManagersMethodDescriptor) .build(); + HttpJsonCallSettings< + ListErrorsInstanceGroupManagersHttpRequest, InstanceGroupManagersListErrorsResponse> + listErrorsInstanceGroupManagersTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listErrorsInstanceGroupManagersMethodDescriptor) + .build(); HttpJsonCallSettings< ListManagedInstancesInstanceGroupManagersHttpRequest, InstanceGroupManagersListManagedInstancesResponse> @@ -574,6 +653,11 @@ protected HttpJsonInstanceGroupManagerStub( aggregatedListInstanceGroupManagersTransportSettings, settings.aggregatedListInstanceGroupManagersSettings(), clientContext); + this.applyUpdatesToInstancesInstanceGroupManagerCallable = + callableFactory.createUnaryCallable( + applyUpdatesToInstancesInstanceGroupManagerTransportSettings, + settings.applyUpdatesToInstancesInstanceGroupManagerSettings(), + clientContext); this.createInstancesInstanceGroupManagerCallable = callableFactory.createUnaryCallable( createInstancesInstanceGroupManagerTransportSettings, @@ -609,6 +693,16 @@ protected HttpJsonInstanceGroupManagerStub( listInstanceGroupManagersTransportSettings, settings.listInstanceGroupManagersSettings(), clientContext); + this.listErrorsInstanceGroupManagersCallable = + callableFactory.createUnaryCallable( + listErrorsInstanceGroupManagersTransportSettings, + settings.listErrorsInstanceGroupManagersSettings(), + clientContext); + this.listErrorsInstanceGroupManagersPagedCallable = + callableFactory.createPagedCallable( + listErrorsInstanceGroupManagersTransportSettings, + settings.listErrorsInstanceGroupManagersSettings(), + clientContext); this.listManagedInstancesInstanceGroupManagersCallable = callableFactory.createUnaryCallable( listManagedInstancesInstanceGroupManagersTransportSettings, @@ -664,6 +758,12 @@ protected HttpJsonInstanceGroupManagerStub( return aggregatedListInstanceGroupManagersCallable; } + @BetaApi + public UnaryCallable + applyUpdatesToInstancesInstanceGroupManagerCallable() { + return applyUpdatesToInstancesInstanceGroupManagerCallable; + } + @BetaApi public UnaryCallable createInstancesInstanceGroupManagerCallable() { @@ -706,6 +806,20 @@ protected HttpJsonInstanceGroupManagerStub( return listInstanceGroupManagersCallable; } + @BetaApi + public UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersPagedCallable() { + return listErrorsInstanceGroupManagersPagedCallable; + } + + @BetaApi + public UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, InstanceGroupManagersListErrorsResponse> + listErrorsInstanceGroupManagersCallable() { + return listErrorsInstanceGroupManagersCallable; + } + @BetaApi public UnaryCallable< ListManagedInstancesInstanceGroupManagersHttpRequest, diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceGroupStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceGroupStub.java index f87dc300f..5ffb97965 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceGroupStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceGroupStub.java @@ -97,7 +97,8 @@ public class HttpJsonInstanceGroupStub extends InstanceGroupStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/instanceGroups")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceStub.java index 062143b9b..794b7e1ad 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInstanceStub.java @@ -33,6 +33,7 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.api.pathtemplate.PathTemplate; import com.google.cloud.compute.v1.AddAccessConfigInstanceHttpRequest; +import com.google.cloud.compute.v1.AddResourcePoliciesInstanceHttpRequest; import com.google.cloud.compute.v1.AggregatedListInstancesHttpRequest; import com.google.cloud.compute.v1.AttachDiskInstanceHttpRequest; import com.google.cloud.compute.v1.DeleteAccessConfigInstanceHttpRequest; @@ -57,6 +58,7 @@ import com.google.cloud.compute.v1.ProjectZoneInstanceName; import com.google.cloud.compute.v1.ProjectZoneInstanceResourceName; import com.google.cloud.compute.v1.ProjectZoneName; +import com.google.cloud.compute.v1.RemoveResourcePoliciesInstanceHttpRequest; import com.google.cloud.compute.v1.ResetInstanceHttpRequest; import com.google.cloud.compute.v1.SerialPortOutput; import com.google.cloud.compute.v1.SetDeletionProtectionInstanceHttpRequest; @@ -80,6 +82,7 @@ import com.google.cloud.compute.v1.TestPermissionsResponse; import com.google.cloud.compute.v1.UpdateAccessConfigInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateDisplayDeviceInstanceHttpRequest; +import com.google.cloud.compute.v1.UpdateInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceHttpRequest; import com.google.common.collect.Sets; @@ -117,6 +120,28 @@ public class HttpJsonInstanceStub extends InstanceStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor + addResourcePoliciesInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.instances.addResourcePolicies") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/instances/{instance}/addResourcePolicies")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneInstanceName.newFactory()) + .setResourceNameField("instance") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor< AggregatedListInstancesHttpRequest, InstanceAggregatedList> @@ -129,7 +154,8 @@ public class HttpJsonInstanceStub extends InstanceStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/instances")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) @@ -394,6 +420,28 @@ public class HttpJsonInstanceStub extends InstanceStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor + removeResourcePoliciesInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.instances.removeResourcePolicies") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/zones/{zone}/instances/{instance}/removeResourcePolicies")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneInstanceName.newFactory()) + .setResourceNameField("instance") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor resetInstanceMethodDescriptor = @@ -779,6 +827,28 @@ public class HttpJsonInstanceStub extends InstanceStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor + updateInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.instances.update") + .setHttpMethod(HttpMethods.PUT) + .setRequestFormatter( + ApiMessageHttpRequestFormatter.newBuilder() + .setPathTemplate( + PathTemplate.create("{project}/zones/{zone}/instances/{instance}")) + .setQueryParams( + Sets.newHashSet( + "minimalAction", "mostDisruptiveAllowedAction", "requestId")) + .setResourceNameFactory(ProjectZoneInstanceName.newFactory()) + .setResourceNameField("instance") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor updateAccessConfigInstanceMethodDescriptor = @@ -872,6 +942,8 @@ public class HttpJsonInstanceStub extends InstanceStub { private final UnaryCallable addAccessConfigInstanceCallable; + private final UnaryCallable + addResourcePoliciesInstanceCallable; private final UnaryCallable aggregatedListInstancesCallable; private final UnaryCallable< @@ -900,6 +972,8 @@ public class HttpJsonInstanceStub extends InstanceStub { private final UnaryCallable< ListReferrersInstancesHttpRequest, ListReferrersInstancesPagedResponse> listReferrersInstancesPagedCallable; + private final UnaryCallable + removeResourcePoliciesInstanceCallable; private final UnaryCallable resetInstanceCallable; private final UnaryCallable setDeletionProtectionInstanceCallable; @@ -930,6 +1004,7 @@ public class HttpJsonInstanceStub extends InstanceStub { private final UnaryCallable stopInstanceCallable; private final UnaryCallable testIamPermissionsInstanceCallable; + private final UnaryCallable updateInstanceCallable; private final UnaryCallable updateAccessConfigInstanceCallable; private final UnaryCallable @@ -983,6 +1058,11 @@ protected HttpJsonInstanceStub( HttpJsonCallSettings.newBuilder() .setMethodDescriptor(addAccessConfigInstanceMethodDescriptor) .build(); + HttpJsonCallSettings + addResourcePoliciesInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(addResourcePoliciesInstanceMethodDescriptor) + .build(); HttpJsonCallSettings aggregatedListInstancesTransportSettings = HttpJsonCallSettings @@ -1050,6 +1130,11 @@ protected HttpJsonInstanceStub( .newBuilder() .setMethodDescriptor(listReferrersInstancesMethodDescriptor) .build(); + HttpJsonCallSettings + removeResourcePoliciesInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeResourcePoliciesInstanceMethodDescriptor) + .build(); HttpJsonCallSettings resetInstanceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(resetInstanceMethodDescriptor) @@ -1139,6 +1224,10 @@ protected HttpJsonInstanceStub( .newBuilder() .setMethodDescriptor(testIamPermissionsInstanceMethodDescriptor) .build(); + HttpJsonCallSettings updateInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateInstanceMethodDescriptor) + .build(); HttpJsonCallSettings updateAccessConfigInstanceTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1166,6 +1255,11 @@ protected HttpJsonInstanceStub( addAccessConfigInstanceTransportSettings, settings.addAccessConfigInstanceSettings(), clientContext); + this.addResourcePoliciesInstanceCallable = + callableFactory.createUnaryCallable( + addResourcePoliciesInstanceTransportSettings, + settings.addResourcePoliciesInstanceSettings(), + clientContext); this.aggregatedListInstancesCallable = callableFactory.createUnaryCallable( aggregatedListInstancesTransportSettings, @@ -1236,6 +1330,11 @@ protected HttpJsonInstanceStub( listReferrersInstancesTransportSettings, settings.listReferrersInstancesSettings(), clientContext); + this.removeResourcePoliciesInstanceCallable = + callableFactory.createUnaryCallable( + removeResourcePoliciesInstanceTransportSettings, + settings.removeResourcePoliciesInstanceSettings(), + clientContext); this.resetInstanceCallable = callableFactory.createUnaryCallable( resetInstanceTransportSettings, settings.resetInstanceSettings(), clientContext); @@ -1318,6 +1417,9 @@ protected HttpJsonInstanceStub( testIamPermissionsInstanceTransportSettings, settings.testIamPermissionsInstanceSettings(), clientContext); + this.updateInstanceCallable = + callableFactory.createUnaryCallable( + updateInstanceTransportSettings, settings.updateInstanceSettings(), clientContext); this.updateAccessConfigInstanceCallable = callableFactory.createUnaryCallable( updateAccessConfigInstanceTransportSettings, @@ -1348,6 +1450,12 @@ protected HttpJsonInstanceStub( return addAccessConfigInstanceCallable; } + @BetaApi + public UnaryCallable + addResourcePoliciesInstanceCallable() { + return addResourcePoliciesInstanceCallable; + } + @BetaApi public UnaryCallable aggregatedListInstancesPagedCallable() { @@ -1437,6 +1545,12 @@ public UnaryCallable listInstancesCallab return listReferrersInstancesCallable; } + @BetaApi + public UnaryCallable + removeResourcePoliciesInstanceCallable() { + return removeResourcePoliciesInstanceCallable; + } + @BetaApi public UnaryCallable resetInstanceCallable() { return resetInstanceCallable; @@ -1538,6 +1652,11 @@ public UnaryCallable stopInstanceCallable() return testIamPermissionsInstanceCallable; } + @BetaApi + public UnaryCallable updateInstanceCallable() { + return updateInstanceCallable; + } + @BetaApi public UnaryCallable updateAccessConfigInstanceCallable() { diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInterconnectAttachmentStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInterconnectAttachmentStub.java index 4b8a0bae5..1a7345ea9 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInterconnectAttachmentStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonInterconnectAttachmentStub.java @@ -74,7 +74,8 @@ public class HttpJsonInterconnectAttachmentStub extends InterconnectAttachmentSt .setPathTemplate( PathTemplate.create("{project}/aggregated/interconnectAttachments")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonMachineTypeStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonMachineTypeStub.java index 873a955e8..22b8e2f52 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonMachineTypeStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonMachineTypeStub.java @@ -66,7 +66,8 @@ public class HttpJsonMachineTypeStub extends MachineTypeStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/machineTypes")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupStub.java index 5d44a45cf..0a9d2f896 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNetworkEndpointGroupStub.java @@ -80,7 +80,8 @@ public class HttpJsonNetworkEndpointGroupStub extends NetworkEndpointGroupStub { .setPathTemplate( PathTemplate.create("{project}/aggregated/networkEndpointGroups")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupStub.java index d7bb3b341..4bf0541c8 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupStub.java @@ -46,6 +46,7 @@ import com.google.cloud.compute.v1.NodeGroupList; import com.google.cloud.compute.v1.NodeGroupsListNodes; import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNodeGroupHttpRequest; import com.google.cloud.compute.v1.Policy; import com.google.cloud.compute.v1.ProjectName; import com.google.cloud.compute.v1.ProjectZoneName; @@ -102,7 +103,8 @@ public class HttpJsonNodeGroupStub extends NodeGroupStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/nodeGroups")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) @@ -255,6 +257,26 @@ public class HttpJsonNodeGroupStub extends NodeGroupStub { .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor + patchNodeGroupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("compute.nodeGroups.patch") + .setHttpMethod(HttpMethods.PATCH) + .setRequestFormatter( + ApiMessageHttpRequestFormatter.newBuilder() + .setPathTemplate( + PathTemplate.create("{project}/zones/{zone}/nodeGroups/{nodeGroup}")) + .setQueryParams(Sets.newHashSet("requestId")) + .setResourceNameFactory(ProjectZoneNodeGroupName.newFactory()) + .setResourceNameField("nodeGroup") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor setIamPolicyNodeGroupMethodDescriptor = @@ -343,6 +365,7 @@ public class HttpJsonNodeGroupStub extends NodeGroupStub { listNodesNodeGroupsCallable; private final UnaryCallable listNodesNodeGroupsPagedCallable; + private final UnaryCallable patchNodeGroupCallable; private final UnaryCallable setIamPolicyNodeGroupCallable; private final UnaryCallable @@ -431,6 +454,10 @@ protected HttpJsonNodeGroupStub( HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listNodesNodeGroupsMethodDescriptor) .build(); + HttpJsonCallSettings patchNodeGroupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(patchNodeGroupMethodDescriptor) + .build(); HttpJsonCallSettings setIamPolicyNodeGroupTransportSettings = HttpJsonCallSettings.newBuilder() @@ -498,6 +525,9 @@ protected HttpJsonNodeGroupStub( listNodesNodeGroupsTransportSettings, settings.listNodesNodeGroupsSettings(), clientContext); + this.patchNodeGroupCallable = + callableFactory.createUnaryCallable( + patchNodeGroupTransportSettings, settings.patchNodeGroupSettings(), clientContext); this.setIamPolicyNodeGroupCallable = callableFactory.createUnaryCallable( setIamPolicyNodeGroupTransportSettings, @@ -582,6 +612,11 @@ public UnaryCallable listNodeGroupsCal return listNodesNodeGroupsCallable; } + @BetaApi + public UnaryCallable patchNodeGroupCallable() { + return patchNodeGroupCallable; + } + @BetaApi public UnaryCallable setIamPolicyNodeGroupCallable() { return setIamPolicyNodeGroupCallable; diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeTemplateStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeTemplateStub.java index cfb945fc7..077f6dbe1 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeTemplateStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeTemplateStub.java @@ -76,7 +76,8 @@ public class HttpJsonNodeTemplateStub extends NodeTemplateStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/nodeTemplates")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeTypeStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeTypeStub.java index 8348a7514..8ab771051 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeTypeStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeTypeStub.java @@ -66,7 +66,8 @@ public class HttpJsonNodeTypeStub extends NodeTypeStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/nodeTypes")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonPacketMirroringStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonPacketMirroringStub.java index 995763e06..53afa08c2 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonPacketMirroringStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonPacketMirroringStub.java @@ -75,7 +75,8 @@ public class HttpJsonPacketMirroringStub extends PacketMirroringStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/packetMirrorings")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonProjectStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonProjectStub.java index a035103c6..f7fae864e 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonProjectStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonProjectStub.java @@ -189,7 +189,7 @@ public class HttpJsonProjectStub extends ProjectStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/getXpnResources")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "order_by", "pageToken")) + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) @@ -209,7 +209,7 @@ public class HttpJsonProjectStub extends ProjectStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/listXpnHosts")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "order_by", "pageToken")) + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRegionCommitmentStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRegionCommitmentStub.java index bf00e6f99..6ca50799b 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRegionCommitmentStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRegionCommitmentStub.java @@ -69,7 +69,8 @@ public class HttpJsonRegionCommitmentStub extends RegionCommitmentStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/commitments")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRegionInstanceGroupManagerStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRegionInstanceGroupManagerStub.java index c05b0124d..5a6668ee6 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRegionInstanceGroupManagerStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRegionInstanceGroupManagerStub.java @@ -15,6 +15,7 @@ */ package com.google.cloud.compute.v1.stub; +import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListErrorsRegionInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListRegionInstanceGroupManagersPagedResponse; import com.google.api.client.http.HttpMethods; @@ -31,12 +32,14 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.api.pathtemplate.PathTemplate; import com.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerHttpRequest; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.GetRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.InsertRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.Operation; @@ -45,6 +48,7 @@ import com.google.cloud.compute.v1.ProjectRegionName; import com.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.RegionInstanceGroupManagerList; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersListErrorsResponse; import com.google.cloud.compute.v1.RegionInstanceGroupManagersListInstancesResponse; import com.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerHttpRequest; @@ -87,6 +91,30 @@ public class HttpJsonRegionInstanceGroupManagerStub extends RegionInstanceGroupM .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor< + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesRegionInstanceGroupManagerMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("compute.regionInstanceGroupManagers.applyUpdatesToInstances") + .setHttpMethod(HttpMethods.POST) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances")) + .setQueryParams(Sets.newHashSet()) + .setResourceNameFactory(ProjectRegionInstanceGroupManagerName.newFactory()) + .setResourceNameField("instanceGroupManager") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser.newBuilder() + .setResponseInstance(Operation.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor< CreateInstancesRegionInstanceGroupManagerHttpRequest, Operation> @@ -227,6 +255,36 @@ public class HttpJsonRegionInstanceGroupManagerStub extends RegionInstanceGroupM .build()) .build(); + @InternalApi + public static final ApiMethodDescriptor< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse> + listErrorsRegionInstanceGroupManagersMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName("compute.regionInstanceGroupManagers.listErrors") + .setHttpMethod(HttpMethods.GET) + .setRequestFormatter( + ApiMessageHttpRequestFormatter + .newBuilder() + .setPathTemplate( + PathTemplate.create( + "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors")) + .setQueryParams( + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + .setResourceNameFactory(ProjectRegionInstanceGroupManagerName.newFactory()) + .setResourceNameField("instanceGroupManager") + .build()) + .setResponseParser( + ApiMessageHttpResponseParser + .newBuilder() + .setResponseInstance( + RegionInstanceGroupManagersListErrorsResponse.getDefaultInstance()) + .build()) + .build(); + @InternalApi public static final ApiMethodDescriptor< ListManagedInstancesRegionInstanceGroupManagersHttpRequest, @@ -245,7 +303,7 @@ public class HttpJsonRegionInstanceGroupManagerStub extends RegionInstanceGroupM PathTemplate.create( "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "order_by", "pageToken")) + Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectRegionInstanceGroupManagerName.newFactory()) .setResourceNameField("instanceGroupManager") .build()) @@ -377,6 +435,9 @@ public class HttpJsonRegionInstanceGroupManagerStub extends RegionInstanceGroupM private final UnaryCallable abandonInstancesRegionInstanceGroupManagerCallable; + private final UnaryCallable< + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesRegionInstanceGroupManagerCallable; private final UnaryCallable createInstancesRegionInstanceGroupManagerCallable; private final UnaryCallable @@ -393,6 +454,14 @@ public class HttpJsonRegionInstanceGroupManagerStub extends RegionInstanceGroupM private final UnaryCallable< ListRegionInstanceGroupManagersHttpRequest, ListRegionInstanceGroupManagersPagedResponse> listRegionInstanceGroupManagersPagedCallable; + private final UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse> + listErrorsRegionInstanceGroupManagersCallable; + private final UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersPagedCallable; private final UnaryCallable< ListManagedInstancesRegionInstanceGroupManagersHttpRequest, RegionInstanceGroupManagersListInstancesResponse> @@ -458,6 +527,14 @@ protected HttpJsonRegionInstanceGroupManagerStub( .newBuilder() .setMethodDescriptor(abandonInstancesRegionInstanceGroupManagerMethodDescriptor) .build(); + HttpJsonCallSettings + applyUpdatesToInstancesRegionInstanceGroupManagerTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor( + applyUpdatesToInstancesRegionInstanceGroupManagerMethodDescriptor) + .build(); HttpJsonCallSettings createInstancesRegionInstanceGroupManagerTransportSettings = HttpJsonCallSettings @@ -495,6 +572,16 @@ protected HttpJsonRegionInstanceGroupManagerStub( newBuilder() .setMethodDescriptor(listRegionInstanceGroupManagersMethodDescriptor) .build(); + HttpJsonCallSettings< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse> + listErrorsRegionInstanceGroupManagersTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listErrorsRegionInstanceGroupManagersMethodDescriptor) + .build(); HttpJsonCallSettings< ListManagedInstancesRegionInstanceGroupManagersHttpRequest, RegionInstanceGroupManagersListInstancesResponse> @@ -541,6 +628,11 @@ protected HttpJsonRegionInstanceGroupManagerStub( abandonInstancesRegionInstanceGroupManagerTransportSettings, settings.abandonInstancesRegionInstanceGroupManagerSettings(), clientContext); + this.applyUpdatesToInstancesRegionInstanceGroupManagerCallable = + callableFactory.createUnaryCallable( + applyUpdatesToInstancesRegionInstanceGroupManagerTransportSettings, + settings.applyUpdatesToInstancesRegionInstanceGroupManagerSettings(), + clientContext); this.createInstancesRegionInstanceGroupManagerCallable = callableFactory.createUnaryCallable( createInstancesRegionInstanceGroupManagerTransportSettings, @@ -576,6 +668,16 @@ protected HttpJsonRegionInstanceGroupManagerStub( listRegionInstanceGroupManagersTransportSettings, settings.listRegionInstanceGroupManagersSettings(), clientContext); + this.listErrorsRegionInstanceGroupManagersCallable = + callableFactory.createUnaryCallable( + listErrorsRegionInstanceGroupManagersTransportSettings, + settings.listErrorsRegionInstanceGroupManagersSettings(), + clientContext); + this.listErrorsRegionInstanceGroupManagersPagedCallable = + callableFactory.createPagedCallable( + listErrorsRegionInstanceGroupManagersTransportSettings, + settings.listErrorsRegionInstanceGroupManagersSettings(), + clientContext); this.listManagedInstancesRegionInstanceGroupManagersCallable = callableFactory.createUnaryCallable( listManagedInstancesRegionInstanceGroupManagersTransportSettings, @@ -616,6 +718,12 @@ protected HttpJsonRegionInstanceGroupManagerStub( return abandonInstancesRegionInstanceGroupManagerCallable; } + @BetaApi + public UnaryCallable + applyUpdatesToInstancesRegionInstanceGroupManagerCallable() { + return applyUpdatesToInstancesRegionInstanceGroupManagerCallable; + } + @BetaApi public UnaryCallable createInstancesRegionInstanceGroupManagerCallable() { @@ -659,6 +767,22 @@ protected HttpJsonRegionInstanceGroupManagerStub( return listRegionInstanceGroupManagersCallable; } + @BetaApi + public UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersPagedCallable() { + return listErrorsRegionInstanceGroupManagersPagedCallable; + } + + @BetaApi + public UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse> + listErrorsRegionInstanceGroupManagersCallable() { + return listErrorsRegionInstanceGroupManagersCallable; + } + @BetaApi public UnaryCallable< ListManagedInstancesRegionInstanceGroupManagersHttpRequest, diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonReservationStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonReservationStub.java index 0d7a9d724..a8119d70f 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonReservationStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonReservationStub.java @@ -76,7 +76,8 @@ public class HttpJsonReservationStub extends ReservationStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/reservations")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonResourcePolicyStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonResourcePolicyStub.java index 60c31011d..b491374cc 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonResourcePolicyStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonResourcePolicyStub.java @@ -76,7 +76,8 @@ public class HttpJsonResourcePolicyStub extends ResourcePolicyStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/resourcePolicies")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRouterStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRouterStub.java index cf254548e..fc1bd0cfd 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRouterStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonRouterStub.java @@ -76,7 +76,8 @@ public class HttpJsonRouterStub extends RouterStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/routers")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonSslCertificateStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonSslCertificateStub.java index f7b33a810..b07f5409d 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonSslCertificateStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonSslCertificateStub.java @@ -69,7 +69,8 @@ public class HttpJsonSslCertificateStub extends SslCertificateStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/sslCertificates")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonSubnetworkStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonSubnetworkStub.java index ae9555c11..28ba4cc2c 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonSubnetworkStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonSubnetworkStub.java @@ -81,7 +81,8 @@ public class HttpJsonSubnetworkStub extends SubnetworkStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/subnetworks")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetHttpProxyStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetHttpProxyStub.java index 06368a79c..c984148a3 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetHttpProxyStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetHttpProxyStub.java @@ -73,7 +73,8 @@ public class HttpJsonTargetHttpProxyStub extends TargetHttpProxyStub { .setPathTemplate( PathTemplate.create("{project}/aggregated/targetHttpProxies")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetHttpsProxyStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetHttpsProxyStub.java index f68b5663c..2dacc0ff2 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetHttpsProxyStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetHttpsProxyStub.java @@ -76,7 +76,8 @@ public class HttpJsonTargetHttpsProxyStub extends TargetHttpsProxyStub { .setPathTemplate( PathTemplate.create("{project}/aggregated/targetHttpsProxies")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetInstanceStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetInstanceStub.java index a7b1363c8..3170a993e 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetInstanceStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetInstanceStub.java @@ -70,7 +70,8 @@ public class HttpJsonTargetInstanceStub extends TargetInstanceStub { .newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/targetInstances")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetPoolStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetPoolStub.java index 204cf2005..e29ab51c5 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetPoolStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetPoolStub.java @@ -118,7 +118,8 @@ public class HttpJsonTargetPoolStub extends TargetPoolStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/targetPools")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetVpnGatewayStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetVpnGatewayStub.java index 1ea51c19e..86c0fd0ff 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetVpnGatewayStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonTargetVpnGatewayStub.java @@ -72,7 +72,8 @@ public class HttpJsonTargetVpnGatewayStub extends TargetVpnGatewayStub { .setPathTemplate( PathTemplate.create("{project}/aggregated/targetVpnGateways")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonUrlMapStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonUrlMapStub.java index dc02ce23c..517f94b7d 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonUrlMapStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonUrlMapStub.java @@ -71,7 +71,8 @@ public class HttpJsonUrlMapStub extends UrlMapStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/urlMaps")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonVpnGatewayStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonVpnGatewayStub.java index ba3e0ac58..d5b3fd59d 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonVpnGatewayStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonVpnGatewayStub.java @@ -75,7 +75,8 @@ public class HttpJsonVpnGatewayStub extends VpnGatewayStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/vpnGateways")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonVpnTunnelStub.java b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonVpnTunnelStub.java index 85174d01a..d37b80fdc 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonVpnTunnelStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonVpnTunnelStub.java @@ -69,7 +69,8 @@ public class HttpJsonVpnTunnelStub extends VpnTunnelStub { ApiMessageHttpRequestFormatter.newBuilder() .setPathTemplate(PathTemplate.create("{project}/aggregated/vpnTunnels")) .setQueryParams( - Sets.newHashSet("filter", "maxResults", "orderBy", "pageToken")) + Sets.newHashSet( + "filter", "includeAllScopes", "maxResults", "orderBy", "pageToken")) .setResourceNameFactory(ProjectName.newFactory()) .setResourceNameField("project") .build()) diff --git a/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStub.java b/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStub.java index 710fc7db6..5bdc6912a 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStub.java @@ -16,6 +16,7 @@ package com.google.cloud.compute.v1.stub; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.AggregatedListInstanceGroupManagersPagedResponse; +import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListErrorsInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListInstanceGroupManagersPagedResponse; import com.google.api.core.BetaApi; @@ -23,6 +24,7 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.AggregatedListInstanceGroupManagersHttpRequest; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerHttpRequest; @@ -31,7 +33,9 @@ import com.google.cloud.compute.v1.InstanceGroupManager; import com.google.cloud.compute.v1.InstanceGroupManagerAggregatedList; import com.google.cloud.compute.v1.InstanceGroupManagerList; +import com.google.cloud.compute.v1.InstanceGroupManagersListErrorsResponse; import com.google.cloud.compute.v1.InstanceGroupManagersListManagedInstancesResponse; +import com.google.cloud.compute.v1.ListErrorsInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.Operation; @@ -76,6 +80,13 @@ public abstract class InstanceGroupManagerStub implements BackgroundResource { "Not implemented: aggregatedListInstanceGroupManagersCallable()"); } + @BetaApi + public UnaryCallable + applyUpdatesToInstancesInstanceGroupManagerCallable() { + throw new UnsupportedOperationException( + "Not implemented: applyUpdatesToInstancesInstanceGroupManagerCallable()"); + } + @BetaApi public UnaryCallable createInstancesInstanceGroupManagerCallable() { @@ -123,6 +134,22 @@ public abstract class InstanceGroupManagerStub implements BackgroundResource { throw new UnsupportedOperationException("Not implemented: listInstanceGroupManagersCallable()"); } + @BetaApi + public UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listErrorsInstanceGroupManagersPagedCallable()"); + } + + @BetaApi + public UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, InstanceGroupManagersListErrorsResponse> + listErrorsInstanceGroupManagersCallable() { + throw new UnsupportedOperationException( + "Not implemented: listErrorsInstanceGroupManagersCallable()"); + } + @BetaApi public UnaryCallable< ListManagedInstancesInstanceGroupManagersHttpRequest, diff --git a/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStubSettings.java b/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStubSettings.java index 2b3d8355a..84218fb0b 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStubSettings.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/InstanceGroupManagerStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.compute.v1.stub; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.AggregatedListInstanceGroupManagersPagedResponse; +import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListErrorsInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListInstanceGroupManagersPagedResponse; import com.google.api.core.ApiFunction; @@ -42,6 +43,7 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.AggregatedListInstanceGroupManagersHttpRequest; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerHttpRequest; @@ -50,8 +52,11 @@ import com.google.cloud.compute.v1.InstanceGroupManager; import com.google.cloud.compute.v1.InstanceGroupManagerAggregatedList; import com.google.cloud.compute.v1.InstanceGroupManagerList; +import com.google.cloud.compute.v1.InstanceGroupManagersListErrorsResponse; import com.google.cloud.compute.v1.InstanceGroupManagersListManagedInstancesResponse; import com.google.cloud.compute.v1.InstanceGroupManagersScopedList; +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.ListErrorsInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.Operation; @@ -123,6 +128,8 @@ public class InstanceGroupManagerStubSettings InstanceGroupManagerAggregatedList, AggregatedListInstanceGroupManagersPagedResponse> aggregatedListInstanceGroupManagersSettings; + private final UnaryCallSettings + applyUpdatesToInstancesInstanceGroupManagerSettings; private final UnaryCallSettings createInstancesInstanceGroupManagerSettings; private final UnaryCallSettings @@ -138,6 +145,11 @@ public class InstanceGroupManagerStubSettings InstanceGroupManagerList, ListInstanceGroupManagersPagedResponse> listInstanceGroupManagersSettings; + private final PagedCallSettings< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersSettings; private final UnaryCallSettings< ListManagedInstancesInstanceGroupManagersHttpRequest, InstanceGroupManagersListManagedInstancesResponse> @@ -170,6 +182,15 @@ public class InstanceGroupManagerStubSettings return aggregatedListInstanceGroupManagersSettings; } + /** + * Returns the object with the settings used for calls to + * applyUpdatesToInstancesInstanceGroupManager. + */ + public UnaryCallSettings + applyUpdatesToInstancesInstanceGroupManagerSettings() { + return applyUpdatesToInstancesInstanceGroupManagerSettings; + } + /** Returns the object with the settings used for calls to createInstancesInstanceGroupManager. */ public UnaryCallSettings createInstancesInstanceGroupManagerSettings() { @@ -209,6 +230,15 @@ public class InstanceGroupManagerStubSettings return listInstanceGroupManagersSettings; } + /** Returns the object with the settings used for calls to listErrorsInstanceGroupManagers. */ + public PagedCallSettings< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersSettings() { + return listErrorsInstanceGroupManagersSettings; + } + /** * Returns the object with the settings used for calls to * listManagedInstancesInstanceGroupManagers. @@ -333,6 +363,8 @@ protected InstanceGroupManagerStubSettings(Builder settingsBuilder) throws IOExc settingsBuilder.abandonInstancesInstanceGroupManagerSettings().build(); aggregatedListInstanceGroupManagersSettings = settingsBuilder.aggregatedListInstanceGroupManagersSettings().build(); + applyUpdatesToInstancesInstanceGroupManagerSettings = + settingsBuilder.applyUpdatesToInstancesInstanceGroupManagerSettings().build(); createInstancesInstanceGroupManagerSettings = settingsBuilder.createInstancesInstanceGroupManagerSettings().build(); deleteInstanceGroupManagerSettings = @@ -343,6 +375,8 @@ protected InstanceGroupManagerStubSettings(Builder settingsBuilder) throws IOExc insertInstanceGroupManagerSettings = settingsBuilder.insertInstanceGroupManagerSettings().build(); listInstanceGroupManagersSettings = settingsBuilder.listInstanceGroupManagersSettings().build(); + listErrorsInstanceGroupManagersSettings = + settingsBuilder.listErrorsInstanceGroupManagersSettings().build(); listManagedInstancesInstanceGroupManagersSettings = settingsBuilder.listManagedInstancesInstanceGroupManagersSettings().build(); patchInstanceGroupManagerSettings = settingsBuilder.patchInstanceGroupManagerSettings().build(); @@ -452,6 +486,55 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + LIST_ERRORS_INSTANCE_GROUP_MANAGERS_PAGE_STR_DESC = + new PagedListDescriptor< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListErrorsInstanceGroupManagersHttpRequest injectToken( + ListErrorsInstanceGroupManagersHttpRequest payload, String token) { + return ListErrorsInstanceGroupManagersHttpRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListErrorsInstanceGroupManagersHttpRequest injectPageSize( + ListErrorsInstanceGroupManagersHttpRequest payload, int pageSize) { + return ListErrorsInstanceGroupManagersHttpRequest.newBuilder(payload) + .setMaxResults(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListErrorsInstanceGroupManagersHttpRequest payload) { + return payload.getMaxResults(); + } + + @Override + public String extractNextToken(InstanceGroupManagersListErrorsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + InstanceGroupManagersListErrorsResponse payload) { + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); + } + }; + private static final PagedListResponseFactory< AggregatedListInstanceGroupManagersHttpRequest, InstanceGroupManagerAggregatedList, @@ -514,6 +597,39 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + ListErrorsInstanceGroupManagersPagedResponse> + LIST_ERRORS_INSTANCE_GROUP_MANAGERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + ListErrorsInstanceGroupManagersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse> + callable, + ListErrorsInstanceGroupManagersHttpRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + pageContext = + PageContext.create( + callable, + LIST_ERRORS_INSTANCE_GROUP_MANAGERS_PAGE_STR_DESC, + request, + context); + return ListErrorsInstanceGroupManagersPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + /** Builder for InstanceGroupManagerStubSettings. */ public static class Builder extends StubSettings.Builder { @@ -527,6 +643,9 @@ public static class Builder InstanceGroupManagerAggregatedList, AggregatedListInstanceGroupManagersPagedResponse> aggregatedListInstanceGroupManagersSettings; + private final UnaryCallSettings.Builder< + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesInstanceGroupManagerSettings; private final UnaryCallSettings.Builder< CreateInstancesInstanceGroupManagerHttpRequest, Operation> createInstancesInstanceGroupManagerSettings; @@ -545,6 +664,11 @@ public static class Builder InstanceGroupManagerList, ListInstanceGroupManagersPagedResponse> listInstanceGroupManagersSettings; + private final PagedCallSettings.Builder< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersSettings; private final UnaryCallSettings.Builder< ListManagedInstancesInstanceGroupManagersHttpRequest, InstanceGroupManagersListManagedInstancesResponse> @@ -610,6 +734,9 @@ protected Builder(ClientContext clientContext) { aggregatedListInstanceGroupManagersSettings = PagedCallSettings.newBuilder(AGGREGATED_LIST_INSTANCE_GROUP_MANAGERS_PAGE_STR_FACT); + applyUpdatesToInstancesInstanceGroupManagerSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstancesInstanceGroupManagerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteInstanceGroupManagerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -623,6 +750,9 @@ protected Builder(ClientContext clientContext) { listInstanceGroupManagersSettings = PagedCallSettings.newBuilder(LIST_INSTANCE_GROUP_MANAGERS_PAGE_STR_FACT); + listErrorsInstanceGroupManagersSettings = + PagedCallSettings.newBuilder(LIST_ERRORS_INSTANCE_GROUP_MANAGERS_PAGE_STR_FACT); + listManagedInstancesInstanceGroupManagersSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -642,12 +772,14 @@ protected Builder(ClientContext clientContext) { ImmutableList.>of( abandonInstancesInstanceGroupManagerSettings, aggregatedListInstanceGroupManagersSettings, + applyUpdatesToInstancesInstanceGroupManagerSettings, createInstancesInstanceGroupManagerSettings, deleteInstanceGroupManagerSettings, deleteInstancesInstanceGroupManagerSettings, getInstanceGroupManagerSettings, insertInstanceGroupManagerSettings, listInstanceGroupManagersSettings, + listErrorsInstanceGroupManagersSettings, listManagedInstancesInstanceGroupManagersSettings, patchInstanceGroupManagerSettings, recreateInstancesInstanceGroupManagerSettings, @@ -679,6 +811,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .applyUpdatesToInstancesInstanceGroupManagerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .createInstancesInstanceGroupManagerSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -709,6 +846,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .listErrorsInstanceGroupManagersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .listManagedInstancesInstanceGroupManagersSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -749,6 +891,8 @@ protected Builder(InstanceGroupManagerStubSettings settings) { settings.abandonInstancesInstanceGroupManagerSettings.toBuilder(); aggregatedListInstanceGroupManagersSettings = settings.aggregatedListInstanceGroupManagersSettings.toBuilder(); + applyUpdatesToInstancesInstanceGroupManagerSettings = + settings.applyUpdatesToInstancesInstanceGroupManagerSettings.toBuilder(); createInstancesInstanceGroupManagerSettings = settings.createInstancesInstanceGroupManagerSettings.toBuilder(); deleteInstanceGroupManagerSettings = settings.deleteInstanceGroupManagerSettings.toBuilder(); @@ -757,6 +901,8 @@ protected Builder(InstanceGroupManagerStubSettings settings) { getInstanceGroupManagerSettings = settings.getInstanceGroupManagerSettings.toBuilder(); insertInstanceGroupManagerSettings = settings.insertInstanceGroupManagerSettings.toBuilder(); listInstanceGroupManagersSettings = settings.listInstanceGroupManagersSettings.toBuilder(); + listErrorsInstanceGroupManagersSettings = + settings.listErrorsInstanceGroupManagersSettings.toBuilder(); listManagedInstancesInstanceGroupManagersSettings = settings.listManagedInstancesInstanceGroupManagersSettings.toBuilder(); patchInstanceGroupManagerSettings = settings.patchInstanceGroupManagerSettings.toBuilder(); @@ -772,12 +918,14 @@ protected Builder(InstanceGroupManagerStubSettings settings) { ImmutableList.>of( abandonInstancesInstanceGroupManagerSettings, aggregatedListInstanceGroupManagersSettings, + applyUpdatesToInstancesInstanceGroupManagerSettings, createInstancesInstanceGroupManagerSettings, deleteInstanceGroupManagerSettings, deleteInstancesInstanceGroupManagerSettings, getInstanceGroupManagerSettings, insertInstanceGroupManagerSettings, listInstanceGroupManagersSettings, + listErrorsInstanceGroupManagersSettings, listManagedInstancesInstanceGroupManagersSettings, patchInstanceGroupManagerSettings, recreateInstancesInstanceGroupManagerSettings, @@ -821,6 +969,16 @@ public Builder applyToAllUnaryMethods( return aggregatedListInstanceGroupManagersSettings; } + /** + * Returns the builder for the settings used for calls to + * applyUpdatesToInstancesInstanceGroupManager. + */ + public UnaryCallSettings.Builder< + ApplyUpdatesToInstancesInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesInstanceGroupManagerSettings() { + return applyUpdatesToInstancesInstanceGroupManagerSettings; + } + /** * Returns the builder for the settings used for calls to createInstancesInstanceGroupManager. */ @@ -864,6 +1022,15 @@ public Builder applyToAllUnaryMethods( return listInstanceGroupManagersSettings; } + /** Returns the builder for the settings used for calls to listErrorsInstanceGroupManagers. */ + public PagedCallSettings.Builder< + ListErrorsInstanceGroupManagersHttpRequest, + InstanceGroupManagersListErrorsResponse, + ListErrorsInstanceGroupManagersPagedResponse> + listErrorsInstanceGroupManagersSettings() { + return listErrorsInstanceGroupManagersSettings; + } + /** * Returns the builder for the settings used for calls to * listManagedInstancesInstanceGroupManagers. diff --git a/src/main/java/com/google/cloud/compute/v1/stub/InstanceStub.java b/src/main/java/com/google/cloud/compute/v1/stub/InstanceStub.java index 6b2e091e9..c04a63646 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/InstanceStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/InstanceStub.java @@ -23,6 +23,7 @@ import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.compute.v1.AddAccessConfigInstanceHttpRequest; +import com.google.cloud.compute.v1.AddResourcePoliciesInstanceHttpRequest; import com.google.cloud.compute.v1.AggregatedListInstancesHttpRequest; import com.google.cloud.compute.v1.AttachDiskInstanceHttpRequest; import com.google.cloud.compute.v1.DeleteAccessConfigInstanceHttpRequest; @@ -43,6 +44,7 @@ import com.google.cloud.compute.v1.ListReferrersInstancesHttpRequest; import com.google.cloud.compute.v1.Operation; import com.google.cloud.compute.v1.Policy; +import com.google.cloud.compute.v1.RemoveResourcePoliciesInstanceHttpRequest; import com.google.cloud.compute.v1.ResetInstanceHttpRequest; import com.google.cloud.compute.v1.SerialPortOutput; import com.google.cloud.compute.v1.SetDeletionProtectionInstanceHttpRequest; @@ -66,6 +68,7 @@ import com.google.cloud.compute.v1.TestPermissionsResponse; import com.google.cloud.compute.v1.UpdateAccessConfigInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateDisplayDeviceInstanceHttpRequest; +import com.google.cloud.compute.v1.UpdateInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceHttpRequest; import javax.annotation.Generated; @@ -86,6 +89,13 @@ public abstract class InstanceStub implements BackgroundResource { throw new UnsupportedOperationException("Not implemented: addAccessConfigInstanceCallable()"); } + @BetaApi + public UnaryCallable + addResourcePoliciesInstanceCallable() { + throw new UnsupportedOperationException( + "Not implemented: addResourcePoliciesInstanceCallable()"); + } + @BetaApi public UnaryCallable aggregatedListInstancesPagedCallable() { @@ -181,6 +191,13 @@ public UnaryCallable listInstancesCallab throw new UnsupportedOperationException("Not implemented: listReferrersInstancesCallable()"); } + @BetaApi + public UnaryCallable + removeResourcePoliciesInstanceCallable() { + throw new UnsupportedOperationException( + "Not implemented: removeResourcePoliciesInstanceCallable()"); + } + @BetaApi public UnaryCallable resetInstanceCallable() { throw new UnsupportedOperationException("Not implemented: resetInstanceCallable()"); @@ -288,6 +305,11 @@ public UnaryCallable stopInstanceCallable() "Not implemented: testIamPermissionsInstanceCallable()"); } + @BetaApi + public UnaryCallable updateInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstanceCallable()"); + } + @BetaApi public UnaryCallable updateAccessConfigInstanceCallable() { diff --git a/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java b/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java index edfe04642..dd000cacf 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/InstanceStubSettings.java @@ -42,6 +42,7 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.compute.v1.AddAccessConfigInstanceHttpRequest; +import com.google.cloud.compute.v1.AddResourcePoliciesInstanceHttpRequest; import com.google.cloud.compute.v1.AggregatedListInstancesHttpRequest; import com.google.cloud.compute.v1.AttachDiskInstanceHttpRequest; import com.google.cloud.compute.v1.DeleteAccessConfigInstanceHttpRequest; @@ -64,6 +65,7 @@ import com.google.cloud.compute.v1.Operation; import com.google.cloud.compute.v1.Policy; import com.google.cloud.compute.v1.Reference; +import com.google.cloud.compute.v1.RemoveResourcePoliciesInstanceHttpRequest; import com.google.cloud.compute.v1.ResetInstanceHttpRequest; import com.google.cloud.compute.v1.SerialPortOutput; import com.google.cloud.compute.v1.SetDeletionProtectionInstanceHttpRequest; @@ -87,6 +89,7 @@ import com.google.cloud.compute.v1.TestPermissionsResponse; import com.google.cloud.compute.v1.UpdateAccessConfigInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateDisplayDeviceInstanceHttpRequest; +import com.google.cloud.compute.v1.UpdateInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceHttpRequest; import com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceHttpRequest; import com.google.common.collect.ImmutableList; @@ -146,6 +149,8 @@ public class InstanceStubSettings extends StubSettings { private final UnaryCallSettings addAccessConfigInstanceSettings; + private final UnaryCallSettings + addResourcePoliciesInstanceSettings; private final PagedCallSettings< AggregatedListInstancesHttpRequest, InstanceAggregatedList, @@ -177,6 +182,8 @@ public class InstanceStubSettings extends StubSettings { InstanceListReferrers, ListReferrersInstancesPagedResponse> listReferrersInstancesSettings; + private final UnaryCallSettings + removeResourcePoliciesInstanceSettings; private final UnaryCallSettings resetInstanceSettings; private final UnaryCallSettings setDeletionProtectionInstanceSettings; @@ -209,6 +216,7 @@ public class InstanceStubSettings extends StubSettings { private final UnaryCallSettings stopInstanceSettings; private final UnaryCallSettings testIamPermissionsInstanceSettings; + private final UnaryCallSettings updateInstanceSettings; private final UnaryCallSettings updateAccessConfigInstanceSettings; private final UnaryCallSettings @@ -224,6 +232,12 @@ public class InstanceStubSettings extends StubSettings { return addAccessConfigInstanceSettings; } + /** Returns the object with the settings used for calls to addResourcePoliciesInstance. */ + public UnaryCallSettings + addResourcePoliciesInstanceSettings() { + return addResourcePoliciesInstanceSettings; + } + /** Returns the object with the settings used for calls to aggregatedListInstances. */ public PagedCallSettings< AggregatedListInstancesHttpRequest, @@ -302,6 +316,12 @@ public UnaryCallSettings insertInstanceSet return listReferrersInstancesSettings; } + /** Returns the object with the settings used for calls to removeResourcePoliciesInstance. */ + public UnaryCallSettings + removeResourcePoliciesInstanceSettings() { + return removeResourcePoliciesInstanceSettings; + } + /** Returns the object with the settings used for calls to resetInstance. */ public UnaryCallSettings resetInstanceSettings() { return resetInstanceSettings; @@ -407,6 +427,11 @@ public UnaryCallSettings stopInstanceSetting return testIamPermissionsInstanceSettings; } + /** Returns the object with the settings used for calls to updateInstance. */ + public UnaryCallSettings updateInstanceSettings() { + return updateInstanceSettings; + } + /** Returns the object with the settings used for calls to updateAccessConfigInstance. */ public UnaryCallSettings updateAccessConfigInstanceSettings() { @@ -508,6 +533,8 @@ protected InstanceStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); addAccessConfigInstanceSettings = settingsBuilder.addAccessConfigInstanceSettings().build(); + addResourcePoliciesInstanceSettings = + settingsBuilder.addResourcePoliciesInstanceSettings().build(); aggregatedListInstancesSettings = settingsBuilder.aggregatedListInstancesSettings().build(); attachDiskInstanceSettings = settingsBuilder.attachDiskInstanceSettings().build(); deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); @@ -525,6 +552,8 @@ protected InstanceStubSettings(Builder settingsBuilder) throws IOException { insertInstanceSettings = settingsBuilder.insertInstanceSettings().build(); listInstancesSettings = settingsBuilder.listInstancesSettings().build(); listReferrersInstancesSettings = settingsBuilder.listReferrersInstancesSettings().build(); + removeResourcePoliciesInstanceSettings = + settingsBuilder.removeResourcePoliciesInstanceSettings().build(); resetInstanceSettings = settingsBuilder.resetInstanceSettings().build(); setDeletionProtectionInstanceSettings = settingsBuilder.setDeletionProtectionInstanceSettings().build(); @@ -549,6 +578,7 @@ protected InstanceStubSettings(Builder settingsBuilder) throws IOException { stopInstanceSettings = settingsBuilder.stopInstanceSettings().build(); testIamPermissionsInstanceSettings = settingsBuilder.testIamPermissionsInstanceSettings().build(); + updateInstanceSettings = settingsBuilder.updateInstanceSettings().build(); updateAccessConfigInstanceSettings = settingsBuilder.updateAccessConfigInstanceSettings().build(); updateDisplayDeviceInstanceSettings = @@ -757,6 +787,8 @@ public static class Builder extends StubSettings.Builder addAccessConfigInstanceSettings; + private final UnaryCallSettings.Builder + addResourcePoliciesInstanceSettings; private final PagedCallSettings.Builder< AggregatedListInstancesHttpRequest, InstanceAggregatedList, @@ -791,6 +823,8 @@ public static class Builder extends StubSettings.Builder listReferrersInstancesSettings; + private final UnaryCallSettings.Builder + removeResourcePoliciesInstanceSettings; private final UnaryCallSettings.Builder resetInstanceSettings; private final UnaryCallSettings.Builder @@ -829,6 +863,8 @@ public static class Builder extends StubSettings.Builder testIamPermissionsInstanceSettings; + private final UnaryCallSettings.Builder + updateInstanceSettings; private final UnaryCallSettings.Builder updateAccessConfigInstanceSettings; private final UnaryCallSettings.Builder @@ -882,6 +918,8 @@ protected Builder(ClientContext clientContext) { addAccessConfigInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + addResourcePoliciesInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + aggregatedListInstancesSettings = PagedCallSettings.newBuilder(AGGREGATED_LIST_INSTANCES_PAGE_STR_FACT); @@ -910,6 +948,8 @@ protected Builder(ClientContext clientContext) { listReferrersInstancesSettings = PagedCallSettings.newBuilder(LIST_REFERRERS_INSTANCES_PAGE_STR_FACT); + removeResourcePoliciesInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resetInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setDeletionProtectionInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -947,6 +987,8 @@ protected Builder(ClientContext clientContext) { testIamPermissionsInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAccessConfigInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateDisplayDeviceInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -959,6 +1001,7 @@ protected Builder(ClientContext clientContext) { unaryMethodSettingsBuilders = ImmutableList.>of( addAccessConfigInstanceSettings, + addResourcePoliciesInstanceSettings, aggregatedListInstancesSettings, attachDiskInstanceSettings, deleteInstanceSettings, @@ -972,6 +1015,7 @@ protected Builder(ClientContext clientContext) { insertInstanceSettings, listInstancesSettings, listReferrersInstancesSettings, + removeResourcePoliciesInstanceSettings, resetInstanceSettings, setDeletionProtectionInstanceSettings, setDiskAutoDeleteInstanceSettings, @@ -990,6 +1034,7 @@ protected Builder(ClientContext clientContext) { startWithEncryptionKeyInstanceSettings, stopInstanceSettings, testIamPermissionsInstanceSettings, + updateInstanceSettings, updateAccessConfigInstanceSettings, updateDisplayDeviceInstanceSettings, updateNetworkInterfaceInstanceSettings, @@ -1014,6 +1059,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .addResourcePoliciesInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .aggregatedListInstancesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) @@ -1079,6 +1129,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .removeResourcePoliciesInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .resetInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -1169,6 +1224,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .updateInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .updateAccessConfigInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -1196,6 +1256,8 @@ protected Builder(InstanceStubSettings settings) { super(settings); addAccessConfigInstanceSettings = settings.addAccessConfigInstanceSettings.toBuilder(); + addResourcePoliciesInstanceSettings = + settings.addResourcePoliciesInstanceSettings.toBuilder(); aggregatedListInstancesSettings = settings.aggregatedListInstancesSettings.toBuilder(); attachDiskInstanceSettings = settings.attachDiskInstanceSettings.toBuilder(); deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); @@ -1211,6 +1273,8 @@ protected Builder(InstanceStubSettings settings) { insertInstanceSettings = settings.insertInstanceSettings.toBuilder(); listInstancesSettings = settings.listInstancesSettings.toBuilder(); listReferrersInstancesSettings = settings.listReferrersInstancesSettings.toBuilder(); + removeResourcePoliciesInstanceSettings = + settings.removeResourcePoliciesInstanceSettings.toBuilder(); resetInstanceSettings = settings.resetInstanceSettings.toBuilder(); setDeletionProtectionInstanceSettings = settings.setDeletionProtectionInstanceSettings.toBuilder(); @@ -1234,6 +1298,7 @@ protected Builder(InstanceStubSettings settings) { settings.startWithEncryptionKeyInstanceSettings.toBuilder(); stopInstanceSettings = settings.stopInstanceSettings.toBuilder(); testIamPermissionsInstanceSettings = settings.testIamPermissionsInstanceSettings.toBuilder(); + updateInstanceSettings = settings.updateInstanceSettings.toBuilder(); updateAccessConfigInstanceSettings = settings.updateAccessConfigInstanceSettings.toBuilder(); updateDisplayDeviceInstanceSettings = settings.updateDisplayDeviceInstanceSettings.toBuilder(); @@ -1245,6 +1310,7 @@ protected Builder(InstanceStubSettings settings) { unaryMethodSettingsBuilders = ImmutableList.>of( addAccessConfigInstanceSettings, + addResourcePoliciesInstanceSettings, aggregatedListInstancesSettings, attachDiskInstanceSettings, deleteInstanceSettings, @@ -1258,6 +1324,7 @@ protected Builder(InstanceStubSettings settings) { insertInstanceSettings, listInstancesSettings, listReferrersInstancesSettings, + removeResourcePoliciesInstanceSettings, resetInstanceSettings, setDeletionProtectionInstanceSettings, setDiskAutoDeleteInstanceSettings, @@ -1276,6 +1343,7 @@ protected Builder(InstanceStubSettings settings) { startWithEncryptionKeyInstanceSettings, stopInstanceSettings, testIamPermissionsInstanceSettings, + updateInstanceSettings, updateAccessConfigInstanceSettings, updateDisplayDeviceInstanceSettings, updateNetworkInterfaceInstanceSettings, @@ -1304,6 +1372,12 @@ public Builder applyToAllUnaryMethods( return addAccessConfigInstanceSettings; } + /** Returns the builder for the settings used for calls to addResourcePoliciesInstance. */ + public UnaryCallSettings.Builder + addResourcePoliciesInstanceSettings() { + return addResourcePoliciesInstanceSettings; + } + /** Returns the builder for the settings used for calls to aggregatedListInstances. */ public PagedCallSettings.Builder< AggregatedListInstancesHttpRequest, @@ -1391,6 +1465,12 @@ public UnaryCallSettings.Builder getInstanceSe return listReferrersInstancesSettings; } + /** Returns the builder for the settings used for calls to removeResourcePoliciesInstance. */ + public UnaryCallSettings.Builder + removeResourcePoliciesInstanceSettings() { + return removeResourcePoliciesInstanceSettings; + } + /** Returns the builder for the settings used for calls to resetInstance. */ public UnaryCallSettings.Builder resetInstanceSettings() { return resetInstanceSettings; @@ -1500,6 +1580,12 @@ public UnaryCallSettings.Builder stopInstanc return testIamPermissionsInstanceSettings; } + /** Returns the builder for the settings used for calls to updateInstance. */ + public UnaryCallSettings.Builder + updateInstanceSettings() { + return updateInstanceSettings; + } + /** Returns the builder for the settings used for calls to updateAccessConfigInstance. */ public UnaryCallSettings.Builder updateAccessConfigInstanceSettings() { diff --git a/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStub.java b/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStub.java index eefbcc78d..73e71490b 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStub.java @@ -36,6 +36,7 @@ import com.google.cloud.compute.v1.NodeGroupList; import com.google.cloud.compute.v1.NodeGroupsListNodes; import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNodeGroupHttpRequest; import com.google.cloud.compute.v1.Policy; import com.google.cloud.compute.v1.SetIamPolicyNodeGroupHttpRequest; import com.google.cloud.compute.v1.SetNodeTemplateNodeGroupHttpRequest; @@ -119,6 +120,11 @@ public UnaryCallable listNodeGroupsCal throw new UnsupportedOperationException("Not implemented: listNodesNodeGroupsCallable()"); } + @BetaApi + public UnaryCallable patchNodeGroupCallable() { + throw new UnsupportedOperationException("Not implemented: patchNodeGroupCallable()"); + } + @BetaApi public UnaryCallable setIamPolicyNodeGroupCallable() { throw new UnsupportedOperationException("Not implemented: setIamPolicyNodeGroupCallable()"); diff --git a/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStubSettings.java b/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStubSettings.java index 84cc2dd9d..fe39c60f6 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStubSettings.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/NodeGroupStubSettings.java @@ -57,6 +57,7 @@ import com.google.cloud.compute.v1.NodeGroupsListNodes; import com.google.cloud.compute.v1.NodeGroupsScopedList; import com.google.cloud.compute.v1.Operation; +import com.google.cloud.compute.v1.PatchNodeGroupHttpRequest; import com.google.cloud.compute.v1.Policy; import com.google.cloud.compute.v1.SetIamPolicyNodeGroupHttpRequest; import com.google.cloud.compute.v1.SetNodeTemplateNodeGroupHttpRequest; @@ -137,6 +138,7 @@ public class NodeGroupStubSettings extends StubSettings { private final PagedCallSettings< ListNodesNodeGroupsHttpRequest, NodeGroupsListNodes, ListNodesNodeGroupsPagedResponse> listNodesNodeGroupsSettings; + private final UnaryCallSettings patchNodeGroupSettings; private final UnaryCallSettings setIamPolicyNodeGroupSettings; private final UnaryCallSettings @@ -198,6 +200,11 @@ public UnaryCallSettings insertNodeGroupS return listNodesNodeGroupsSettings; } + /** Returns the object with the settings used for calls to patchNodeGroup. */ + public UnaryCallSettings patchNodeGroupSettings() { + return patchNodeGroupSettings; + } + /** Returns the object with the settings used for calls to setIamPolicyNodeGroup. */ public UnaryCallSettings setIamPolicyNodeGroupSettings() { @@ -299,6 +306,7 @@ protected NodeGroupStubSettings(Builder settingsBuilder) throws IOException { insertNodeGroupSettings = settingsBuilder.insertNodeGroupSettings().build(); listNodeGroupsSettings = settingsBuilder.listNodeGroupsSettings().build(); listNodesNodeGroupsSettings = settingsBuilder.listNodesNodeGroupsSettings().build(); + patchNodeGroupSettings = settingsBuilder.patchNodeGroupSettings().build(); setIamPolicyNodeGroupSettings = settingsBuilder.setIamPolicyNodeGroupSettings().build(); setNodeTemplateNodeGroupSettings = settingsBuilder.setNodeTemplateNodeGroupSettings().build(); testIamPermissionsNodeGroupSettings = @@ -524,6 +532,8 @@ public static class Builder extends StubSettings.Builder listNodesNodeGroupsSettings; + private final UnaryCallSettings.Builder + patchNodeGroupSettings; private final UnaryCallSettings.Builder setIamPolicyNodeGroupSettings; private final UnaryCallSettings.Builder @@ -593,6 +603,8 @@ protected Builder(ClientContext clientContext) { listNodesNodeGroupsSettings = PagedCallSettings.newBuilder(LIST_NODES_NODE_GROUPS_PAGE_STR_FACT); + patchNodeGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicyNodeGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setNodeTemplateNodeGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -610,6 +622,7 @@ protected Builder(ClientContext clientContext) { insertNodeGroupSettings, listNodeGroupsSettings, listNodesNodeGroupsSettings, + patchNodeGroupSettings, setIamPolicyNodeGroupSettings, setNodeTemplateNodeGroupSettings, testIamPermissionsNodeGroupSettings); @@ -673,6 +686,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .patchNodeGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .setIamPolicyNodeGroupSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -703,6 +721,7 @@ protected Builder(NodeGroupStubSettings settings) { insertNodeGroupSettings = settings.insertNodeGroupSettings.toBuilder(); listNodeGroupsSettings = settings.listNodeGroupsSettings.toBuilder(); listNodesNodeGroupsSettings = settings.listNodesNodeGroupsSettings.toBuilder(); + patchNodeGroupSettings = settings.patchNodeGroupSettings.toBuilder(); setIamPolicyNodeGroupSettings = settings.setIamPolicyNodeGroupSettings.toBuilder(); setNodeTemplateNodeGroupSettings = settings.setNodeTemplateNodeGroupSettings.toBuilder(); testIamPermissionsNodeGroupSettings = @@ -719,6 +738,7 @@ protected Builder(NodeGroupStubSettings settings) { insertNodeGroupSettings, listNodeGroupsSettings, listNodesNodeGroupsSettings, + patchNodeGroupSettings, setIamPolicyNodeGroupSettings, setNodeTemplateNodeGroupSettings, testIamPermissionsNodeGroupSettings); @@ -798,6 +818,12 @@ public UnaryCallSettings.Builder getNodeGrou return listNodesNodeGroupsSettings; } + /** Returns the builder for the settings used for calls to patchNodeGroup. */ + public UnaryCallSettings.Builder + patchNodeGroupSettings() { + return patchNodeGroupSettings; + } + /** Returns the builder for the settings used for calls to setIamPolicyNodeGroup. */ public UnaryCallSettings.Builder setIamPolicyNodeGroupSettings() { diff --git a/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStub.java b/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStub.java index 7680133ad..c0f5fa7e9 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStub.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStub.java @@ -15,24 +15,28 @@ */ package com.google.cloud.compute.v1.stub; +import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListErrorsRegionInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListRegionInstanceGroupManagersPagedResponse; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerHttpRequest; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.GetRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.InsertRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.Operation; import com.google.cloud.compute.v1.PatchRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.RegionInstanceGroupManagerList; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersListErrorsResponse; import com.google.cloud.compute.v1.RegionInstanceGroupManagersListInstancesResponse; import com.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerHttpRequest; @@ -56,6 +60,13 @@ public abstract class RegionInstanceGroupManagerStub implements BackgroundResour "Not implemented: abandonInstancesRegionInstanceGroupManagerCallable()"); } + @BetaApi + public UnaryCallable + applyUpdatesToInstancesRegionInstanceGroupManagerCallable() { + throw new UnsupportedOperationException( + "Not implemented: applyUpdatesToInstancesRegionInstanceGroupManagerCallable()"); + } + @BetaApi public UnaryCallable createInstancesRegionInstanceGroupManagerCallable() { @@ -106,6 +117,24 @@ public abstract class RegionInstanceGroupManagerStub implements BackgroundResour "Not implemented: listRegionInstanceGroupManagersCallable()"); } + @BetaApi + public UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listErrorsRegionInstanceGroupManagersPagedCallable()"); + } + + @BetaApi + public UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse> + listErrorsRegionInstanceGroupManagersCallable() { + throw new UnsupportedOperationException( + "Not implemented: listErrorsRegionInstanceGroupManagersCallable()"); + } + @BetaApi public UnaryCallable< ListManagedInstancesRegionInstanceGroupManagersHttpRequest, diff --git a/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStubSettings.java b/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStubSettings.java index e59575cc7..4b1325428 100644 --- a/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStubSettings.java +++ b/src/main/java/com/google/cloud/compute/v1/stub/RegionInstanceGroupManagerStubSettings.java @@ -15,6 +15,7 @@ */ package com.google.cloud.compute.v1.stub; +import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListErrorsRegionInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListRegionInstanceGroupManagersPagedResponse; import com.google.api.core.ApiFunction; @@ -40,18 +41,22 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerHttpRequest; +import com.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.GetRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.InsertRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.InstanceGroupManager; +import com.google.cloud.compute.v1.InstanceManagedByIgmError; +import com.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.ListRegionInstanceGroupManagersHttpRequest; import com.google.cloud.compute.v1.Operation; import com.google.cloud.compute.v1.PatchRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.RegionInstanceGroupManagerList; +import com.google.cloud.compute.v1.RegionInstanceGroupManagersListErrorsResponse; import com.google.cloud.compute.v1.RegionInstanceGroupManagersListInstancesResponse; import com.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerHttpRequest; import com.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerHttpRequest; @@ -115,6 +120,9 @@ public class RegionInstanceGroupManagerStubSettings private final UnaryCallSettings abandonInstancesRegionInstanceGroupManagerSettings; + private final UnaryCallSettings< + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesRegionInstanceGroupManagerSettings; private final UnaryCallSettings createInstancesRegionInstanceGroupManagerSettings; private final UnaryCallSettings @@ -130,6 +138,11 @@ public class RegionInstanceGroupManagerStubSettings RegionInstanceGroupManagerList, ListRegionInstanceGroupManagersPagedResponse> listRegionInstanceGroupManagersSettings; + private final PagedCallSettings< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersSettings; private final UnaryCallSettings< ListManagedInstancesRegionInstanceGroupManagersHttpRequest, RegionInstanceGroupManagersListInstancesResponse> @@ -155,6 +168,15 @@ public class RegionInstanceGroupManagerStubSettings return abandonInstancesRegionInstanceGroupManagerSettings; } + /** + * Returns the object with the settings used for calls to + * applyUpdatesToInstancesRegionInstanceGroupManager. + */ + public UnaryCallSettings + applyUpdatesToInstancesRegionInstanceGroupManagerSettings() { + return applyUpdatesToInstancesRegionInstanceGroupManagerSettings; + } + /** * Returns the object with the settings used for calls to * createInstancesRegionInstanceGroupManager. @@ -200,6 +222,17 @@ public class RegionInstanceGroupManagerStubSettings return listRegionInstanceGroupManagersSettings; } + /** + * Returns the object with the settings used for calls to listErrorsRegionInstanceGroupManagers. + */ + public PagedCallSettings< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersSettings() { + return listErrorsRegionInstanceGroupManagersSettings; + } + /** * Returns the object with the settings used for calls to * listManagedInstancesRegionInstanceGroupManagers. @@ -327,6 +360,8 @@ protected RegionInstanceGroupManagerStubSettings(Builder settingsBuilder) throws abandonInstancesRegionInstanceGroupManagerSettings = settingsBuilder.abandonInstancesRegionInstanceGroupManagerSettings().build(); + applyUpdatesToInstancesRegionInstanceGroupManagerSettings = + settingsBuilder.applyUpdatesToInstancesRegionInstanceGroupManagerSettings().build(); createInstancesRegionInstanceGroupManagerSettings = settingsBuilder.createInstancesRegionInstanceGroupManagerSettings().build(); deleteRegionInstanceGroupManagerSettings = @@ -339,6 +374,8 @@ protected RegionInstanceGroupManagerStubSettings(Builder settingsBuilder) throws settingsBuilder.insertRegionInstanceGroupManagerSettings().build(); listRegionInstanceGroupManagersSettings = settingsBuilder.listRegionInstanceGroupManagersSettings().build(); + listErrorsRegionInstanceGroupManagersSettings = + settingsBuilder.listErrorsRegionInstanceGroupManagersSettings().build(); listManagedInstancesRegionInstanceGroupManagersSettings = settingsBuilder.listManagedInstancesRegionInstanceGroupManagersSettings().build(); patchRegionInstanceGroupManagerSettings = @@ -402,6 +439,56 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + LIST_ERRORS_REGION_INSTANCE_GROUP_MANAGERS_PAGE_STR_DESC = + new PagedListDescriptor< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListErrorsRegionInstanceGroupManagersHttpRequest injectToken( + ListErrorsRegionInstanceGroupManagersHttpRequest payload, String token) { + return ListErrorsRegionInstanceGroupManagersHttpRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListErrorsRegionInstanceGroupManagersHttpRequest injectPageSize( + ListErrorsRegionInstanceGroupManagersHttpRequest payload, int pageSize) { + return ListErrorsRegionInstanceGroupManagersHttpRequest.newBuilder(payload) + .setMaxResults(pageSize) + .build(); + } + + @Override + public Integer extractPageSize( + ListErrorsRegionInstanceGroupManagersHttpRequest payload) { + return payload.getMaxResults(); + } + + @Override + public String extractNextToken(RegionInstanceGroupManagersListErrorsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + RegionInstanceGroupManagersListErrorsResponse payload) { + return payload.getItemsList() != null + ? payload.getItemsList() + : ImmutableList.of(); + } + }; + private static final PagedListResponseFactory< ListRegionInstanceGroupManagersHttpRequest, RegionInstanceGroupManagerList, @@ -434,6 +521,40 @@ public ApiFuture getFuturePagedRes } }; + private static final PagedListResponseFactory< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + ListErrorsRegionInstanceGroupManagersPagedResponse> + LIST_ERRORS_REGION_INSTANCE_GROUP_MANAGERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + ListErrorsRegionInstanceGroupManagersPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse> + callable, + ListErrorsRegionInstanceGroupManagersHttpRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + InstanceManagedByIgmError> + pageContext = + PageContext.create( + callable, + LIST_ERRORS_REGION_INSTANCE_GROUP_MANAGERS_PAGE_STR_DESC, + request, + context); + return ListErrorsRegionInstanceGroupManagersPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + /** Builder for RegionInstanceGroupManagerStubSettings. */ public static class Builder extends StubSettings.Builder { @@ -442,6 +563,9 @@ public static class Builder private final UnaryCallSettings.Builder< AbandonInstancesRegionInstanceGroupManagerHttpRequest, Operation> abandonInstancesRegionInstanceGroupManagerSettings; + private final UnaryCallSettings.Builder< + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesRegionInstanceGroupManagerSettings; private final UnaryCallSettings.Builder< CreateInstancesRegionInstanceGroupManagerHttpRequest, Operation> createInstancesRegionInstanceGroupManagerSettings; @@ -460,6 +584,11 @@ public static class Builder RegionInstanceGroupManagerList, ListRegionInstanceGroupManagersPagedResponse> listRegionInstanceGroupManagersSettings; + private final PagedCallSettings.Builder< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersSettings; private final UnaryCallSettings.Builder< ListManagedInstancesRegionInstanceGroupManagersHttpRequest, RegionInstanceGroupManagersListInstancesResponse> @@ -522,6 +651,9 @@ protected Builder(ClientContext clientContext) { abandonInstancesRegionInstanceGroupManagerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + applyUpdatesToInstancesRegionInstanceGroupManagerSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstancesRegionInstanceGroupManagerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -537,6 +669,9 @@ protected Builder(ClientContext clientContext) { listRegionInstanceGroupManagersSettings = PagedCallSettings.newBuilder(LIST_REGION_INSTANCE_GROUP_MANAGERS_PAGE_STR_FACT); + listErrorsRegionInstanceGroupManagersSettings = + PagedCallSettings.newBuilder(LIST_ERRORS_REGION_INSTANCE_GROUP_MANAGERS_PAGE_STR_FACT); + listManagedInstancesRegionInstanceGroupManagersSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -556,12 +691,14 @@ protected Builder(ClientContext clientContext) { unaryMethodSettingsBuilders = ImmutableList.>of( abandonInstancesRegionInstanceGroupManagerSettings, + applyUpdatesToInstancesRegionInstanceGroupManagerSettings, createInstancesRegionInstanceGroupManagerSettings, deleteRegionInstanceGroupManagerSettings, deleteInstancesRegionInstanceGroupManagerSettings, getRegionInstanceGroupManagerSettings, insertRegionInstanceGroupManagerSettings, listRegionInstanceGroupManagersSettings, + listErrorsRegionInstanceGroupManagersSettings, listManagedInstancesRegionInstanceGroupManagersSettings, patchRegionInstanceGroupManagerSettings, recreateInstancesRegionInstanceGroupManagerSettings, @@ -588,6 +725,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .applyUpdatesToInstancesRegionInstanceGroupManagerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .createInstancesRegionInstanceGroupManagerSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -618,6 +760,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .listErrorsRegionInstanceGroupManagersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder .listManagedInstancesRegionInstanceGroupManagersSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -656,6 +803,8 @@ protected Builder(RegionInstanceGroupManagerStubSettings settings) { abandonInstancesRegionInstanceGroupManagerSettings = settings.abandonInstancesRegionInstanceGroupManagerSettings.toBuilder(); + applyUpdatesToInstancesRegionInstanceGroupManagerSettings = + settings.applyUpdatesToInstancesRegionInstanceGroupManagerSettings.toBuilder(); createInstancesRegionInstanceGroupManagerSettings = settings.createInstancesRegionInstanceGroupManagerSettings.toBuilder(); deleteRegionInstanceGroupManagerSettings = @@ -668,6 +817,8 @@ protected Builder(RegionInstanceGroupManagerStubSettings settings) { settings.insertRegionInstanceGroupManagerSettings.toBuilder(); listRegionInstanceGroupManagersSettings = settings.listRegionInstanceGroupManagersSettings.toBuilder(); + listErrorsRegionInstanceGroupManagersSettings = + settings.listErrorsRegionInstanceGroupManagersSettings.toBuilder(); listManagedInstancesRegionInstanceGroupManagersSettings = settings.listManagedInstancesRegionInstanceGroupManagersSettings.toBuilder(); patchRegionInstanceGroupManagerSettings = @@ -684,12 +835,14 @@ protected Builder(RegionInstanceGroupManagerStubSettings settings) { unaryMethodSettingsBuilders = ImmutableList.>of( abandonInstancesRegionInstanceGroupManagerSettings, + applyUpdatesToInstancesRegionInstanceGroupManagerSettings, createInstancesRegionInstanceGroupManagerSettings, deleteRegionInstanceGroupManagerSettings, deleteInstancesRegionInstanceGroupManagerSettings, getRegionInstanceGroupManagerSettings, insertRegionInstanceGroupManagerSettings, listRegionInstanceGroupManagersSettings, + listErrorsRegionInstanceGroupManagersSettings, listManagedInstancesRegionInstanceGroupManagersSettings, patchRegionInstanceGroupManagerSettings, recreateInstancesRegionInstanceGroupManagerSettings, @@ -724,6 +877,16 @@ public Builder applyToAllUnaryMethods( return abandonInstancesRegionInstanceGroupManagerSettings; } + /** + * Returns the builder for the settings used for calls to + * applyUpdatesToInstancesRegionInstanceGroupManager. + */ + public UnaryCallSettings.Builder< + ApplyUpdatesToInstancesRegionInstanceGroupManagerHttpRequest, Operation> + applyUpdatesToInstancesRegionInstanceGroupManagerSettings() { + return applyUpdatesToInstancesRegionInstanceGroupManagerSettings; + } + /** * Returns the builder for the settings used for calls to * createInstancesRegionInstanceGroupManager. @@ -771,6 +934,17 @@ public Builder applyToAllUnaryMethods( return listRegionInstanceGroupManagersSettings; } + /** + * Returns the builder for the settings used for calls to listErrorsRegionInstanceGroupManagers. + */ + public PagedCallSettings.Builder< + ListErrorsRegionInstanceGroupManagersHttpRequest, + RegionInstanceGroupManagersListErrorsResponse, + ListErrorsRegionInstanceGroupManagersPagedResponse> + listErrorsRegionInstanceGroupManagersSettings() { + return listErrorsRegionInstanceGroupManagersSettings; + } + /** * Returns the builder for the settings used for calls to * listManagedInstancesRegionInstanceGroupManagers. diff --git a/src/test/java/com/google/cloud/compute/v1/AcceleratorTypeClientTest.java b/src/test/java/com/google/cloud/compute/v1/AcceleratorTypeClientTest.java index cbf4ec06b..efd283c85 100644 --- a/src/test/java/com/google/cloud/compute/v1/AcceleratorTypeClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/AcceleratorTypeClientTest.java @@ -103,10 +103,11 @@ public void aggregatedListAcceleratorTypesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListAcceleratorTypesPagedResponse pagedListResponse = - client.aggregatedListAcceleratorTypes(project); + client.aggregatedListAcceleratorTypes(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -137,9 +138,10 @@ public void aggregatedListAcceleratorTypesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListAcceleratorTypes(project); + client.aggregatedListAcceleratorTypes(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/AddressClientTest.java b/src/test/java/com/google/cloud/compute/v1/AddressClientTest.java index 92abc0112..566bf2d93 100644 --- a/src/test/java/com/google/cloud/compute/v1/AddressClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/AddressClientTest.java @@ -107,10 +107,11 @@ public void aggregatedListAddressesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListAddressesPagedResponse pagedListResponse = - client.aggregatedListAddresses(project); + client.aggregatedListAddresses(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -141,9 +142,10 @@ public void aggregatedListAddressesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListAddresses(project); + client.aggregatedListAddresses(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/AutoscalerClientTest.java b/src/test/java/com/google/cloud/compute/v1/AutoscalerClientTest.java index a10b4821b..6e2e7c26b 100644 --- a/src/test/java/com/google/cloud/compute/v1/AutoscalerClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/AutoscalerClientTest.java @@ -112,10 +112,11 @@ public void aggregatedListAutoscalersTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListAutoscalersPagedResponse pagedListResponse = - client.aggregatedListAutoscalers(project); + client.aggregatedListAutoscalers(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -146,9 +147,10 @@ public void aggregatedListAutoscalersExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListAutoscalers(project); + client.aggregatedListAutoscalers(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/BackendServiceClientTest.java b/src/test/java/com/google/cloud/compute/v1/BackendServiceClientTest.java index f3cd69d16..1bacba4e2 100644 --- a/src/test/java/com/google/cloud/compute/v1/BackendServiceClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/BackendServiceClientTest.java @@ -213,10 +213,11 @@ public void aggregatedListBackendServicesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListBackendServicesPagedResponse pagedListResponse = - client.aggregatedListBackendServices(project); + client.aggregatedListBackendServices(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -247,9 +248,10 @@ public void aggregatedListBackendServicesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListBackendServices(project); + client.aggregatedListBackendServices(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/DiskClientTest.java b/src/test/java/com/google/cloud/compute/v1/DiskClientTest.java index 38883731a..327b397b0 100644 --- a/src/test/java/com/google/cloud/compute/v1/DiskClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/DiskClientTest.java @@ -216,9 +216,11 @@ public void aggregatedListDisksTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - AggregatedListDisksPagedResponse pagedListResponse = client.aggregatedListDisks(project); + AggregatedListDisksPagedResponse pagedListResponse = + client.aggregatedListDisks(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -249,9 +251,10 @@ public void aggregatedListDisksExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListDisks(project); + client.aggregatedListDisks(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/DiskTypeClientTest.java b/src/test/java/com/google/cloud/compute/v1/DiskTypeClientTest.java index 15281182a..de37f9a68 100644 --- a/src/test/java/com/google/cloud/compute/v1/DiskTypeClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/DiskTypeClientTest.java @@ -103,10 +103,11 @@ public void aggregatedListDiskTypesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListDiskTypesPagedResponse pagedListResponse = - client.aggregatedListDiskTypes(project); + client.aggregatedListDiskTypes(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -137,9 +138,10 @@ public void aggregatedListDiskTypesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListDiskTypes(project); + client.aggregatedListDiskTypes(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/ForwardingRuleClientTest.java b/src/test/java/com/google/cloud/compute/v1/ForwardingRuleClientTest.java index da66b45c2..7f7b85b0d 100644 --- a/src/test/java/com/google/cloud/compute/v1/ForwardingRuleClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/ForwardingRuleClientTest.java @@ -112,10 +112,11 @@ public void aggregatedListForwardingRulesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListForwardingRulesPagedResponse pagedListResponse = - client.aggregatedListForwardingRules(project); + client.aggregatedListForwardingRules(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -146,9 +147,10 @@ public void aggregatedListForwardingRulesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListForwardingRules(project); + client.aggregatedListForwardingRules(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupClientTest.java b/src/test/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupClientTest.java new file mode 100644 index 000000000..44de319c7 --- /dev/null +++ b/src/test/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupClientTest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1; + +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListGlobalNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.GlobalNetworkEndpointGroupClient.ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse; +import static com.google.cloud.compute.v1.stub.HttpJsonGlobalNetworkEndpointGroupStub.attachNetworkEndpointsGlobalNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonGlobalNetworkEndpointGroupStub.deleteGlobalNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonGlobalNetworkEndpointGroupStub.detachNetworkEndpointsGlobalNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonGlobalNetworkEndpointGroupStub.getGlobalNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonGlobalNetworkEndpointGroupStub.insertGlobalNetworkEndpointGroupMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonGlobalNetworkEndpointGroupStub.listGlobalNetworkEndpointGroupsMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonGlobalNetworkEndpointGroupStub.listNetworkEndpointsGlobalNetworkEndpointGroupsMethodDescriptor; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode.Code; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.compute.v1.stub.GlobalNetworkEndpointGroupStubSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class GlobalNetworkEndpointGroupClientTest { + + private static final List METHOD_DESCRIPTORS = + ImmutableList.copyOf( + Lists.newArrayList( + attachNetworkEndpointsGlobalNetworkEndpointGroupMethodDescriptor, + deleteGlobalNetworkEndpointGroupMethodDescriptor, + detachNetworkEndpointsGlobalNetworkEndpointGroupMethodDescriptor, + getGlobalNetworkEndpointGroupMethodDescriptor, + insertGlobalNetworkEndpointGroupMethodDescriptor, + listGlobalNetworkEndpointGroupsMethodDescriptor, + listNetworkEndpointsGlobalNetworkEndpointGroupsMethodDescriptor)); + private static final MockHttpService mockService = + new MockHttpService( + METHOD_DESCRIPTORS, GlobalNetworkEndpointGroupStubSettings.getDefaultEndpoint()); + + private static GlobalNetworkEndpointGroupClient client; + private static GlobalNetworkEndpointGroupSettings clientSettings; + + @BeforeClass + public static void setUp() throws IOException { + clientSettings = + GlobalNetworkEndpointGroupSettings.newBuilder() + .setTransportChannelProvider( + GlobalNetworkEndpointGroupSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GlobalNetworkEndpointGroupClient.create(clientSettings); + } + + @After + public void cleanUp() { + mockService.reset(); + } + + @AfterClass + public static void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void attachNetworkEndpointsGlobalNetworkEndpointGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + GlobalNetworkEndpointGroupsAttachEndpointsRequest + globalNetworkEndpointGroupsAttachEndpointsRequestResource = + GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build(); + + Operation actualResponse = + client.attachNetworkEndpointsGlobalNetworkEndpointGroup( + networkEndpointGroup, globalNetworkEndpointGroupsAttachEndpointsRequestResource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void attachNetworkEndpointsGlobalNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + GlobalNetworkEndpointGroupsAttachEndpointsRequest + globalNetworkEndpointGroupsAttachEndpointsRequestResource = + GlobalNetworkEndpointGroupsAttachEndpointsRequest.newBuilder().build(); + + client.attachNetworkEndpointsGlobalNetworkEndpointGroup( + networkEndpointGroup, globalNetworkEndpointGroupsAttachEndpointsRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteGlobalNetworkEndpointGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + + Operation actualResponse = client.deleteGlobalNetworkEndpointGroup(networkEndpointGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void deleteGlobalNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + + client.deleteGlobalNetworkEndpointGroup(networkEndpointGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void detachNetworkEndpointsGlobalNetworkEndpointGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource = + GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build(); + + Operation actualResponse = + client.detachNetworkEndpointsGlobalNetworkEndpointGroup( + networkEndpointGroup, globalNetworkEndpointGroupsDetachEndpointsRequestResource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void detachNetworkEndpointsGlobalNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + GlobalNetworkEndpointGroupsDetachEndpointsRequest + globalNetworkEndpointGroupsDetachEndpointsRequestResource = + GlobalNetworkEndpointGroupsDetachEndpointsRequest.newBuilder().build(); + + client.detachNetworkEndpointsGlobalNetworkEndpointGroup( + networkEndpointGroup, globalNetworkEndpointGroupsDetachEndpointsRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getGlobalNetworkEndpointGroupTest() { + String creationTimestamp = "creationTimestamp567396278"; + Integer defaultPort = 650363969; + String description = "description-1724546052"; + String id = "id3355"; + String kind = "kind3292052"; + String name = "name3373707"; + ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]"); + String networkEndpointType = "networkEndpointType118301523"; + String selfLink = "selfLink-1691268851"; + Integer size = 3530753; + ProjectRegionSubnetworkName subnetwork = + ProjectRegionSubnetworkName.of("[PROJECT]", "[REGION]", "[SUBNETWORK]"); + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + NetworkEndpointGroup expectedResponse = + NetworkEndpointGroup.newBuilder() + .setCreationTimestamp(creationTimestamp) + .setDefaultPort(defaultPort) + .setDescription(description) + .setId(id) + .setKind(kind) + .setName(name) + .setNetwork(network.toString()) + .setNetworkEndpointType(networkEndpointType) + .setSelfLink(selfLink) + .setSize(size) + .setSubnetwork(subnetwork.toString()) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + + NetworkEndpointGroup actualResponse = + client.getGlobalNetworkEndpointGroup(networkEndpointGroup); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void getGlobalNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + + client.getGlobalNetworkEndpointGroup(networkEndpointGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void insertGlobalNetworkEndpointGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName project = ProjectName.of("[PROJECT]"); + NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build(); + + Operation actualResponse = + client.insertGlobalNetworkEndpointGroup(project, networkEndpointGroupResource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void insertGlobalNetworkEndpointGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName project = ProjectName.of("[PROJECT]"); + NetworkEndpointGroup networkEndpointGroupResource = NetworkEndpointGroup.newBuilder().build(); + + client.insertGlobalNetworkEndpointGroup(project, networkEndpointGroupResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listGlobalNetworkEndpointGroupsTest() { + String id = "id3355"; + String kind = "kind3292052"; + String nextPageToken = ""; + String selfLink = "selfLink-1691268851"; + NetworkEndpointGroup itemsElement = NetworkEndpointGroup.newBuilder().build(); + List items = Arrays.asList(itemsElement); + NetworkEndpointGroupList expectedResponse = + NetworkEndpointGroupList.newBuilder() + .setId(id) + .setKind(kind) + .setNextPageToken(nextPageToken) + .setSelfLink(selfLink) + .addAllItems(items) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName project = ProjectName.of("[PROJECT]"); + + ListGlobalNetworkEndpointGroupsPagedResponse pagedListResponse = + client.listGlobalNetworkEndpointGroups(project); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void listGlobalNetworkEndpointGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName project = ProjectName.of("[PROJECT]"); + + client.listGlobalNetworkEndpointGroups(project); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listNetworkEndpointsGlobalNetworkEndpointGroupsTest() { + String id = "id3355"; + String kind = "kind3292052"; + String nextPageToken = ""; + NetworkEndpointWithHealthStatus itemsElement = + NetworkEndpointWithHealthStatus.newBuilder().build(); + List items = Arrays.asList(itemsElement); + NetworkEndpointGroupsListNetworkEndpoints expectedResponse = + NetworkEndpointGroupsListNetworkEndpoints.newBuilder() + .setId(id) + .setKind(kind) + .setNextPageToken(nextPageToken) + .addAllItems(items) + .build(); + mockService.addResponse(expectedResponse); + + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + + ListNetworkEndpointsGlobalNetworkEndpointGroupsPagedResponse pagedListResponse = + client.listNetworkEndpointsGlobalNetworkEndpointGroups(networkEndpointGroup); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void listNetworkEndpointsGlobalNetworkEndpointGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectGlobalNetworkEndpointGroupName networkEndpointGroup = + ProjectGlobalNetworkEndpointGroupName.of("[PROJECT]", "[NETWORK_ENDPOINT_GROUP]"); + + client.listNetworkEndpointsGlobalNetworkEndpointGroups(networkEndpointGroup); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/src/test/java/com/google/cloud/compute/v1/GlobalOperationClientTest.java b/src/test/java/com/google/cloud/compute/v1/GlobalOperationClientTest.java index 87e777896..c1c954261 100644 --- a/src/test/java/com/google/cloud/compute/v1/GlobalOperationClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/GlobalOperationClientTest.java @@ -107,10 +107,11 @@ public void aggregatedListGlobalOperationsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListGlobalOperationsPagedResponse pagedListResponse = - client.aggregatedListGlobalOperations(project); + client.aggregatedListGlobalOperations(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -141,9 +142,10 @@ public void aggregatedListGlobalOperationsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListGlobalOperations(project); + client.aggregatedListGlobalOperations(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/HealthCheckClientTest.java b/src/test/java/com/google/cloud/compute/v1/HealthCheckClientTest.java index 4df36ccdd..0607ca6f0 100644 --- a/src/test/java/com/google/cloud/compute/v1/HealthCheckClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/HealthCheckClientTest.java @@ -112,10 +112,11 @@ public void aggregatedListHealthChecksTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListHealthChecksPagedResponse pagedListResponse = - client.aggregatedListHealthChecks(project); + client.aggregatedListHealthChecks(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -146,9 +147,10 @@ public void aggregatedListHealthChecksExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListHealthChecks(project); + client.aggregatedListHealthChecks(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java b/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java index 3da7b413b..4e1e2aa5f 100644 --- a/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/InstanceClientTest.java @@ -19,6 +19,7 @@ import static com.google.cloud.compute.v1.InstanceClient.ListInstancesPagedResponse; import static com.google.cloud.compute.v1.InstanceClient.ListReferrersInstancesPagedResponse; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.addAccessConfigInstanceMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.addResourcePoliciesInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.aggregatedListInstancesMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.attachDiskInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.deleteAccessConfigInstanceMethodDescriptor; @@ -32,6 +33,7 @@ import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.insertInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.listInstancesMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.listReferrersInstancesMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.removeResourcePoliciesInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.resetInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.setDeletionProtectionInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.setDiskAutoDeleteInstanceMethodDescriptor; @@ -52,6 +54,7 @@ import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.testIamPermissionsInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.updateAccessConfigInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.updateDisplayDeviceInstanceMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.updateInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.updateNetworkInterfaceInstanceMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceStub.updateShieldedInstanceConfigInstanceMethodDescriptor; @@ -87,6 +90,7 @@ public class InstanceClientTest { ImmutableList.copyOf( Lists.newArrayList( addAccessConfigInstanceMethodDescriptor, + addResourcePoliciesInstanceMethodDescriptor, aggregatedListInstancesMethodDescriptor, attachDiskInstanceMethodDescriptor, deleteInstanceMethodDescriptor, @@ -100,6 +104,7 @@ public class InstanceClientTest { insertInstanceMethodDescriptor, listInstancesMethodDescriptor, listReferrersInstancesMethodDescriptor, + removeResourcePoliciesInstanceMethodDescriptor, resetInstanceMethodDescriptor, setDeletionProtectionInstanceMethodDescriptor, setDiskAutoDeleteInstanceMethodDescriptor, @@ -118,6 +123,7 @@ public class InstanceClientTest { startWithEncryptionKeyInstanceMethodDescriptor, stopInstanceMethodDescriptor, testIamPermissionsInstanceMethodDescriptor, + updateInstanceMethodDescriptor, updateAccessConfigInstanceMethodDescriptor, updateDisplayDeviceInstanceMethodDescriptor, updateNetworkInterfaceInstanceMethodDescriptor, @@ -246,6 +252,101 @@ public void addAccessConfigInstanceExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void addResourcePoliciesInstanceTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = + InstancesAddResourcePoliciesRequest.newBuilder().build(); + + Operation actualResponse = + client.addResourcePoliciesInstance(instance, instancesAddResourcePoliciesRequestResource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void addResourcePoliciesInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + InstancesAddResourcePoliciesRequest instancesAddResourcePoliciesRequestResource = + InstancesAddResourcePoliciesRequest.newBuilder().build(); + + client.addResourcePoliciesInstance(instance, instancesAddResourcePoliciesRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void aggregatedListInstancesTest() { @@ -266,10 +367,11 @@ public void aggregatedListInstancesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListInstancesPagedResponse pagedListResponse = - client.aggregatedListInstances(project); + client.aggregatedListInstances(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -300,9 +402,10 @@ public void aggregatedListInstancesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListInstances(project); + client.aggregatedListInstances(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -689,6 +792,7 @@ public void getInstanceTest() { String creationTimestamp = "creationTimestamp567396278"; Boolean deletionProtection = true; String description = "description-1724546052"; + String fingerprint = "fingerprint-1375934236"; String hostname = "hostname-299803597"; String id = "id3355"; String kind = "kind3292052"; @@ -709,6 +813,7 @@ public void getInstanceTest() { .setCreationTimestamp(creationTimestamp) .setDeletionProtection(deletionProtection) .setDescription(description) + .setFingerprint(fingerprint) .setHostname(hostname) .setId(id) .setKind(kind) @@ -1199,6 +1304,103 @@ public void listReferrersInstancesExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void removeResourcePoliciesInstanceTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = + InstancesRemoveResourcePoliciesRequest.newBuilder().build(); + + Operation actualResponse = + client.removeResourcePoliciesInstance( + instance, instancesRemoveResourcePoliciesRequestResource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void removeResourcePoliciesInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + InstancesRemoveResourcePoliciesRequest instancesRemoveResourcePoliciesRequestResource = + InstancesRemoveResourcePoliciesRequest.newBuilder().build(); + + client.removeResourcePoliciesInstance( + instance, instancesRemoveResourcePoliciesRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void resetInstanceTest() { @@ -2795,6 +2997,107 @@ public void testIamPermissionsInstanceExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void updateInstanceTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + String mostDisruptiveAllowedAction = "mostDisruptiveAllowedAction-1544509683"; + String minimalAction = "minimalAction-1340045676"; + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + Instance instanceResource = Instance.newBuilder().build(); + List fieldMask = new ArrayList<>(); + + Operation actualResponse = + client.updateInstance( + mostDisruptiveAllowedAction, minimalAction, instance, instanceResource, fieldMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void updateInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String mostDisruptiveAllowedAction = "mostDisruptiveAllowedAction-1544509683"; + String minimalAction = "minimalAction-1340045676"; + ProjectZoneInstanceName instance = + ProjectZoneInstanceName.of("[PROJECT]", "[ZONE]", "[INSTANCE]"); + Instance instanceResource = Instance.newBuilder().build(); + List fieldMask = new ArrayList<>(); + + client.updateInstance( + mostDisruptiveAllowedAction, minimalAction, instance, instanceResource, fieldMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void updateAccessConfigInstanceTest() { diff --git a/src/test/java/com/google/cloud/compute/v1/InstanceGroupClientTest.java b/src/test/java/com/google/cloud/compute/v1/InstanceGroupClientTest.java index e82f36bec..cada3f4c9 100644 --- a/src/test/java/com/google/cloud/compute/v1/InstanceGroupClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/InstanceGroupClientTest.java @@ -211,10 +211,11 @@ public void aggregatedListInstanceGroupsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListInstanceGroupsPagedResponse pagedListResponse = - client.aggregatedListInstanceGroups(project); + client.aggregatedListInstanceGroups(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -245,9 +246,10 @@ public void aggregatedListInstanceGroupsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListInstanceGroups(project); + client.aggregatedListInstanceGroups(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/InstanceGroupManagerClientTest.java b/src/test/java/com/google/cloud/compute/v1/InstanceGroupManagerClientTest.java index 8ea3bd487..6427c4511 100644 --- a/src/test/java/com/google/cloud/compute/v1/InstanceGroupManagerClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/InstanceGroupManagerClientTest.java @@ -16,14 +16,17 @@ package com.google.cloud.compute.v1; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.AggregatedListInstanceGroupManagersPagedResponse; +import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListErrorsInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.InstanceGroupManagerClient.ListInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.abandonInstancesInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.aggregatedListInstanceGroupManagersMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.applyUpdatesToInstancesInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.createInstancesInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.deleteInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.deleteInstancesInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.getInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.insertInstanceGroupManagerMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.listErrorsInstanceGroupManagersMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.listInstanceGroupManagersMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.listManagedInstancesInstanceGroupManagersMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonInstanceGroupManagerStub.patchInstanceGroupManagerMethodDescriptor; @@ -65,12 +68,14 @@ public class InstanceGroupManagerClientTest { Lists.newArrayList( abandonInstancesInstanceGroupManagerMethodDescriptor, aggregatedListInstanceGroupManagersMethodDescriptor, + applyUpdatesToInstancesInstanceGroupManagerMethodDescriptor, createInstancesInstanceGroupManagerMethodDescriptor, deleteInstanceGroupManagerMethodDescriptor, deleteInstancesInstanceGroupManagerMethodDescriptor, getInstanceGroupManagerMethodDescriptor, insertInstanceGroupManagerMethodDescriptor, listInstanceGroupManagersMethodDescriptor, + listErrorsInstanceGroupManagersMethodDescriptor, listManagedInstancesInstanceGroupManagersMethodDescriptor, patchInstanceGroupManagerMethodDescriptor, recreateInstancesInstanceGroupManagerMethodDescriptor, @@ -227,10 +232,11 @@ public void aggregatedListInstanceGroupManagersTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListInstanceGroupManagersPagedResponse pagedListResponse = - client.aggregatedListInstanceGroupManagers(project); + client.aggregatedListInstanceGroupManagers(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); @@ -262,9 +268,107 @@ public void aggregatedListInstanceGroupManagersExceptionTest() throws Exception mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListInstanceGroupManagers(project); + client.aggregatedListInstanceGroupManagers(includeAllScopes, project); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void applyUpdatesToInstancesInstanceGroupManagerTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneInstanceGroupManagerName instanceGroupManager = + ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]"); + InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource = + InstanceGroupManagersApplyUpdatesRequest.newBuilder().build(); + + Operation actualResponse = + client.applyUpdatesToInstancesInstanceGroupManager( + instanceGroupManager, instanceGroupManagersApplyUpdatesRequestResource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void applyUpdatesToInstancesInstanceGroupManagerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneInstanceGroupManagerName instanceGroupManager = + ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]"); + InstanceGroupManagersApplyUpdatesRequest instanceGroupManagersApplyUpdatesRequestResource = + InstanceGroupManagersApplyUpdatesRequest.newBuilder().build(); + + client.applyUpdatesToInstancesInstanceGroupManager( + instanceGroupManager, instanceGroupManagersApplyUpdatesRequestResource); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -787,6 +891,63 @@ public void listInstanceGroupManagersExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void listErrorsInstanceGroupManagersTest() { + String nextPageToken = ""; + InstanceManagedByIgmError itemsElement = InstanceManagedByIgmError.newBuilder().build(); + List items = Arrays.asList(itemsElement); + InstanceGroupManagersListErrorsResponse expectedResponse = + InstanceGroupManagersListErrorsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllItems(items) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneInstanceGroupManagerName instanceGroupManager = + ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]"); + + ListErrorsInstanceGroupManagersPagedResponse pagedListResponse = + client.listErrorsInstanceGroupManagers(instanceGroupManager); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void listErrorsInstanceGroupManagersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneInstanceGroupManagerName instanceGroupManager = + ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]"); + + client.listErrorsInstanceGroupManagers(instanceGroupManager); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void listManagedInstancesInstanceGroupManagersTest() { diff --git a/src/test/java/com/google/cloud/compute/v1/InterconnectAttachmentClientTest.java b/src/test/java/com/google/cloud/compute/v1/InterconnectAttachmentClientTest.java index 42bb4d313..8495abc48 100644 --- a/src/test/java/com/google/cloud/compute/v1/InterconnectAttachmentClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/InterconnectAttachmentClientTest.java @@ -112,10 +112,11 @@ public void aggregatedListInterconnectAttachmentsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListInterconnectAttachmentsPagedResponse pagedListResponse = - client.aggregatedListInterconnectAttachments(project); + client.aggregatedListInterconnectAttachments(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); @@ -147,9 +148,10 @@ public void aggregatedListInterconnectAttachmentsExceptionTest() throws Exceptio mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListInterconnectAttachments(project); + client.aggregatedListInterconnectAttachments(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/MachineTypeClientTest.java b/src/test/java/com/google/cloud/compute/v1/MachineTypeClientTest.java index bc8b05c18..3b53e3586 100644 --- a/src/test/java/com/google/cloud/compute/v1/MachineTypeClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/MachineTypeClientTest.java @@ -103,10 +103,11 @@ public void aggregatedListMachineTypesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListMachineTypesPagedResponse pagedListResponse = - client.aggregatedListMachineTypes(project); + client.aggregatedListMachineTypes(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -137,9 +138,10 @@ public void aggregatedListMachineTypesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListMachineTypes(project); + client.aggregatedListMachineTypes(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/NetworkEndpointGroupClientTest.java b/src/test/java/com/google/cloud/compute/v1/NetworkEndpointGroupClientTest.java index 7514453cb..ceb122478 100644 --- a/src/test/java/com/google/cloud/compute/v1/NetworkEndpointGroupClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/NetworkEndpointGroupClientTest.java @@ -118,10 +118,11 @@ public void aggregatedListNetworkEndpointGroupsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListNetworkEndpointGroupsPagedResponse pagedListResponse = - client.aggregatedListNetworkEndpointGroups(project); + client.aggregatedListNetworkEndpointGroups(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); @@ -153,9 +154,10 @@ public void aggregatedListNetworkEndpointGroupsExceptionTest() throws Exception mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListNetworkEndpointGroups(project); + client.aggregatedListNetworkEndpointGroups(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/NodeGroupClientTest.java b/src/test/java/com/google/cloud/compute/v1/NodeGroupClientTest.java index 914e9df4b..6f60bbd6b 100644 --- a/src/test/java/com/google/cloud/compute/v1/NodeGroupClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/NodeGroupClientTest.java @@ -27,6 +27,7 @@ import static com.google.cloud.compute.v1.stub.HttpJsonNodeGroupStub.insertNodeGroupMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonNodeGroupStub.listNodeGroupsMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonNodeGroupStub.listNodesNodeGroupsMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonNodeGroupStub.patchNodeGroupMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonNodeGroupStub.setIamPolicyNodeGroupMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonNodeGroupStub.setNodeTemplateNodeGroupMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonNodeGroupStub.testIamPermissionsNodeGroupMethodDescriptor; @@ -45,6 +46,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -70,6 +72,7 @@ public class NodeGroupClientTest { insertNodeGroupMethodDescriptor, listNodeGroupsMethodDescriptor, listNodesNodeGroupsMethodDescriptor, + patchNodeGroupMethodDescriptor, setIamPolicyNodeGroupMethodDescriptor, setNodeTemplateNodeGroupMethodDescriptor, testIamPermissionsNodeGroupMethodDescriptor)); @@ -217,10 +220,11 @@ public void aggregatedListNodeGroupsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListNodeGroupsPagedResponse pagedListResponse = - client.aggregatedListNodeGroups(project); + client.aggregatedListNodeGroups(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -251,9 +255,10 @@ public void aggregatedListNodeGroupsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListNodeGroups(project); + client.aggregatedListNodeGroups(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -450,8 +455,10 @@ public void deleteNodesNodeGroupExceptionTest() throws Exception { public void getNodeGroupTest() { String creationTimestamp = "creationTimestamp567396278"; String description = "description-1724546052"; + String fingerprint = "fingerprint-1375934236"; String id = "id3355"; String kind = "kind3292052"; + String maintenancePolicy = "maintenancePolicy1065198558"; String name = "name3373707"; ProjectRegionNodeTemplateName nodeTemplate = ProjectRegionNodeTemplateName.of("[PROJECT]", "[REGION]", "[NODE_TEMPLATE]"); @@ -463,8 +470,10 @@ public void getNodeGroupTest() { NodeGroup.newBuilder() .setCreationTimestamp(creationTimestamp) .setDescription(description) + .setFingerprint(fingerprint) .setId(id) .setKind(kind) + .setMaintenancePolicy(maintenancePolicy) .setName(name) .setNodeTemplate(nodeTemplate.toString()) .setSelfLink(selfLink) @@ -778,6 +787,100 @@ public void listNodesNodeGroupsExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void patchNodeGroupTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectZoneNodeGroupName nodeGroup = + ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]"); + NodeGroup nodeGroupResource = NodeGroup.newBuilder().build(); + List fieldMask = new ArrayList<>(); + + Operation actualResponse = client.patchNodeGroup(nodeGroup, nodeGroupResource, fieldMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void patchNodeGroupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectZoneNodeGroupName nodeGroup = + ProjectZoneNodeGroupName.of("[PROJECT]", "[ZONE]", "[NODE_GROUP]"); + NodeGroup nodeGroupResource = NodeGroup.newBuilder().build(); + List fieldMask = new ArrayList<>(); + + client.patchNodeGroup(nodeGroup, nodeGroupResource, fieldMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void setIamPolicyNodeGroupTest() { diff --git a/src/test/java/com/google/cloud/compute/v1/NodeTemplateClientTest.java b/src/test/java/com/google/cloud/compute/v1/NodeTemplateClientTest.java index 71eaccbb0..9641c6c12 100644 --- a/src/test/java/com/google/cloud/compute/v1/NodeTemplateClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/NodeTemplateClientTest.java @@ -113,10 +113,11 @@ public void aggregatedListNodeTemplatesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListNodeTemplatesPagedResponse pagedListResponse = - client.aggregatedListNodeTemplates(project); + client.aggregatedListNodeTemplates(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -147,9 +148,10 @@ public void aggregatedListNodeTemplatesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListNodeTemplates(project); + client.aggregatedListNodeTemplates(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/NodeTypeClientTest.java b/src/test/java/com/google/cloud/compute/v1/NodeTypeClientTest.java index 46780c2cb..95075b986 100644 --- a/src/test/java/com/google/cloud/compute/v1/NodeTypeClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/NodeTypeClientTest.java @@ -103,10 +103,11 @@ public void aggregatedListNodeTypesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListNodeTypesPagedResponse pagedListResponse = - client.aggregatedListNodeTypes(project); + client.aggregatedListNodeTypes(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -137,9 +138,10 @@ public void aggregatedListNodeTypesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListNodeTypes(project); + client.aggregatedListNodeTypes(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/PacketMirroringClientTest.java b/src/test/java/com/google/cloud/compute/v1/PacketMirroringClientTest.java index 70a2e85da..1c75bd916 100644 --- a/src/test/java/com/google/cloud/compute/v1/PacketMirroringClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/PacketMirroringClientTest.java @@ -112,10 +112,11 @@ public void aggregatedListPacketMirroringsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListPacketMirroringsPagedResponse pagedListResponse = - client.aggregatedListPacketMirrorings(project); + client.aggregatedListPacketMirrorings(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -146,9 +147,10 @@ public void aggregatedListPacketMirroringsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListPacketMirrorings(project); + client.aggregatedListPacketMirrorings(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/RegionCommitmentClientTest.java b/src/test/java/com/google/cloud/compute/v1/RegionCommitmentClientTest.java index e81bff4c3..15c51df83 100644 --- a/src/test/java/com/google/cloud/compute/v1/RegionCommitmentClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/RegionCommitmentClientTest.java @@ -105,10 +105,11 @@ public void aggregatedListRegionCommitmentsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListRegionCommitmentsPagedResponse pagedListResponse = - client.aggregatedListRegionCommitments(project); + client.aggregatedListRegionCommitments(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -139,9 +140,10 @@ public void aggregatedListRegionCommitmentsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListRegionCommitments(project); + client.aggregatedListRegionCommitments(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClientTest.java b/src/test/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClientTest.java index f9e2895f1..2d50da238 100644 --- a/src/test/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerClientTest.java @@ -15,13 +15,16 @@ */ package com.google.cloud.compute.v1; +import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListErrorsRegionInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.RegionInstanceGroupManagerClient.ListRegionInstanceGroupManagersPagedResponse; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.abandonInstancesRegionInstanceGroupManagerMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.applyUpdatesToInstancesRegionInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.createInstancesRegionInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.deleteInstancesRegionInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.deleteRegionInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.getRegionInstanceGroupManagerMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.insertRegionInstanceGroupManagerMethodDescriptor; +import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.listErrorsRegionInstanceGroupManagersMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.listManagedInstancesRegionInstanceGroupManagersMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.listRegionInstanceGroupManagersMethodDescriptor; import static com.google.cloud.compute.v1.stub.HttpJsonRegionInstanceGroupManagerStub.patchRegionInstanceGroupManagerMethodDescriptor; @@ -60,12 +63,14 @@ public class RegionInstanceGroupManagerClientTest { ImmutableList.copyOf( Lists.newArrayList( abandonInstancesRegionInstanceGroupManagerMethodDescriptor, + applyUpdatesToInstancesRegionInstanceGroupManagerMethodDescriptor, createInstancesRegionInstanceGroupManagerMethodDescriptor, deleteRegionInstanceGroupManagerMethodDescriptor, deleteInstancesRegionInstanceGroupManagerMethodDescriptor, getRegionInstanceGroupManagerMethodDescriptor, insertRegionInstanceGroupManagerMethodDescriptor, listRegionInstanceGroupManagersMethodDescriptor, + listErrorsRegionInstanceGroupManagersMethodDescriptor, listManagedInstancesRegionInstanceGroupManagersMethodDescriptor, patchRegionInstanceGroupManagerMethodDescriptor, recreateInstancesRegionInstanceGroupManagerMethodDescriptor, @@ -203,6 +208,107 @@ public void abandonInstancesRegionInstanceGroupManagerExceptionTest() throws Exc } } + @Test + @SuppressWarnings("all") + public void applyUpdatesToInstancesRegionInstanceGroupManagerTest() { + String clientOperationId = "clientOperationId-239630617"; + String creationTimestamp = "creationTimestamp567396278"; + String description = "description-1724546052"; + String endTime = "endTime1725551537"; + String httpErrorMessage = "httpErrorMessage1276263769"; + Integer httpErrorStatusCode = 1386087020; + String id = "id3355"; + String insertTime = "insertTime-103148397"; + String kind = "kind3292052"; + String name = "name3373707"; + String operationType = "operationType-1432962286"; + Integer progress = 1001078227; + ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); + String selfLink = "selfLink-1691268851"; + String startTime = "startTime-1573145462"; + String status = "status-892481550"; + String statusMessage = "statusMessage-239442758"; + String targetId = "targetId-815576439"; + String targetLink = "targetLink-2084812312"; + String user = "user3599307"; + ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); + Operation expectedResponse = + Operation.newBuilder() + .setClientOperationId(clientOperationId) + .setCreationTimestamp(creationTimestamp) + .setDescription(description) + .setEndTime(endTime) + .setHttpErrorMessage(httpErrorMessage) + .setHttpErrorStatusCode(httpErrorStatusCode) + .setId(id) + .setInsertTime(insertTime) + .setKind(kind) + .setName(name) + .setOperationType(operationType) + .setProgress(progress) + .setRegion(region.toString()) + .setSelfLink(selfLink) + .setStartTime(startTime) + .setStatus(status) + .setStatusMessage(statusMessage) + .setTargetId(targetId) + .setTargetLink(targetLink) + .setUser(user) + .setZone(zone.toString()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectRegionInstanceGroupManagerName instanceGroupManager = + ProjectRegionInstanceGroupManagerName.of( + "[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]"); + RegionInstanceGroupManagersApplyUpdatesRequest + regionInstanceGroupManagersApplyUpdatesRequestResource = + RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build(); + + Operation actualResponse = + client.applyUpdatesToInstancesRegionInstanceGroupManager( + instanceGroupManager, regionInstanceGroupManagersApplyUpdatesRequestResource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void applyUpdatesToInstancesRegionInstanceGroupManagerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectRegionInstanceGroupManagerName instanceGroupManager = + ProjectRegionInstanceGroupManagerName.of( + "[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]"); + RegionInstanceGroupManagersApplyUpdatesRequest + regionInstanceGroupManagersApplyUpdatesRequestResource = + RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build(); + + client.applyUpdatesToInstancesRegionInstanceGroupManager( + instanceGroupManager, regionInstanceGroupManagersApplyUpdatesRequestResource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void createInstancesRegionInstanceGroupManagerTest() { @@ -728,6 +834,65 @@ public void listRegionInstanceGroupManagersExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void listErrorsRegionInstanceGroupManagersTest() { + String nextPageToken = ""; + InstanceManagedByIgmError itemsElement = InstanceManagedByIgmError.newBuilder().build(); + List items = Arrays.asList(itemsElement); + RegionInstanceGroupManagersListErrorsResponse expectedResponse = + RegionInstanceGroupManagersListErrorsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllItems(items) + .build(); + mockService.addResponse(expectedResponse); + + ProjectRegionInstanceGroupManagerName instanceGroupManager = + ProjectRegionInstanceGroupManagerName.of( + "[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]"); + + ListErrorsRegionInstanceGroupManagersPagedResponse pagedListResponse = + client.listErrorsRegionInstanceGroupManagers(instanceGroupManager); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + @SuppressWarnings("all") + public void listErrorsRegionInstanceGroupManagersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectRegionInstanceGroupManagerName instanceGroupManager = + ProjectRegionInstanceGroupManagerName.of( + "[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]"); + + client.listErrorsRegionInstanceGroupManagers(instanceGroupManager); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void listManagedInstancesRegionInstanceGroupManagersTest() { diff --git a/src/test/java/com/google/cloud/compute/v1/RegionSslCertificateClientTest.java b/src/test/java/com/google/cloud/compute/v1/RegionSslCertificateClientTest.java index 7b73fa616..eb2122699 100644 --- a/src/test/java/com/google/cloud/compute/v1/RegionSslCertificateClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/RegionSslCertificateClientTest.java @@ -290,9 +290,8 @@ public void insertRegionSslCertificateTest() { mockService.addResponse(expectedResponse); ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); - SslCertificate sslCertificateResource = SslCertificate.newBuilder().build(); - Operation actualResponse = client.insertRegionSslCertificate(region, sslCertificateResource); + Operation actualResponse = client.insertRegionSslCertificate(region); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -320,9 +319,8 @@ public void insertRegionSslCertificateExceptionTest() throws Exception { try { ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); - SslCertificate sslCertificateResource = SslCertificate.newBuilder().build(); - client.insertRegionSslCertificate(region, sslCertificateResource); + client.insertRegionSslCertificate(region); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/ReservationClientTest.java b/src/test/java/com/google/cloud/compute/v1/ReservationClientTest.java index ff18a844c..eb9d0c160 100644 --- a/src/test/java/com/google/cloud/compute/v1/ReservationClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/ReservationClientTest.java @@ -115,10 +115,11 @@ public void aggregatedListReservationsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListReservationsPagedResponse pagedListResponse = - client.aggregatedListReservations(project); + client.aggregatedListReservations(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -149,9 +150,10 @@ public void aggregatedListReservationsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListReservations(project); + client.aggregatedListReservations(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/ResourcePolicyClientTest.java b/src/test/java/com/google/cloud/compute/v1/ResourcePolicyClientTest.java index ec0ab32c5..193d735d4 100644 --- a/src/test/java/com/google/cloud/compute/v1/ResourcePolicyClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/ResourcePolicyClientTest.java @@ -115,10 +115,11 @@ public void aggregatedListResourcePoliciesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListResourcePoliciesPagedResponse pagedListResponse = - client.aggregatedListResourcePolicies(project); + client.aggregatedListResourcePolicies(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -149,9 +150,10 @@ public void aggregatedListResourcePoliciesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListResourcePolicies(project); + client.aggregatedListResourcePolicies(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/RouterClientTest.java b/src/test/java/com/google/cloud/compute/v1/RouterClientTest.java index e17f1935d..1a1fa14da 100644 --- a/src/test/java/com/google/cloud/compute/v1/RouterClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/RouterClientTest.java @@ -119,9 +119,11 @@ public void aggregatedListRoutersTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - AggregatedListRoutersPagedResponse pagedListResponse = client.aggregatedListRouters(project); + AggregatedListRoutersPagedResponse pagedListResponse = + client.aggregatedListRouters(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -152,9 +154,10 @@ public void aggregatedListRoutersExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListRouters(project); + client.aggregatedListRouters(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/SslCertificateClientTest.java b/src/test/java/com/google/cloud/compute/v1/SslCertificateClientTest.java index 4a2780ad8..4be076f39 100644 --- a/src/test/java/com/google/cloud/compute/v1/SslCertificateClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/SslCertificateClientTest.java @@ -107,10 +107,11 @@ public void aggregatedListSslCertificatesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListSslCertificatesPagedResponse pagedListResponse = - client.aggregatedListSslCertificates(project); + client.aggregatedListSslCertificates(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -141,9 +142,10 @@ public void aggregatedListSslCertificatesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListSslCertificates(project); + client.aggregatedListSslCertificates(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -357,9 +359,8 @@ public void insertSslCertificateTest() { mockService.addResponse(expectedResponse); ProjectName project = ProjectName.of("[PROJECT]"); - SslCertificate sslCertificateResource = SslCertificate.newBuilder().build(); - Operation actualResponse = client.insertSslCertificate(project, sslCertificateResource); + Operation actualResponse = client.insertSslCertificate(project); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockService.getRequestPaths(); @@ -387,9 +388,8 @@ public void insertSslCertificateExceptionTest() throws Exception { try { ProjectName project = ProjectName.of("[PROJECT]"); - SslCertificate sslCertificateResource = SslCertificate.newBuilder().build(); - client.insertSslCertificate(project, sslCertificateResource); + client.insertSslCertificate(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/SubnetworkClientTest.java b/src/test/java/com/google/cloud/compute/v1/SubnetworkClientTest.java index 3eb8a13d7..76de191d9 100644 --- a/src/test/java/com/google/cloud/compute/v1/SubnetworkClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/SubnetworkClientTest.java @@ -123,10 +123,11 @@ public void aggregatedListSubnetworksTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListSubnetworksPagedResponse pagedListResponse = - client.aggregatedListSubnetworks(project); + client.aggregatedListSubnetworks(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -157,9 +158,10 @@ public void aggregatedListSubnetworksExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListSubnetworks(project); + client.aggregatedListSubnetworks(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/TargetHttpProxyClientTest.java b/src/test/java/com/google/cloud/compute/v1/TargetHttpProxyClientTest.java index c1890d8d6..c912e5d93 100644 --- a/src/test/java/com/google/cloud/compute/v1/TargetHttpProxyClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/TargetHttpProxyClientTest.java @@ -109,10 +109,11 @@ public void aggregatedListTargetHttpProxiesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListTargetHttpProxiesPagedResponse pagedListResponse = - client.aggregatedListTargetHttpProxies(project); + client.aggregatedListTargetHttpProxies(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); @@ -144,9 +145,10 @@ public void aggregatedListTargetHttpProxiesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListTargetHttpProxies(project); + client.aggregatedListTargetHttpProxies(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/TargetHttpsProxyClientTest.java b/src/test/java/com/google/cloud/compute/v1/TargetHttpsProxyClientTest.java index 8d1dfd7a1..cca2192ff 100644 --- a/src/test/java/com/google/cloud/compute/v1/TargetHttpsProxyClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/TargetHttpsProxyClientTest.java @@ -115,10 +115,11 @@ public void aggregatedListTargetHttpsProxiesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListTargetHttpsProxiesPagedResponse pagedListResponse = - client.aggregatedListTargetHttpsProxies(project); + client.aggregatedListTargetHttpsProxies(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); @@ -150,9 +151,10 @@ public void aggregatedListTargetHttpsProxiesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListTargetHttpsProxies(project); + client.aggregatedListTargetHttpsProxies(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/TargetInstanceClientTest.java b/src/test/java/com/google/cloud/compute/v1/TargetInstanceClientTest.java index 0bea0d4e1..36260672a 100644 --- a/src/test/java/com/google/cloud/compute/v1/TargetInstanceClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/TargetInstanceClientTest.java @@ -107,10 +107,11 @@ public void aggregatedListTargetInstancesTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListTargetInstancesPagedResponse pagedListResponse = - client.aggregatedListTargetInstances(project); + client.aggregatedListTargetInstances(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -141,9 +142,10 @@ public void aggregatedListTargetInstancesExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListTargetInstances(project); + client.aggregatedListTargetInstances(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/TargetPoolClientTest.java b/src/test/java/com/google/cloud/compute/v1/TargetPoolClientTest.java index 9391ea1ba..c334a810d 100644 --- a/src/test/java/com/google/cloud/compute/v1/TargetPoolClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/TargetPoolClientTest.java @@ -309,10 +309,11 @@ public void aggregatedListTargetPoolsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListTargetPoolsPagedResponse pagedListResponse = - client.aggregatedListTargetPools(project); + client.aggregatedListTargetPools(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -343,9 +344,10 @@ public void aggregatedListTargetPoolsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListTargetPools(project); + client.aggregatedListTargetPools(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/TargetVpnGatewayClientTest.java b/src/test/java/com/google/cloud/compute/v1/TargetVpnGatewayClientTest.java index b89b47ab9..f089e6e8f 100644 --- a/src/test/java/com/google/cloud/compute/v1/TargetVpnGatewayClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/TargetVpnGatewayClientTest.java @@ -107,10 +107,11 @@ public void aggregatedListTargetVpnGatewaysTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListTargetVpnGatewaysPagedResponse pagedListResponse = - client.aggregatedListTargetVpnGateways(project); + client.aggregatedListTargetVpnGateways(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); @@ -142,9 +143,10 @@ public void aggregatedListTargetVpnGatewaysExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListTargetVpnGateways(project); + client.aggregatedListTargetVpnGateways(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/UrlMapClientTest.java b/src/test/java/com/google/cloud/compute/v1/UrlMapClientTest.java index 061f575a8..a0d3e35aa 100644 --- a/src/test/java/com/google/cloud/compute/v1/UrlMapClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/UrlMapClientTest.java @@ -116,9 +116,11 @@ public void aggregatedListUrlMapsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - AggregatedListUrlMapsPagedResponse pagedListResponse = client.aggregatedListUrlMaps(project); + AggregatedListUrlMapsPagedResponse pagedListResponse = + client.aggregatedListUrlMaps(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -149,9 +151,10 @@ public void aggregatedListUrlMapsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListUrlMaps(project); + client.aggregatedListUrlMaps(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/VpnGatewayClientTest.java b/src/test/java/com/google/cloud/compute/v1/VpnGatewayClientTest.java index 62b737abd..54917d06c 100644 --- a/src/test/java/com/google/cloud/compute/v1/VpnGatewayClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/VpnGatewayClientTest.java @@ -113,10 +113,11 @@ public void aggregatedListVpnGatewaysTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListVpnGatewaysPagedResponse pagedListResponse = - client.aggregatedListVpnGateways(project); + client.aggregatedListVpnGateways(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -147,9 +148,10 @@ public void aggregatedListVpnGatewaysExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListVpnGateways(project); + client.aggregatedListVpnGateways(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/VpnTunnelClientTest.java b/src/test/java/com/google/cloud/compute/v1/VpnTunnelClientTest.java index 90fe31575..c939da013 100644 --- a/src/test/java/com/google/cloud/compute/v1/VpnTunnelClientTest.java +++ b/src/test/java/com/google/cloud/compute/v1/VpnTunnelClientTest.java @@ -107,10 +107,11 @@ public void aggregatedListVpnTunnelsTest() { .build(); mockService.addResponse(expectedResponse); + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); AggregatedListVpnTunnelsPagedResponse pagedListResponse = - client.aggregatedListVpnTunnels(project); + client.aggregatedListVpnTunnels(includeAllScopes, project); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); @@ -141,9 +142,10 @@ public void aggregatedListVpnTunnelsExceptionTest() throws Exception { mockService.addException(exception); try { + Boolean includeAllScopes = true; ProjectName project = ProjectName.of("[PROJECT]"); - client.aggregatedListVpnTunnels(project); + client.aggregatedListVpnTunnels(includeAllScopes, project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/src/test/java/com/google/cloud/compute/v1/it/ITComputeTest.java b/src/test/java/com/google/cloud/compute/v1/it/ITComputeTest.java index 5f0b490f6..c6230805e 100644 --- a/src/test/java/com/google/cloud/compute/v1/it/ITComputeTest.java +++ b/src/test/java/com/google/cloud/compute/v1/it/ITComputeTest.java @@ -971,7 +971,7 @@ public void listAcceleratorTypesTest() { public void aggregatedListAcceleratorTypesTest() { List typesScopedLists = Lists.newArrayList( - acceleratorTypeClient.aggregatedListAcceleratorTypes(PROJECT_NAME).iterateAll()); + acceleratorTypeClient.aggregatedListAcceleratorTypes(true, PROJECT_NAME).iterateAll()); assertThat(typesScopedLists).isNotNull(); assertThat(typesScopedLists.size()).isGreaterThan(0); assertThat(typesScopedLists.contains(null)).isFalse(); @@ -1011,7 +1011,7 @@ public void listAddressesTest() { @Test public void aggregatedListAddressesTest() { List addressesScopedLists = - Lists.newArrayList(addressClient.aggregatedListAddresses(PROJECT_NAME).iterateAll()); + Lists.newArrayList(addressClient.aggregatedListAddresses(true, PROJECT_NAME).iterateAll()); for (AddressesScopedList addressesScopedList : addressesScopedLists) { List

addresses = addressesScopedList.getAddressesList(); if (addresses != null) { @@ -1039,7 +1039,8 @@ public void listAutoscalersTest() { @Test public void aggregatedListAutoscalersTest() { List autoscalersScopedLists = - Lists.newArrayList(autoscalerClient.aggregatedListAutoscalers(PROJECT_NAME).iterateAll()); + Lists.newArrayList( + autoscalerClient.aggregatedListAutoscalers(true, PROJECT_NAME).iterateAll()); assertNotNull(autoscalersScopedLists); assertThat(autoscalersScopedLists.size()).isGreaterThan(0); assertThat(autoscalersScopedLists.contains(null)).isFalse(); @@ -1101,7 +1102,7 @@ public void removeResourcePoliciesDiskTest() { @Test public void aggregatedListDisksTest() { List disksScopedLists = - Lists.newArrayList(diskClient.aggregatedListDisks(PROJECT_NAME).iterateAll()); + Lists.newArrayList(diskClient.aggregatedListDisks(true, PROJECT_NAME).iterateAll()); for (DisksScopedList disksScopedList : disksScopedLists) { List disks = disksScopedList.getDisksList(); if (null != disks && disks.size() > 0) { @@ -1289,7 +1290,7 @@ public void setTargetForwardingRuleTest() throws Exception { public void aggregatedListForwardingRulesTest() { List forwardingRulesScopedLists = Lists.newArrayList( - forwardingRuleClient.aggregatedListForwardingRules(PROJECT_NAME).iterateAll()); + forwardingRuleClient.aggregatedListForwardingRules(true, PROJECT_NAME).iterateAll()); assertThat(forwardingRulesScopedLists).isNotNull(); assertThat(forwardingRulesScopedLists.size()).isGreaterThan(0); assertThat(forwardingRulesScopedLists.contains(null)).isFalse(); @@ -1334,7 +1335,7 @@ public void listGlobalOperationsTest() { public void aggregatedListGlobalOperationsTest() { List operationsScopedLists = Lists.newArrayList( - globalOperationClient.aggregatedListGlobalOperations(PROJECT_NAME).iterateAll()); + globalOperationClient.aggregatedListGlobalOperations(true, PROJECT_NAME).iterateAll()); assertThat(operationsScopedLists).isNotNull(); assertThat(operationsScopedLists.size()).isGreaterThan(0); assertThat(operationsScopedLists.contains(null)).isFalse(); @@ -1357,7 +1358,8 @@ public void listHealthChecksTest() { @Test public void aggregatedListHealthChecksTest() { List scopedLists = - Lists.newArrayList(healthCheckClient.aggregatedListHealthChecks(PROJECT_NAME).iterateAll()); + Lists.newArrayList( + healthCheckClient.aggregatedListHealthChecks(true, PROJECT_NAME).iterateAll()); Iterator iterator = scopedLists.iterator(); while (iterator.hasNext()) { List checkList = iterator.next().getHealthChecksList(); @@ -1541,11 +1543,12 @@ public void testListDiskTypesWithFilter() { @Test public void testAggregatedListDiskTypes() { AggregatedListDiskTypesPagedResponse pagedListResponse = - diskTypeClient.aggregatedListDiskTypes(PROJECT_NAME); + diskTypeClient.aggregatedListDiskTypes(false, PROJECT_NAME); List diskTypeScopedListIterator = Lists.newArrayList(pagedListResponse.iterateAll()); List diskTypeIterator = new LinkedList<>(); for (DiskTypesScopedList scopedList : diskTypeScopedListIterator) { + assertThat(scopedList.getDiskTypesList()).isNotNull(); diskTypeIterator.addAll(scopedList.getDiskTypesList()); } assertThat(diskTypeIterator.size()).isGreaterThan(0); @@ -1610,7 +1613,7 @@ public void listInstancesInstanceGroupsTest() { public void aggregatedListInstanceGroupsTest() { List scopedLists = Lists.newArrayList( - instanceGroupClient.aggregatedListInstanceGroups(PROJECT_NAME).iterateAll()); + instanceGroupClient.aggregatedListInstanceGroups(true, PROJECT_NAME).iterateAll()); for (InstanceGroupsScopedList instanceGroupsScopedList : scopedLists) { List instanceGroups = instanceGroupsScopedList.getInstanceGroupsList(); if (null != instanceGroups && instanceGroups.size() > 0) { @@ -1662,7 +1665,7 @@ public void listTargetHttpProxiesTest() { public void aggregatedListTargetHttpProxiesTest() { List targetHttpProxiesScopedLists = Lists.newArrayList( - targetHttpProxyClient.aggregatedListTargetHttpProxies(PROJECT_NAME).iterateAll()); + targetHttpProxyClient.aggregatedListTargetHttpProxies(true, PROJECT_NAME).iterateAll()); assertThat(targetHttpProxiesScopedLists).isNotNull(); assertThat(targetHttpProxiesScopedLists.size()).isGreaterThan(0); assertThat(targetHttpProxiesScopedLists.contains(null)).isFalse(); @@ -1692,7 +1695,7 @@ public void listTargetInstancesTest() { public void aggregatedListTargetInstancesTest() { List targetInstancesScopedLists = Lists.newArrayList( - targetInstanceClient.aggregatedListTargetInstances(PROJECT_NAME).iterateAll()); + targetInstanceClient.aggregatedListTargetInstances(true, PROJECT_NAME).iterateAll()); assertNotNull(targetInstancesScopedLists); assertThat(targetInstancesScopedLists.size()).isGreaterThan(0); assertThat(targetInstancesScopedLists.contains(null)).isFalse(); @@ -1761,7 +1764,8 @@ public void setBackupTargetPoolTest() throws Exception { @Test public void aggregatedListTargetPoolsTest() { List targetPoolsScopedLists = - Lists.newArrayList(targetPoolClient.aggregatedListTargetPools(PROJECT_NAME).iterateAll()); + Lists.newArrayList( + targetPoolClient.aggregatedListTargetPools(true, PROJECT_NAME).iterateAll()); for (TargetPoolsScopedList targetPoolsScopedList : targetPoolsScopedLists) { List targetPools = targetPoolsScopedList.getTargetPoolsList(); if (targetPools != null) { @@ -1821,7 +1825,7 @@ public void listUrlMapsTest() { @Test public void aggregatedListUrlMapsTest() { List urlMapsScopedLists = - Lists.newArrayList(urlMapClient.aggregatedListUrlMaps(PROJECT_NAME).iterateAll()); + Lists.newArrayList(urlMapClient.aggregatedListUrlMaps(true, PROJECT_NAME).iterateAll()); assertThat(urlMapsScopedLists).isNotNull(); assertThat(urlMapsScopedLists.size()).isGreaterThan(0); assertThat(urlMapsScopedLists.contains(null)).isFalse(); @@ -1890,7 +1894,7 @@ public void aggregatedListInstanceGroupManagersTest() { List managersScopedLists = Lists.newArrayList( instanceGroupManagerClient - .aggregatedListInstanceGroupManagers(PROJECT_NAME) + .aggregatedListInstanceGroupManagers(true, PROJECT_NAME) .iterateAll()); assertThat(managersScopedLists).isNotNull(); assertThat(managersScopedLists.size()).isGreaterThan(0); @@ -1999,7 +2003,8 @@ public void listMachineTypesTest() { @Test public void aggregatedListMachineTypesTest() { List scopedLists = - Lists.newArrayList(machineTypeClient.aggregatedListMachineTypes(PROJECT_NAME).iterateAll()); + Lists.newArrayList( + machineTypeClient.aggregatedListMachineTypes(true, PROJECT_NAME).iterateAll()); for (MachineTypesScopedList scopedList : scopedLists) { List machineTypes = scopedList.getMachineTypesList(); if (null != machineTypes && machineTypes.size() > 0) { @@ -2043,7 +2048,7 @@ public void listNodeTypesTest() { @Test public void aggregatedListNodeTypesTest() { List nodeTypesScopedLists = - Lists.newArrayList(nodeTypeClient.aggregatedListNodeTypes(PROJECT_NAME).iterateAll()); + Lists.newArrayList(nodeTypeClient.aggregatedListNodeTypes(true, PROJECT_NAME).iterateAll()); assertThat(nodeTypesScopedLists).isNotNull(); assertThat(nodeTypesScopedLists.size()).isGreaterThan(0); assertThat(nodeTypesScopedLists.contains(null)).isFalse(); @@ -2062,7 +2067,7 @@ public void listNodeTemplatesTest() { public void aggregatedListNodeTemplatesTest() { List nodeTemplatesScopedLists = Lists.newArrayList( - nodeTemplateClient.aggregatedListNodeTemplates(PROJECT_NAME).iterateAll()); + nodeTemplateClient.aggregatedListNodeTemplates(true, PROJECT_NAME).iterateAll()); assertThat(nodeTemplatesScopedLists).isNotNull(); assertThat(nodeTemplatesScopedLists.size()).isGreaterThan(0); assertThat(nodeTemplatesScopedLists.contains(null)).isFalse(); @@ -2080,7 +2085,8 @@ public void listNodeGroupsTest() { @Test public void aggregatedListNodeGroupsTest() { List nodeGroupsScopedLists = - Lists.newArrayList(nodeGroupClient.aggregatedListNodeGroups(PROJECT_NAME).iterateAll()); + Lists.newArrayList( + nodeGroupClient.aggregatedListNodeGroups(true, PROJECT_NAME).iterateAll()); assertThat(nodeGroupsScopedLists).isNotNull(); assertThat(nodeGroupsScopedLists.size()).isGreaterThan(0); assertThat(nodeGroupsScopedLists.contains(null)).isFalse(); diff --git a/synth.metadata b/synth.metadata index 41ce753b2..babda543f 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,26 +1,30 @@ { - "updateTime": "2020-03-13T21:46:32.722745Z", + "updateTime": "2020-03-28T22:18:01.022852Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "1.1.0", - "dockerImage": "googleapis/artman@sha256:f54b7644a1d2e7a37b23f5c0dfe9bba473e41c675002a507a244389e27487ca9" - } - }, { "git": { "name": "discovery-artifact-manager", "remote": "https://github.com/googleapis/discovery-artifact-manager.git", - "sha": "c91df79c3e704ee25fd759f8927bf1c2719969a8", - "log": "c91df79c3e704ee25fd759f8927bf1c2719969a8\nAutogenerated Discovery document update\n\ne8fe1635178dbf699b6ab9a7eee26d67a32e67a6\nAutogenerated Discovery document update\n\nae1c03936232b57f6a7f5a63d2aeac95751f6f87\nAutogenerated Discovery document update\n\nfdaad7c840063e694f8ed49d76d4377b4ca99c7e\nAutogenerated Discovery document update\n\n68b57429de7d539cd8eb300cd97fc958b4b08df5\nAutogenerated Discovery document update\n\n1d447947e219a2ab9e3a8ad003a7612e08e3dabd\nAutogenerated Discovery document update\n\nb9fceaf0864b709033d0067b28c01b35965182e1\nAutogenerated Discovery document update\n\n" + "sha": "719a847d02865d80d6d6a5a66ffcd158015684d3", + "log": "719a847d02865d80d6d6a5a66ffcd158015684d3\nFix bazel generation for discogapic clients. (#141)\n\nAlso update compute_gapic.yaml.\n\nNote, the checked in cumput_gapic.yaml is not used for bazel generation and is kept here only for backward compatibility with artman generation. Bazel generates the gapic file on the fly.\nabe9fcd78c3ef527716eb1bfafb8c77c851c8e4d\nAutogenerated Discovery document update\n\n6c4449ad5b3eff4360311d71894522d9b03e5972\nAutogenerated Discovery document update\n\n7fe0e39ae3ba1f4405702e619e200d5dceabf8e1\nAutogenerated Discovery document update\n\n4661a533444bd68f37f84286b14e3505d27aba91\nAutogenerated Discovery document update\n\nd6430d09ef332c10c50e8a0475b5c973fad19e18\nAutogenerated Discovery document update\n\nbd35ad3863562dea4265ac88c66463028e956441\nAutogenerated Discovery document update\n\nafc14ac6568f527341bdcfd63a83ca4e429a6d68\nAutogenerated Discovery document update\n\ne6442c057fba0ee709f175476e145b71e584e41f\nAutogenerated Discovery document update\n\n8ee582db975ceea20932dd1da91ae5e421ca79d1\nAutogenerated Discovery document update\n\nbc5a72184951eae70dc0a0c74f582e328a471f22\nAutogenerated Discovery document update\n\n9ab844f1ac91a48527a4da70ca3fb0cf8dba5143\nAutogenerated Discovery document update\n\n4c973f85695c4c886b115049a099897025ecba58\nAutogenerated Discovery document update\n\ndcaf8e37e14a9fcc250f297ea289de8dcc65c54b\nAutogenerated Discovery document update\n\ncaee08bf581a606428f6dee9a444ceab2856cc74\nAutogenerated Discovery document update\n\n9acf934b1896d8a79f3a9ad44e667b0a60efed90\nAutogenerated Discovery document update\n\nc590e06b58dc4391a966844be76d27ae73c88289\nAutogenerated Discovery document update\n\n0915c02a3bba7aa11cf4c8cf782e3858aa518afd\nAutogenerated Discovery document update\n\n18c66fb2c8da551ff39c4b25368e7a9501134f34\nAutogenerated Discovery document update\n\nf051c487e5c455149e31ad233f1a06ea77c8053c\nAutogenerated Discovery document update\n\n7de1d731a57f42cb0a9ea558fd02bce316df194f\nAutogenerated Discovery document update\n\n6f84e2594bce34469fb68266be69bb99a122852b\nAutogenerated Discovery document update\n\n30016ff40504fd8b999c6992eebfd401e6b2fe83\nAutogenerated Discovery document update\n\ne205b6cefe3f1c39b43211710ea8837c3b4bdf98\nAutogenerated Discovery document update\n\n1e72ab1750e856792222e57d86b3719ccc349b72\nAutogenerated Discovery document update\n\n274949076299d39281de6ded15d449dfb4696ed5\nAutogenerated Discovery document update\n\ne57382379465f8dddd04d4fc8c7c3a9b3ddbb7ce\nAutogenerated Discovery document update\n\ne02eb4abfd243c66e4d12bce27da289efb9ee874\nAutogenerated Discovery document update\n\ne26553cdced03cb0fd70cdc38c10af8c1855ed2e\nAutogenerated Discovery document update\n\n6a9c802f966fb24a1984898587c01cec16039a3c\nAutogenerated Discovery document update\n\nf4c17f2f163536f0715b5a78d92049aea9489400\nAutogenerated Discovery document update\n\n5d66e80dbd9da73eb1619470fbc14add2e2288d0\nAutogenerated Discovery document update\n\nf87f2262c83219944186c6b1096717ef13ff3b33\nAutogenerated Discovery document update\n\n32d70aceb9a34eb189f3f2da787e25eb8013287b\nAutogenerated Discovery document update\n\n049b3b797ff3c45212e18ef69465dc1eea02a300\nAutogenerated Discovery document update\n\n64e215399d15ef1f53f91650c468f1410389ff0f\nAutogenerated Discovery document update\n\n8d8afb2d319b206f9745b9d5d41d071fb859ceb3\nAutogenerated Discovery document update\n\nc8c7f31725e0610e0765e0b3e2917ea5ffb25b1e\nAutogenerated Discovery document update\n\n5e58abc60d03a9399182dfca8b6c0e110b9ce6b6\nAutogenerated Discovery document update\n\n1acb9ec6ce845e4ae6faab458a2597dcf3017020\nAutogenerated Discovery document update\n\na8ebae6500bd0948b5dfe32a77e866bb34e25346\nAutogenerated Discovery document update\n\n" } }, { - "template": { - "name": "java_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "e36822bfa0acb355502dab391b8ef9c4f30208d8" + } + } + ], + "destinations": [ + { + "client": { + "source": "discovery-artifact-manager", + "apiName": "compute", + "apiVersion": "v1", + "language": "java", + "generator": "bazel" } } ] diff --git a/synth.py b/synth.py index f66c0055f..33419d1a0 100644 --- a/synth.py +++ b/synth.py @@ -20,20 +20,22 @@ AUTOSYNTH_MULTIPLE_COMMITS = True -gapic = gcp.DiscoGAPICGenerator() +gapic = gcp.GAPICBazel() service = 'compute' versions = ['v1'] -config_pattern = '/gapic/google/compute/artman_compute.yaml' for version in versions: library = gapic.java_library( service=service, version=version, - config_path=config_pattern.format(version=version), - artman_output_name='') + bazel_target=f'//gapic/google/{service}/{version}:google-cloud-{service}-{version}-java', + discogapic = True, + ) - s.copy(library / f'gapic-google-cloud-{service}-{version}/src', 'src') + library = library / f'google-cloud-{service}-{version}-java' + + s.copy(library / f'gapic-google-cloud-{service}-{version}-java/src', 'src') java.format_code('./src')