Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat(v1beta1): add endpoint to OperationMetadata, upgrade_info to IsI…
Browse files Browse the repository at this point in the history
…nstanceUpgradeableResponse (#47)

* feat: update third party protos with URLs and latest fields

PiperOrigin-RevId: 333377977

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Sep 23 14:49:46 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 989670e868daaad6ce0306e6ec1b9ff40659c19e
Source-Link: googleapis/googleapis@989670e

* chore: allow proto interface changes

Co-authored-by: Jeff Ching <chingor@google.com>
  • Loading branch information
yoshi-automation and chingor13 committed Sep 30, 2020
1 parent b4dff3d commit 5e741b1
Show file tree
Hide file tree
Showing 20 changed files with 645 additions and 94 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -12,4 +12,6 @@ target/

# python utilities
*.pyc
__pycache__
__pycache__

.flattened-pom.xml
Expand Up @@ -40,7 +40,7 @@

// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
* Service Description: API service for Cloud AI Platform Notebooks.
* Service Description: API v1beta1 service for Cloud AI Platform Notebooks.
*
* <p>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:
Expand Down
Expand Up @@ -21,7 +21,7 @@
*
* <p>===================== NotebookServiceClient =====================
*
* <p>Service Description: API service for Cloud AI Platform Notebooks.
* <p>Service Description: API v1beta1 service for Cloud AI Platform Notebooks.
*
* <p>Sample for NotebookServiceClient:
*
Expand Down
Expand Up @@ -1034,10 +1034,12 @@ public void reportInstanceInfoExceptionTest() throws Exception {
public void isInstanceUpgradeableTest() {
boolean upgradeable = true;
String upgradeVersion = "upgradeVersion1040155061";
String upgradeInfo = "upgradeInfo-1337232143";
IsInstanceUpgradeableResponse expectedResponse =
IsInstanceUpgradeableResponse.newBuilder()
.setUpgradeable(upgradeable)
.setUpgradeVersion(upgradeVersion)
.setUpgradeInfo(upgradeInfo)
.build();
mockNotebookService.addResponse(expectedResponse);

Expand Down
Expand Up @@ -26,7 +26,7 @@
*
*
* <pre>
* API service for Cloud AI Platform Notebooks.
* API v1beta1 service for Cloud AI Platform Notebooks.
* </pre>
*/
@javax.annotation.Generated(
Expand Down Expand Up @@ -969,7 +969,7 @@ public NotebookServiceFutureStub newStub(
*
*
* <pre>
* API service for Cloud AI Platform Notebooks.
* API v1beta1 service for Cloud AI Platform Notebooks.
* </pre>
*/
public abstract static class NotebookServiceImplBase implements io.grpc.BindableService {
Expand Down Expand Up @@ -1362,7 +1362,7 @@ public final io.grpc.ServerServiceDefinition bindService() {
*
*
* <pre>
* API service for Cloud AI Platform Notebooks.
* API v1beta1 service for Cloud AI Platform Notebooks.
* </pre>
*/
public static final class NotebookServiceStub
Expand Down Expand Up @@ -1697,7 +1697,7 @@ public void deleteEnvironment(
*
*
* <pre>
* API service for Cloud AI Platform Notebooks.
* API v1beta1 service for Cloud AI Platform Notebooks.
* </pre>
*/
public static final class NotebookServiceBlockingStub
Expand Down Expand Up @@ -1962,7 +1962,7 @@ public com.google.longrunning.Operation deleteEnvironment(
*
*
* <pre>
* API service for Cloud AI Platform Notebooks.
* API v1beta1 service for Cloud AI Platform Notebooks.
* </pre>
*/
public static final class NotebookServiceFutureStub
Expand Down
19 changes: 19 additions & 0 deletions proto-google-cloud-notebooks-v1beta1/clirr-ignored-differences.xml
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/notebooks/v1beta1/*OrBuilder</className>
<method>* get*(*)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/notebooks/v1beta1/*OrBuilder</className>
<method>boolean contains*(*)</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/cloud/notebooks/v1beta1/*OrBuilder</className>
<method>boolean has*(*)</method>
</difference>
</differences>
Expand Up @@ -794,6 +794,36 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
* <code>DELETED = 6;</code>
*/
DELETED(6),
/**
*
*
* <pre>
* The instance is upgrading.
* </pre>
*
* <code>UPGRADING = 7;</code>
*/
UPGRADING(7),
/**
*
*
* <pre>
* The instance is being created.
* </pre>
*
* <code>INITIALIZING = 8;</code>
*/
INITIALIZING(8),
/**
*
*
* <pre>
* The instance is getting registered.
* </pre>
*
* <code>REGISTERING = 9;</code>
*/
REGISTERING(9),
UNRECOGNIZED(-1),
;

Expand Down Expand Up @@ -868,6 +898,36 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
* <code>DELETED = 6;</code>
*/
public static final int DELETED_VALUE = 6;
/**
*
*
* <pre>
* The instance is upgrading.
* </pre>
*
* <code>UPGRADING = 7;</code>
*/
public static final int UPGRADING_VALUE = 7;
/**
*
*
* <pre>
* The instance is being created.
* </pre>
*
* <code>INITIALIZING = 8;</code>
*/
public static final int INITIALIZING_VALUE = 8;
/**
*
*
* <pre>
* The instance is getting registered.
* </pre>
*
* <code>REGISTERING = 9;</code>
*/
public static final int REGISTERING_VALUE = 9;

public final int getNumber() {
if (this == UNRECOGNIZED) {
Expand Down Expand Up @@ -907,6 +967,12 @@ public static State forNumber(int value) {
return STOPPED;
case 6:
return DELETED;
case 7:
return UPGRADING;
case 8:
return INITIALIZING;
case 9:
return REGISTERING;
default:
return null;
}
Expand Down Expand Up @@ -1000,6 +1066,16 @@ public enum DiskType implements com.google.protobuf.ProtocolMessageEnum {
* <code>PD_SSD = 2;</code>
*/
PD_SSD(2),
/**
*
*
* <pre>
* Balanced persistent disk type.
* </pre>
*
* <code>PD_BALANCED = 3;</code>
*/
PD_BALANCED(3),
UNRECOGNIZED(-1),
;

Expand Down Expand Up @@ -1033,6 +1109,16 @@ public enum DiskType implements com.google.protobuf.ProtocolMessageEnum {
* <code>PD_SSD = 2;</code>
*/
public static final int PD_SSD_VALUE = 2;
/**
*
*
* <pre>
* Balanced persistent disk type.
* </pre>
*
* <code>PD_BALANCED = 3;</code>
*/
public static final int PD_BALANCED_VALUE = 3;

public final int getNumber() {
if (this == UNRECOGNIZED) {
Expand Down Expand Up @@ -1064,6 +1150,8 @@ public static DiskType forNumber(int value) {
return PD_STANDARD;
case 2:
return PD_SSD;
case 3:
return PD_BALANCED;
default:
return null;
}
Expand Down
Expand Up @@ -58,7 +58,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "/api/resource.proto\0320google/cloud/notebo"
+ "oks/v1beta1/environment.proto\032\037google/pr"
+ "otobuf/timestamp.proto\032\034google/api/annot"
+ "ations.proto\"\370\017\n\010Instance\022\021\n\004name\030\001 \001(\tB"
+ "ations.proto\"\274\020\n\010Instance\022\021\n\004name\030\001 \001(\tB"
+ "\003\340A\003\022;\n\010vm_image\030\002 \001(\0132\'.google.cloud.no"
+ "tebooks.v1beta1.VmImageH\000\022I\n\017container_i"
+ "mage\030\003 \001(\0132..google.cloud.notebooks.v1be"
Expand Down Expand Up @@ -100,22 +100,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\003\022\023\n\017NVIDIA_TESLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T"
+ "4\020\005\022\027\n\023NVIDIA_TESLA_T4_VWS\020\010\022\031\n\025NVIDIA_T"
+ "ESLA_P100_VWS\020\t\022\027\n\023NVIDIA_TESLA_P4_VWS\020\n"
+ "\022\n\n\006TPU_V2\020\006\022\n\n\006TPU_V3\020\007\"r\n\005State\022\025\n\021STA"
+ "TE_UNSPECIFIED\020\000\022\014\n\010STARTING\020\001\022\020\n\014PROVIS"
+ "IONING\020\002\022\n\n\006ACTIVE\020\003\022\014\n\010STOPPING\020\004\022\013\n\007ST"
+ "OPPED\020\005\022\013\n\007DELETED\020\006\"B\n\010DiskType\022\031\n\025DISK"
+ "_TYPE_UNSPECIFIED\020\000\022\017\n\013PD_STANDARD\020\001\022\n\n\006"
+ "PD_SSD\020\002\"E\n\016DiskEncryption\022\037\n\033DISK_ENCRY"
+ "PTION_UNSPECIFIED\020\000\022\010\n\004GMEK\020\001\022\010\n\004CMEK\020\002:"
+ "O\352AL\n!notebooks.googleapis.com/Instance\022"
+ "\'projects/{project}/instances/{instance}"
+ "B\r\n\013environmentB\344\001\n\"com.google.cloud.not"
+ "ebooks.v1beta1B\rInstanceProtoP\001ZGgoogle."
+ "golang.org/genproto/googleapis/cloud/not"
+ "ebooks/v1beta1;notebooks\252\002\036Google.Cloud."
+ "Notebooks.V1Beta1\312\002\036Google\\Cloud\\Noteboo"
+ "ks\\V1Beta1\352\002!Google::Cloud::Notebooks::V"
+ "1beta1b\006proto3"
+ "\022\n\n\006TPU_V2\020\006\022\n\n\006TPU_V3\020\007\"\244\001\n\005State\022\025\n\021ST"
+ "ATE_UNSPECIFIED\020\000\022\014\n\010STARTING\020\001\022\020\n\014PROVI"
+ "SIONING\020\002\022\n\n\006ACTIVE\020\003\022\014\n\010STOPPING\020\004\022\013\n\007S"
+ "TOPPED\020\005\022\013\n\007DELETED\020\006\022\r\n\tUPGRADING\020\007\022\020\n\014"
+ "INITIALIZING\020\010\022\017\n\013REGISTERING\020\t\"S\n\010DiskT"
+ "ype\022\031\n\025DISK_TYPE_UNSPECIFIED\020\000\022\017\n\013PD_STA"
+ "NDARD\020\001\022\n\n\006PD_SSD\020\002\022\017\n\013PD_BALANCED\020\003\"E\n\016"
+ "DiskEncryption\022\037\n\033DISK_ENCRYPTION_UNSPEC"
+ "IFIED\020\000\022\010\n\004GMEK\020\001\022\010\n\004CMEK\020\002:O\352AL\n!notebo"
+ "oks.googleapis.com/Instance\022\'projects/{p"
+ "roject}/instances/{instance}B\r\n\013environm"
+ "entB\344\001\n\"com.google.cloud.notebooks.v1bet"
+ "a1B\rInstanceProtoP\001ZGgoogle.golang.org/g"
+ "enproto/googleapis/cloud/notebooks/v1bet"
+ "a1;notebooks\252\002\036Google.Cloud.Notebooks.V1"
+ "Beta1\312\002\036Google\\Cloud\\Notebooks\\V1beta1\352\002"
+ "!Google::Cloud::Notebooks::V1beta1b\006prot"
+ "o3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand Down

0 comments on commit 5e741b1

Please sign in to comment.