From c056f0897eaf99835a192bc0ef922db405d1a7e1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:39:52 -0500 Subject: [PATCH] feat: [cloudshell] add CloudShellErrorCode.ENVIRONMENT_UNAVAILABLE enum value (#8806) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add CloudShellErrorCode.ENVIRONMENT_UNAVAILABLE enum value PiperOrigin-RevId: 489095106 Source-Link: https://github.com/googleapis/googleapis/commit/0184330e57d223dee21501ff4c9a08e9624add47 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bb774fb04d2f19fdb86fc27d2bcec77b0b6fa996 Copy-Tag: eyJwIjoiamF2YS1zaGVsbC8uT3dsQm90LnlhbWwiLCJoIjoiYmI3NzRmYjA0ZDJmMTlmZGI4NmZjMjdkMmJjZWM3N2IwYjZmYTk5NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- java-shell/README.md | 32 ++++----- .../shell/v1/CloudShellErrorDetails.java | 24 +++++++ .../cloud/shell/v1/CloudShellProto.java | 66 +++++++++---------- .../google/cloud/shell/v1/cloudshell.proto | 6 +- 4 files changed, 78 insertions(+), 50 deletions(-) diff --git a/java-shell/README.md b/java-shell/README.md index 953d0a525195..9d157f6bf530 100644 --- a/java-shell/README.md +++ b/java-shell/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-shell - 2.4.0 + 2.5.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-shell:2.4.0' +implementation 'com.google.cloud:google-cloud-shell:2.5.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-shell" % "2.4.0" +libraryDependencies += "com.google.cloud" % "google-cloud-shell" % "2.5.0" ``` ## Authentication @@ -159,16 +159,16 @@ Java is a registered trademark of Oracle and/or its affiliates. [product-docs]: https://cloud.google.com/shell/docs [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-shell/latest/overview -[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java7.svg -[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java7.html -[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java8.svg -[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java8.html -[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java8-osx.svg -[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java8-osx.html -[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java8-win.svg -[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java8-win.html -[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java11.svg -[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-shell/java11.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-shell.svg [maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-shell&core=gav @@ -180,9 +180,9 @@ Java is a registered trademark of Oracle and/or its affiliates. [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects [cloud-sdk]: https://cloud.google.com/sdk/ [troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting -[contributing]: https://github.com/googleapis/java-shell/blob/main/CONTRIBUTING.md -[code-of-conduct]: https://github.com/googleapis/java-shell/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct -[license]: https://github.com/googleapis/java-shell/blob/main/LICENSE +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE [enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudshell.googleapis.com [libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM diff --git a/java-shell/proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/CloudShellErrorDetails.java b/java-shell/proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/CloudShellErrorDetails.java index 92416e927485..bf2db5e77c19 100644 --- a/java-shell/proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/CloudShellErrorDetails.java +++ b/java-shell/proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/CloudShellErrorDetails.java @@ -132,6 +132,17 @@ public enum CloudShellErrorCode implements com.google.protobuf.ProtocolMessageEn * QUOTA_EXCEEDED = 5; */ QUOTA_EXCEEDED(5), + /** + * + * + *
+     * The Cloud Shell environment is unavailable and cannot be connected to at
+     * the moment.
+     * 
+ * + * ENVIRONMENT_UNAVAILABLE = 6; + */ + ENVIRONMENT_UNAVAILABLE(6), UNRECOGNIZED(-1), ; @@ -189,6 +200,17 @@ public enum CloudShellErrorCode implements com.google.protobuf.ProtocolMessageEn * QUOTA_EXCEEDED = 5; */ public static final int QUOTA_EXCEEDED_VALUE = 5; + /** + * + * + *
+     * The Cloud Shell environment is unavailable and cannot be connected to at
+     * the moment.
+     * 
+ * + * ENVIRONMENT_UNAVAILABLE = 6; + */ + public static final int ENVIRONMENT_UNAVAILABLE_VALUE = 6; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -224,6 +246,8 @@ public static CloudShellErrorCode forNumber(int value) { return TOS_VIOLATION; case 5: return QUOTA_EXCEEDED; + case 6: + return ENVIRONMENT_UNAVAILABLE; default: return null; } diff --git a/java-shell/proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/CloudShellProto.java b/java-shell/proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/CloudShellProto.java index 0cd8414db62f..4c8ce94a405e 100644 --- a/java-shell/proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/CloudShellProto.java +++ b/java-shell/proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/CloudShellProto.java @@ -145,44 +145,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "yMetadata\":\n\026RemovePublicKeyRequest\022\023\n\013e" + "nvironment\030\001 \001(\t\022\013\n\003key\030\002 \001(\t\"\031\n\027RemoveP" + "ublicKeyResponse\"\031\n\027RemovePublicKeyMetad" - + "ata\"\201\002\n\026CloudShellErrorDetails\022O\n\004code\030\001" + + "ata\"\236\002\n\026CloudShellErrorDetails\022O\n\004code\030\001" + " \001(\0162A.google.cloud.shell.v1.CloudShellE" - + "rrorDetails.CloudShellErrorCode\"\225\001\n\023Clou" + + "rrorDetails.CloudShellErrorCode\"\262\001\n\023Clou" + "dShellErrorCode\022&\n\"CLOUD_SHELL_ERROR_COD" + "E_UNSPECIFIED\020\000\022\025\n\021IMAGE_UNAVAILABLE\020\001\022\030" + "\n\024CLOUD_SHELL_DISABLED\020\002\022\021\n\rTOS_VIOLATIO" - + "N\020\004\022\022\n\016QUOTA_EXCEEDED\020\0052\324\010\n\021CloudShellSe" - + "rvice\022\224\001\n\016GetEnvironment\022,.google.cloud." - + "shell.v1.GetEnvironmentRequest\032\".google." - + "cloud.shell.v1.Environment\"0\202\323\344\223\002#\022!/v1/" - + "{name=users/*/environments/*}\332A\004name\022\314\001\n" - + "\020StartEnvironment\022..google.cloud.shell.v" - + "1.StartEnvironmentRequest\032\035.google.longr" - + "unning.Operation\"i\202\323\344\223\002,\"\'/v1/{name=user" - + "s/*/environments/*}:start:\001*\312A4\n\030StartEn" - + "vironmentResponse\022\030StartEnvironmentMetad" - + "ata\022\340\001\n\024AuthorizeEnvironment\0222.google.cl" - + "oud.shell.v1.AuthorizeEnvironmentRequest" - + "\032\035.google.longrunning.Operation\"u\202\323\344\223\0020\"" - + "+/v1/{name=users/*/environments/*}:autho" - + "rize:\001*\312A<\n\034AuthorizeEnvironmentResponse" - + "\022\034AuthorizeEnvironmentMetadata\022\312\001\n\014AddPu" - + "blicKey\022*.google.cloud.shell.v1.AddPubli" + + "N\020\004\022\022\n\016QUOTA_EXCEEDED\020\005\022\033\n\027ENVIRONMENT_U" + + "NAVAILABLE\020\0062\324\010\n\021CloudShellService\022\224\001\n\016G" + + "etEnvironment\022,.google.cloud.shell.v1.Ge" + + "tEnvironmentRequest\032\".google.cloud.shell" + + ".v1.Environment\"0\202\323\344\223\002#\022!/v1/{name=users" + + "/*/environments/*}\332A\004name\022\314\001\n\020StartEnvir" + + "onment\022..google.cloud.shell.v1.StartEnvi" + + "ronmentRequest\032\035.google.longrunning.Oper" + + "ation\"i\202\323\344\223\002,\"\'/v1/{name=users/*/environ" + + "ments/*}:start:\001*\312A4\n\030StartEnvironmentRe" + + "sponse\022\030StartEnvironmentMetadata\022\340\001\n\024Aut" + + "horizeEnvironment\0222.google.cloud.shell.v" + + "1.AuthorizeEnvironmentRequest\032\035.google.l" + + "ongrunning.Operation\"u\202\323\344\223\0020\"+/v1/{name=" + + "users/*/environments/*}:authorize:\001*\312A<\n" + + "\034AuthorizeEnvironmentResponse\022\034Authorize" + + "EnvironmentMetadata\022\312\001\n\014AddPublicKey\022*.g" + + "oogle.cloud.shell.v1.AddPublicKeyRequest" + + "\032\035.google.longrunning.Operation\"o\202\323\344\223\002:\"" + + "5/v1/{environment=users/*/environments/*" + + "}:addPublicKey:\001*\312A,\n\024AddPublicKeyRespon" + + "se\022\024AddPublicKeyMetadata\022\331\001\n\017RemovePubli" + + "cKey\022-.google.cloud.shell.v1.RemovePubli" + "cKeyRequest\032\035.google.longrunning.Operati" - + "on\"o\202\323\344\223\002:\"5/v1/{environment=users/*/env" - + "ironments/*}:addPublicKey:\001*\312A,\n\024AddPubl" - + "icKeyResponse\022\024AddPublicKeyMetadata\022\331\001\n\017" - + "RemovePublicKey\022-.google.cloud.shell.v1." - + "RemovePublicKeyRequest\032\035.google.longrunn" - + "ing.Operation\"x\202\323\344\223\002=\"8/v1/{environment=" - + "users/*/environments/*}:removePublicKey:" - + "\001*\312A2\n\027RemovePublicKeyResponse\022\027RemovePu" - + "blicKeyMetadata\032M\312A\031cloudshell.googleapi" - + "s.com\322A.https://www.googleapis.com/auth/" - + "cloud-platformBj\n\031com.google.cloud.shell" - + ".v1B\017CloudShellProtoP\001Z:google.golang.or" - + "g/genproto/googleapis/cloud/shell/v1;she" - + "llb\006proto3" + + "on\"x\202\323\344\223\002=\"8/v1/{environment=users/*/env" + + "ironments/*}:removePublicKey:\001*\312A2\n\027Remo" + + "vePublicKeyResponse\022\027RemovePublicKeyMeta" + + "data\032M\312A\031cloudshell.googleapis.com\322A.htt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "ormBj\n\031com.google.cloud.shell.v1B\017CloudS" + + "hellProtoP\001Z:google.golang.org/genproto/" + + "googleapis/cloud/shell/v1;shellb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-shell/proto-google-cloud-shell-v1/src/main/proto/google/cloud/shell/v1/cloudshell.proto b/java-shell/proto-google-cloud-shell-v1/src/main/proto/google/cloud/shell/v1/cloudshell.proto index 6d4f6c6b01e5..cee2cb1887df 100644 --- a/java-shell/proto-google-cloud-shell-v1/src/main/proto/google/cloud/shell/v1/cloudshell.proto +++ b/java-shell/proto-google-cloud-shell-v1/src/main/proto/google/cloud/shell/v1/cloudshell.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -380,6 +380,10 @@ message CloudShellErrorDetails { // The user has exhausted their weekly Cloud Shell quota, and Cloud Shell // will be disabled until the quota resets. QUOTA_EXCEEDED = 5; + + // The Cloud Shell environment is unavailable and cannot be connected to at + // the moment. + ENVIRONMENT_UNAVAILABLE = 6; } // Code indicating the specific error the occurred.