Skip to content

Commit

Permalink
feat: [cloudshell] add CloudShellErrorCode.ENVIRONMENT_UNAVAILABLE en…
Browse files Browse the repository at this point in the history
…um value (#8806)

* feat: add CloudShellErrorCode.ENVIRONMENT_UNAVAILABLE enum value

PiperOrigin-RevId: 489095106

Source-Link: googleapis/googleapis@0184330

Source-Link: googleapis/googleapis-gen@bb774fb
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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and alicejli committed Nov 18, 2022
1 parent 5a3ad9a commit c056f08
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 50 deletions.
32 changes: 16 additions & 16 deletions java-shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-shell</artifactId>
<version>2.4.0</version>
<version>2.5.0</version>
</dependency>
```

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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ public enum CloudShellErrorCode implements com.google.protobuf.ProtocolMessageEn
* <code>QUOTA_EXCEEDED = 5;</code>
*/
QUOTA_EXCEEDED(5),
/**
*
*
* <pre>
* The Cloud Shell environment is unavailable and cannot be connected to at
* the moment.
* </pre>
*
* <code>ENVIRONMENT_UNAVAILABLE = 6;</code>
*/
ENVIRONMENT_UNAVAILABLE(6),
UNRECOGNIZED(-1),
;

Expand Down Expand Up @@ -189,6 +200,17 @@ public enum CloudShellErrorCode implements com.google.protobuf.ProtocolMessageEn
* <code>QUOTA_EXCEEDED = 5;</code>
*/
public static final int QUOTA_EXCEEDED_VALUE = 5;
/**
*
*
* <pre>
* The Cloud Shell environment is unavailable and cannot be connected to at
* the moment.
* </pre>
*
* <code>ENVIRONMENT_UNAVAILABLE = 6;</code>
*/
public static final int ENVIRONMENT_UNAVAILABLE_VALUE = 6;

public final int getNumber() {
if (this == UNRECOGNIZED) {
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit c056f08

Please sign in to comment.