From 6af59a5254830755cf0efff32b0a1a006a2ca3d7 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 6 Sep 2023 22:56:12 -0400 Subject: [PATCH] chore: regenerate workstations client (#18024) Generated in GitHub action: https://togithub.com/googleapis/googleapis/google-api-java-client-services/actions/workflows/codegen.yaml --- .../v1beta/2.0.0/README.md | 4 +- .../v1beta/model/EphemeralDirectory.java | 92 +++++++++++ .../v1beta/model/GceInstance.java | 30 ++++ .../v1beta/model/GcePersistentDisk.java | 154 ++++++++++++++++++ .../v1beta/model/Workstation.java | 27 +++ .../v1beta/model/WorkstationConfig.java | 63 +++++++ .../v1beta/2.0.0/pom.xml | 4 +- 7 files changed, 370 insertions(+), 4 deletions(-) create mode 100644 clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/EphemeralDirectory.java create mode 100644 clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/GcePersistentDisk.java diff --git a/clients/google-api-services-workstations/v1beta/2.0.0/README.md b/clients/google-api-services-workstations/v1beta/2.0.0/README.md index badffc0f342..c29300e2e01 100644 --- a/clients/google-api-services-workstations/v1beta/2.0.0/README.md +++ b/clients/google-api-services-workstations/v1beta/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-workstations - v1beta-rev20230802-2.0.0 + v1beta-rev20230904-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-workstations:v1beta-rev20230802-2.0.0' + implementation 'com.google.apis:google-api-services-workstations:v1beta-rev20230904-2.0.0' } ``` diff --git a/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/EphemeralDirectory.java b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/EphemeralDirectory.java new file mode 100644 index 00000000000..b5e77533cc1 --- /dev/null +++ b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/EphemeralDirectory.java @@ -0,0 +1,92 @@ +/* + * Licensed under the Apache License, Version 2.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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.workstations.v1beta.model; + +/** + * An ephemeral directory which won't persist across workstation sessions. It is freshly created on + * every workstation start operation. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Workstations API. For a detailed explanation + * see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class EphemeralDirectory extends com.google.api.client.json.GenericJson { + + /** + * An EphemeralDirectory backed by a Compute Engine persistent disk. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GcePersistentDisk gcePd; + + /** + * Required. Location of this directory in the running workstation. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String mountPath; + + /** + * An EphemeralDirectory backed by a Compute Engine persistent disk. + * @return value or {@code null} for none + */ + public GcePersistentDisk getGcePd() { + return gcePd; + } + + /** + * An EphemeralDirectory backed by a Compute Engine persistent disk. + * @param gcePd gcePd or {@code null} for none + */ + public EphemeralDirectory setGcePd(GcePersistentDisk gcePd) { + this.gcePd = gcePd; + return this; + } + + /** + * Required. Location of this directory in the running workstation. + * @return value or {@code null} for none + */ + public java.lang.String getMountPath() { + return mountPath; + } + + /** + * Required. Location of this directory in the running workstation. + * @param mountPath mountPath or {@code null} for none + */ + public EphemeralDirectory setMountPath(java.lang.String mountPath) { + this.mountPath = mountPath; + return this; + } + + @Override + public EphemeralDirectory set(String fieldName, Object value) { + return (EphemeralDirectory) super.set(fieldName, value); + } + + @Override + public EphemeralDirectory clone() { + return (EphemeralDirectory) super.clone(); + } + +} diff --git a/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/GceInstance.java b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/GceInstance.java index 90dea36ebe4..5eee2c36bda 100644 --- a/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/GceInstance.java +++ b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/GceInstance.java @@ -135,6 +135,15 @@ public final class GceInstance extends com.google.api.client.json.GenericJson { @com.google.api.client.util.Key private java.lang.String serviceAccount; + /** + * Optional. Scopes to grant to the service_account. Various scopes are automatically added based + * on feature usage. When specified, users of workstations under this configuration must have + * `iam.serviceAccounts.actAs` on the service account. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List serviceAccountScopes; + /** * Optional. A set of Compute Engine Shielded instance options. * The value may be {@code null}. @@ -377,6 +386,27 @@ public GceInstance setServiceAccount(java.lang.String serviceAccount) { return this; } + /** + * Optional. Scopes to grant to the service_account. Various scopes are automatically added based + * on feature usage. When specified, users of workstations under this configuration must have + * `iam.serviceAccounts.actAs` on the service account. + * @return value or {@code null} for none + */ + public java.util.List getServiceAccountScopes() { + return serviceAccountScopes; + } + + /** + * Optional. Scopes to grant to the service_account. Various scopes are automatically added based + * on feature usage. When specified, users of workstations under this configuration must have + * `iam.serviceAccounts.actAs` on the service account. + * @param serviceAccountScopes serviceAccountScopes or {@code null} for none + */ + public GceInstance setServiceAccountScopes(java.util.List serviceAccountScopes) { + this.serviceAccountScopes = serviceAccountScopes; + return this; + } + /** * Optional. A set of Compute Engine Shielded instance options. * @return value or {@code null} for none diff --git a/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/GcePersistentDisk.java b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/GcePersistentDisk.java new file mode 100644 index 00000000000..ef1814c837e --- /dev/null +++ b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/GcePersistentDisk.java @@ -0,0 +1,154 @@ +/* + * Licensed under the Apache License, Version 2.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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.workstations.v1beta.model; + +/** + * An EphemeralDirectory is backed by a Compute Engine persistent disk. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Workstations API. For a detailed explanation + * see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GcePersistentDisk extends com.google.api.client.json.GenericJson { + + /** + * Optional. Type of the disk to use. Defaults to `"pd-standard"`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String diskType; + + /** + * Optional. Whether the disk is read only. If true, the disk may be shared by multiple VMs and + * source_snapshot must be set. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean readOnly; + + /** + * Optional. Name of the disk image to use as the source for the disk. Must be empty if + * source_snapshot is set. Updating source_image will update content in the ephemeral directory + * after the workstation is restarted. This field is mutable. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String sourceImage; + + /** + * Optional. Name of the snapshot to use as the source for the disk. Must be empty if source_image + * is set. Updating source_snapshot will update content in the ephemeral directory after the + * workstation is restarted. This field is mutable. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String sourceSnapshot; + + /** + * Optional. Type of the disk to use. Defaults to `"pd-standard"`. + * @return value or {@code null} for none + */ + public java.lang.String getDiskType() { + return diskType; + } + + /** + * Optional. Type of the disk to use. Defaults to `"pd-standard"`. + * @param diskType diskType or {@code null} for none + */ + public GcePersistentDisk setDiskType(java.lang.String diskType) { + this.diskType = diskType; + return this; + } + + /** + * Optional. Whether the disk is read only. If true, the disk may be shared by multiple VMs and + * source_snapshot must be set. + * @return value or {@code null} for none + */ + public java.lang.Boolean getReadOnly() { + return readOnly; + } + + /** + * Optional. Whether the disk is read only. If true, the disk may be shared by multiple VMs and + * source_snapshot must be set. + * @param readOnly readOnly or {@code null} for none + */ + public GcePersistentDisk setReadOnly(java.lang.Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + /** + * Optional. Name of the disk image to use as the source for the disk. Must be empty if + * source_snapshot is set. Updating source_image will update content in the ephemeral directory + * after the workstation is restarted. This field is mutable. + * @return value or {@code null} for none + */ + public java.lang.String getSourceImage() { + return sourceImage; + } + + /** + * Optional. Name of the disk image to use as the source for the disk. Must be empty if + * source_snapshot is set. Updating source_image will update content in the ephemeral directory + * after the workstation is restarted. This field is mutable. + * @param sourceImage sourceImage or {@code null} for none + */ + public GcePersistentDisk setSourceImage(java.lang.String sourceImage) { + this.sourceImage = sourceImage; + return this; + } + + /** + * Optional. Name of the snapshot to use as the source for the disk. Must be empty if source_image + * is set. Updating source_snapshot will update content in the ephemeral directory after the + * workstation is restarted. This field is mutable. + * @return value or {@code null} for none + */ + public java.lang.String getSourceSnapshot() { + return sourceSnapshot; + } + + /** + * Optional. Name of the snapshot to use as the source for the disk. Must be empty if source_image + * is set. Updating source_snapshot will update content in the ephemeral directory after the + * workstation is restarted. This field is mutable. + * @param sourceSnapshot sourceSnapshot or {@code null} for none + */ + public GcePersistentDisk setSourceSnapshot(java.lang.String sourceSnapshot) { + this.sourceSnapshot = sourceSnapshot; + return this; + } + + @Override + public GcePersistentDisk set(String fieldName, Object value) { + return (GcePersistentDisk) super.set(fieldName, value); + } + + @Override + public GcePersistentDisk clone() { + return (GcePersistentDisk) super.clone(); + } + +} diff --git a/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/Workstation.java b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/Workstation.java index e5c644bda39..66c04810f94 100644 --- a/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/Workstation.java +++ b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/Workstation.java @@ -106,6 +106,14 @@ public final class Workstation extends com.google.api.client.json.GenericJson { @com.google.api.client.util.Key private java.lang.Boolean reconciling; + /** + * Output only. Time when this workstation was most recently successfully started, regardless of + * the workstation's initial state. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String startTime; + /** * Output only. Current state of the workstation. * The value may be {@code null}. @@ -309,6 +317,25 @@ public Workstation setReconciling(java.lang.Boolean reconciling) { return this; } + /** + * Output only. Time when this workstation was most recently successfully started, regardless of + * the workstation's initial state. + * @return value or {@code null} for none + */ + public String getStartTime() { + return startTime; + } + + /** + * Output only. Time when this workstation was most recently successfully started, regardless of + * the workstation's initial state. + * @param startTime startTime or {@code null} for none + */ + public Workstation setStartTime(String startTime) { + this.startTime = startTime; + return this; + } + /** * Output only. Current state of the workstation. * @return value or {@code null} for none diff --git a/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/WorkstationConfig.java b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/WorkstationConfig.java index 043d43eec4e..05f02265833 100644 --- a/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/WorkstationConfig.java +++ b/clients/google-api-services-workstations/v1beta/2.0.0/com/google/api/services/workstations/v1beta/model/WorkstationConfig.java @@ -118,6 +118,19 @@ public final class WorkstationConfig extends com.google.api.client.json.GenericJ @com.google.api.client.util.Key private CustomerEncryptionKey encryptionKey; + /** + * Optional. Ephemeral directories which won't persist across workstation sessions. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List ephemeralDirectories; + + static { + // hack to force ProGuard to consider EphemeralDirectory used, since otherwise it would be stripped out + // see https://github.com/google/google-api-java-client/issues/543 + com.google.api.client.util.Data.nullOf(EphemeralDirectory.class); + } + /** * Optional. Checksum computed by the server. May be sent on update and delete requests to make * sure that the client has an up-to-date value before proceeding. @@ -197,6 +210,16 @@ public final class WorkstationConfig extends com.google.api.client.json.GenericJ @com.google.api.client.util.Key private java.lang.Boolean reconciling; + /** + * Optional. Immutable. Specifies the zones used to replicate the VM and disk resources within the + * region. If set, exactly two zones within the workstation cluster's region must be specified—for + * example, `['us-central1-a', 'us-central1-f']`. If this field is empty, two default zones within + * the region are used. Immutable after the workstation configuration is created. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List replicaZones; + /** * Optional. Number of seconds that a workstation can run until it is automatically shut down. We * recommend that workstations be shut down daily to reduce costs and so that security updates can @@ -409,6 +432,23 @@ public WorkstationConfig setEncryptionKey(CustomerEncryptionKey encryptionKey) { return this; } + /** + * Optional. Ephemeral directories which won't persist across workstation sessions. + * @return value or {@code null} for none + */ + public java.util.List getEphemeralDirectories() { + return ephemeralDirectories; + } + + /** + * Optional. Ephemeral directories which won't persist across workstation sessions. + * @param ephemeralDirectories ephemeralDirectories or {@code null} for none + */ + public WorkstationConfig setEphemeralDirectories(java.util.List ephemeralDirectories) { + this.ephemeralDirectories = ephemeralDirectories; + return this; + } + /** * Optional. Checksum computed by the server. May be sent on update and delete requests to make * sure that the client has an up-to-date value before proceeding. @@ -567,6 +607,29 @@ public WorkstationConfig setReconciling(java.lang.Boolean reconciling) { return this; } + /** + * Optional. Immutable. Specifies the zones used to replicate the VM and disk resources within the + * region. If set, exactly two zones within the workstation cluster's region must be specified—for + * example, `['us-central1-a', 'us-central1-f']`. If this field is empty, two default zones within + * the region are used. Immutable after the workstation configuration is created. + * @return value or {@code null} for none + */ + public java.util.List getReplicaZones() { + return replicaZones; + } + + /** + * Optional. Immutable. Specifies the zones used to replicate the VM and disk resources within the + * region. If set, exactly two zones within the workstation cluster's region must be specified—for + * example, `['us-central1-a', 'us-central1-f']`. If this field is empty, two default zones within + * the region are used. Immutable after the workstation configuration is created. + * @param replicaZones replicaZones or {@code null} for none + */ + public WorkstationConfig setReplicaZones(java.util.List replicaZones) { + this.replicaZones = replicaZones; + return this; + } + /** * Optional. Number of seconds that a workstation can run until it is automatically shut down. We * recommend that workstations be shut down daily to reduce costs and so that security updates can diff --git a/clients/google-api-services-workstations/v1beta/2.0.0/pom.xml b/clients/google-api-services-workstations/v1beta/2.0.0/pom.xml index eae1222745a..ed304879b40 100644 --- a/clients/google-api-services-workstations/v1beta/2.0.0/pom.xml +++ b/clients/google-api-services-workstations/v1beta/2.0.0/pom.xml @@ -8,8 +8,8 @@ com.google.apis google-api-services-workstations - v1beta-rev20230802-2.0.0 - Cloud Workstations API v1beta-rev20230802-2.0.0 + v1beta-rev20230904-2.0.0 + Cloud Workstations API v1beta-rev20230904-2.0.0 jar 2011