From a00008264fca1d8d266632ad8de9aaf3a815852c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:54:13 +0000 Subject: [PATCH 01/10] chore: release 0.5.1-SNAPSHOT (#256) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-notebooks-bom/pom.xml | 8 ++++---- google-cloud-notebooks/pom.xml | 4 ++-- grpc-google-cloud-notebooks-v1beta1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-notebooks-v1beta1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/google-cloud-notebooks-bom/pom.xml b/google-cloud-notebooks-bom/pom.xml index 5da3a820..5c74a999 100644 --- a/google-cloud-notebooks-bom/pom.xml +++ b/google-cloud-notebooks-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-notebooks-bom - 0.5.0 + 0.5.1-SNAPSHOT pom com.google.cloud @@ -56,17 +56,17 @@ com.google.cloud google-cloud-notebooks - 0.5.0 + 0.5.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT diff --git a/google-cloud-notebooks/pom.xml b/google-cloud-notebooks/pom.xml index 8bee6d8c..1d7b8e04 100644 --- a/google-cloud-notebooks/pom.xml +++ b/google-cloud-notebooks/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-notebooks - 0.5.0 + 0.5.1-SNAPSHOT jar Google AI Platform Notebooks https://github.com/googleapis/java-notebooks @@ -11,7 +11,7 @@ com.google.cloud google-cloud-notebooks-parent - 0.5.0 + 0.5.1-SNAPSHOT google-cloud-notebooks diff --git a/grpc-google-cloud-notebooks-v1beta1/pom.xml b/grpc-google-cloud-notebooks-v1beta1/pom.xml index d0e48666..280622cf 100644 --- a/grpc-google-cloud-notebooks-v1beta1/pom.xml +++ b/grpc-google-cloud-notebooks-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT grpc-google-cloud-notebooks-v1beta1 GRPC library for grpc-google-cloud-notebooks-v1beta1 com.google.cloud google-cloud-notebooks-parent - 0.5.0 + 0.5.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 90e05f43..1c79f8b5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-notebooks-parent pom - 0.5.0 + 0.5.1-SNAPSHOT Google AI Platform Notebooks Parent https://github.com/googleapis/java-notebooks @@ -61,17 +61,17 @@ com.google.cloud google-cloud-notebooks - 0.5.0 + 0.5.1-SNAPSHOT com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT diff --git a/proto-google-cloud-notebooks-v1beta1/pom.xml b/proto-google-cloud-notebooks-v1beta1/pom.xml index ff4869ce..c752193f 100644 --- a/proto-google-cloud-notebooks-v1beta1/pom.xml +++ b/proto-google-cloud-notebooks-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT proto-google-cloud-notebooks-v1beta1 PROTO library for proto-google-cloud-notebooks-v1beta1 com.google.cloud google-cloud-notebooks-parent - 0.5.0 + 0.5.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index c8f38750..17afd91d 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-notebooks - 0.5.0 + 0.5.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 7ed30982..609c70b6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-notebooks:0.5.0:0.5.0 -grpc-google-cloud-notebooks-v1beta1:0.5.0:0.5.0 -proto-google-cloud-notebooks-v1beta1:0.5.0:0.5.0 +google-cloud-notebooks:0.5.0:0.5.1-SNAPSHOT +grpc-google-cloud-notebooks-v1beta1:0.5.0:0.5.1-SNAPSHOT +proto-google-cloud-notebooks-v1beta1:0.5.0:0.5.1-SNAPSHOT From e66dae03ef60e8eeae51a459cb966766bccb7e3b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Sep 2021 20:16:20 +0200 Subject: [PATCH 02/10] chore(deps): update dependency com.google.cloud:google-cloud-notebooks to v0.5.0 (#257) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-notebooks](https://togithub.com/googleapis/java-notebooks) | `0.4.1` -> `0.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-notebooks/0.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-notebooks/0.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-notebooks/0.5.0/compatibility-slim/0.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-notebooks/0.5.0/confidence-slim/0.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-notebooks ### [`v0.5.0`](https://togithub.com/googleapis/java-notebooks/blob/master/CHANGELOG.md#​050-httpswwwgithubcomgoogleapisjava-notebookscomparev041v050-2021-09-14) [Compare Source](https://togithub.com/googleapis/java-notebooks/compare/v0.4.1...v0.5.0) ##### Features - Remove use of deprecated gradle command in java README ([#​1196](https://www.togithub.com/googleapis/java-notebooks/issues/1196)) ([#​241](https://www.togithub.com/googleapis/java-notebooks/issues/241)) ([3ce8cb2](https://www.github.com/googleapis/java-notebooks/commit/3ce8cb24810809ac82272882435508f0d2e723bf)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#​245](https://www.togithub.com/googleapis/java-notebooks/issues/245)) ([b410a2e](https://www.github.com/googleapis/java-notebooks/commit/b410a2e3367e43d1d2938c4cdcea5fb3d9b74029)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#​254](https://www.togithub.com/googleapis/java-notebooks/issues/254)) ([2758446](https://www.github.com/googleapis/java-notebooks/commit/2758446958d8da7241549ef290b08ee4e857e8f0)) ##### [0.4.1](https://www.github.com/googleapis/java-notebooks/compare/v0.4.0...v0.4.1) (2021-08-25) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.0.1 ([#​231](https://www.togithub.com/googleapis/java-notebooks/issues/231)) ([bd0444d](https://www.github.com/googleapis/java-notebooks/commit/bd0444d1942d57e105418d0bd01d664ec8c6a000)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#​235](https://www.togithub.com/googleapis/java-notebooks/issues/235)) ([e3fd67b](https://www.github.com/googleapis/java-notebooks/commit/e3fd67b1b00b5a8651f2ca30766a76dd72951aec))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-notebooks). --- README.md | 6 +++--- samples/install-without-bom/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dd9fd4cc..7631fc8c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-notebooks - 0.4.1 + 0.5.0 ``` @@ -30,13 +30,13 @@ If you are using Maven, add this to your pom.xml file: If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-notebooks:0.4.1' +implementation 'com.google.cloud:google-cloud-notebooks:0.5.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-notebooks" % "0.4.1" +libraryDependencies += "com.google.cloud" % "google-cloud-notebooks" % "0.5.0" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 677a3270..70eddbb2 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-notebooks - 0.4.1 + 0.5.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 73a751aa..95d983c0 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-notebooks - 0.4.1 + 0.5.0 From 28ce44f5c390c4de2d366f283a59927f220c09c7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 15:02:10 +0000 Subject: [PATCH 03/10] feat: added support for Notebooks v1 (#242) - [ ] Regenerate this pull request now. Committer: @gogasca PiperOrigin-RevId: 393792683 Source-Link: https://github.com/googleapis/googleapis/commit/03ce2ebf5a3d7753ad074bfe53acea5c136748ce Source-Link: https://github.com/googleapis/googleapis-gen/commit/faf1b9ce43cc020c9a2dbffd5212bcfa2fd11b80 --- google-cloud-notebooks-bom/pom.xml | 10 + google-cloud-notebooks/pom.xml | 9 + .../v1/ManagedNotebookServiceClient.java | 1293 ++ .../v1/ManagedNotebookServiceSettings.java | 361 + .../notebooks/v1/NotebookServiceClient.java | 3391 +++ .../notebooks/v1/NotebookServiceSettings.java | 804 + .../cloud/notebooks/v1/gapic_metadata.json | 150 + .../cloud/notebooks/v1/package-info.java | 52 + ...ManagedNotebookServiceCallableFactory.java | 113 + .../stub/GrpcManagedNotebookServiceStub.java | 514 + .../GrpcNotebookServiceCallableFactory.java | 113 + .../v1/stub/GrpcNotebookServiceStub.java | 1508 ++ .../v1/stub/ManagedNotebookServiceStub.java | 132 + .../ManagedNotebookServiceStubSettings.java | 869 + .../v1/stub/NotebookServiceStub.java | 363 + .../v1/stub/NotebookServiceStubSettings.java | 2347 ++ .../v1/ManagedNotebookServiceClientTest.java | 765 + .../v1/MockManagedNotebookService.java | 59 + .../v1/MockManagedNotebookServiceImpl.java | 248 + .../notebooks/v1/MockNotebookService.java | 59 + .../notebooks/v1/MockNotebookServiceImpl.java | 733 + .../v1/NotebookServiceClientTest.java | 2483 +++ grpc-google-cloud-notebooks-v1/pom.xml | 69 + .../google/cloud/location/LocationsGrpc.java | 476 + .../v1/ManagedNotebookServiceGrpc.java | 1297 ++ .../notebooks/v1/NotebookServiceGrpc.java | 3971 ++++ pom.xml | 12 + .../clirr-ignored-differences.xml | 33 + proto-google-cloud-notebooks-v1/pom.xml | 42 + .../cloud/location/GetLocationRequest.java | 634 + .../location/GetLocationRequestOrBuilder.java | 50 + .../cloud/location/ListLocationsRequest.java | 1082 + .../ListLocationsRequestOrBuilder.java | 113 + .../cloud/location/ListLocationsResponse.java | 1126 + .../ListLocationsResponseOrBuilder.java | 101 + .../com/google/cloud/location/Location.java | 1615 ++ .../cloud/location/LocationOrBuilder.java | 201 + .../google/cloud/location/LocationsProto.java | 150 + .../cloud/notebooks/v1/ContainerImage.java | 829 + .../notebooks/v1/ContainerImageOrBuilder.java | 79 + .../v1/CreateEnvironmentRequest.java | 1139 + .../v1/CreateEnvironmentRequestOrBuilder.java | 122 + .../notebooks/v1/CreateExecutionRequest.java | 1137 + .../v1/CreateExecutionRequestOrBuilder.java | 122 + .../notebooks/v1/CreateInstanceRequest.java | 1123 + .../v1/CreateInstanceRequestOrBuilder.java | 118 + .../notebooks/v1/CreateRuntimeRequest.java | 1132 + .../v1/CreateRuntimeRequestOrBuilder.java | 119 + .../notebooks/v1/CreateScheduleRequest.java | 1137 + .../v1/CreateScheduleRequestOrBuilder.java | 122 + .../v1/DeleteEnvironmentRequest.java | 644 + .../v1/DeleteEnvironmentRequestOrBuilder.java | 52 + .../notebooks/v1/DeleteExecutionRequest.java | 657 + .../v1/DeleteExecutionRequestOrBuilder.java | 56 + .../notebooks/v1/DeleteInstanceRequest.java | 643 + .../v1/DeleteInstanceRequestOrBuilder.java | 52 + .../notebooks/v1/DeleteRuntimeRequest.java | 657 + .../v1/DeleteRuntimeRequestOrBuilder.java | 56 + .../notebooks/v1/DeleteScheduleRequest.java | 657 + .../v1/DeleteScheduleRequestOrBuilder.java | 56 + .../cloud/notebooks/v1/EncryptionConfig.java | 657 + .../v1/EncryptionConfigOrBuilder.java | 56 + .../cloud/notebooks/v1/Environment.java | 2179 ++ .../notebooks/v1/EnvironmentOrBuilder.java | 243 + .../cloud/notebooks/v1/EnvironmentProto.java | 126 + .../com/google/cloud/notebooks/v1/Event.java | 1009 + .../cloud/notebooks/v1/EventOrBuilder.java | 85 + .../google/cloud/notebooks/v1/EventProto.java | 72 + .../google/cloud/notebooks/v1/Execution.java | 2711 +++ .../cloud/notebooks/v1/ExecutionName.java | 223 + .../notebooks/v1/ExecutionOrBuilder.java | 294 + .../cloud/notebooks/v1/ExecutionProto.java | 202 + .../cloud/notebooks/v1/ExecutionTemplate.java | 5720 +++++ .../v1/ExecutionTemplateOrBuilder.java | 526 + .../notebooks/v1/GetEnvironmentRequest.java | 643 + .../v1/GetEnvironmentRequestOrBuilder.java | 52 + .../notebooks/v1/GetExecutionRequest.java | 657 + .../v1/GetExecutionRequestOrBuilder.java | 56 + .../v1/GetInstanceHealthRequest.java | 658 + .../v1/GetInstanceHealthRequestOrBuilder.java | 56 + .../v1/GetInstanceHealthResponse.java | 1277 ++ .../GetInstanceHealthResponseOrBuilder.java | 153 + .../notebooks/v1/GetInstanceRequest.java | 642 + .../v1/GetInstanceRequestOrBuilder.java | 52 + .../cloud/notebooks/v1/GetRuntimeRequest.java | 656 + .../v1/GetRuntimeRequestOrBuilder.java | 56 + .../notebooks/v1/GetScheduleRequest.java | 656 + .../v1/GetScheduleRequestOrBuilder.java | 56 + .../google/cloud/notebooks/v1/Instance.java | 18298 ++++++++++++++++ .../cloud/notebooks/v1/InstanceConfig.java | 731 + .../notebooks/v1/InstanceConfigOrBuilder.java | 65 + .../notebooks/v1/InstanceConfigProto.java | 68 + .../cloud/notebooks/v1/InstanceName.java | 192 + .../cloud/notebooks/v1/InstanceOrBuilder.java | 1254 ++ .../cloud/notebooks/v1/InstanceProto.java | 330 + .../v1/IsInstanceUpgradeableRequest.java | 644 + ...IsInstanceUpgradeableRequestOrBuilder.java | 52 + .../v1/IsInstanceUpgradeableResponse.java | 1106 + ...sInstanceUpgradeableResponseOrBuilder.java | 119 + .../notebooks/v1/ListEnvironmentsRequest.java | 913 + .../v1/ListEnvironmentsRequestOrBuilder.java | 90 + .../v1/ListEnvironmentsResponse.java | 1415 ++ .../v1/ListEnvironmentsResponseOrBuilder.java | 155 + .../notebooks/v1/ListExecutionsRequest.java | 1305 ++ .../v1/ListExecutionsRequestOrBuilder.java | 150 + .../notebooks/v1/ListExecutionsResponse.java | 1437 ++ .../v1/ListExecutionsResponseOrBuilder.java | 163 + .../notebooks/v1/ListInstancesRequest.java | 919 + .../v1/ListInstancesRequestOrBuilder.java | 92 + .../notebooks/v1/ListInstancesResponse.java | 1437 ++ .../v1/ListInstancesResponseOrBuilder.java | 163 + .../notebooks/v1/ListRuntimesRequest.java | 933 + .../v1/ListRuntimesRequestOrBuilder.java | 96 + .../notebooks/v1/ListRuntimesResponse.java | 1436 ++ .../v1/ListRuntimesResponseOrBuilder.java | 163 + .../notebooks/v1/ListSchedulesRequest.java | 1291 ++ .../v1/ListSchedulesRequestOrBuilder.java | 146 + .../notebooks/v1/ListSchedulesResponse.java | 1437 ++ .../v1/ListSchedulesResponseOrBuilder.java | 163 + .../google/cloud/notebooks/v1/LocalDisk.java | 3972 ++++ .../v1/LocalDiskInitializeParams.java | 1632 ++ .../LocalDiskInitializeParamsOrBuilder.java | 184 + .../notebooks/v1/LocalDiskOrBuilder.java | 442 + .../cloud/notebooks/v1/LocationName.java | 192 + .../notebooks/v1/ManagedNotebooksProto.java | 278 + .../cloud/notebooks/v1/NotebooksProto.java | 891 + .../cloud/notebooks/v1/OperationMetadata.java | 1993 ++ .../v1/OperationMetadataOrBuilder.java | 236 + .../notebooks/v1/RegisterInstanceRequest.java | 844 + .../v1/RegisterInstanceRequestOrBuilder.java | 83 + .../v1/ReportInstanceInfoRequest.java | 1169 + .../ReportInstanceInfoRequestOrBuilder.java | 138 + .../v1/ReportRuntimeEventRequest.java | 1127 + .../ReportRuntimeEventRequestOrBuilder.java | 121 + .../notebooks/v1/ReservationAffinity.java | 1270 ++ .../v1/ReservationAffinityOrBuilder.java | 130 + .../notebooks/v1/ResetInstanceRequest.java | 643 + .../v1/ResetInstanceRequestOrBuilder.java | 52 + .../notebooks/v1/ResetRuntimeRequest.java | 643 + .../v1/ResetRuntimeRequestOrBuilder.java | 52 + .../notebooks/v1/RollbackInstanceRequest.java | 830 + .../v1/RollbackInstanceRequestOrBuilder.java | 79 + .../google/cloud/notebooks/v1/Runtime.java | 3273 +++ .../v1/RuntimeAcceleratorConfig.java | 1086 + .../v1/RuntimeAcceleratorConfigOrBuilder.java | 63 + .../notebooks/v1/RuntimeAccessConfig.java | 1129 + .../v1/RuntimeAccessConfigOrBuilder.java | 102 + .../cloud/notebooks/v1/RuntimeMetrics.java | 810 + .../notebooks/v1/RuntimeMetricsOrBuilder.java | 89 + .../cloud/notebooks/v1/RuntimeName.java | 223 + .../cloud/notebooks/v1/RuntimeOrBuilder.java | 339 + .../cloud/notebooks/v1/RuntimeProto.java | 434 + .../v1/RuntimeShieldedInstanceConfig.java | 761 + ...untimeShieldedInstanceConfigOrBuilder.java | 71 + .../notebooks/v1/RuntimeSoftwareConfig.java | 1489 ++ .../v1/RuntimeSoftwareConfigOrBuilder.java | 188 + .../google/cloud/notebooks/v1/Schedule.java | 3230 +++ .../cloud/notebooks/v1/ScheduleName.java | 223 + .../cloud/notebooks/v1/ScheduleOrBuilder.java | 365 + .../cloud/notebooks/v1/ScheduleProto.java | 108 + .../v1/SetInstanceAcceleratorRequest.java | 918 + ...etInstanceAcceleratorRequestOrBuilder.java | 97 + .../v1/SetInstanceLabelsRequest.java | 979 + .../v1/SetInstanceLabelsRequestOrBuilder.java | 111 + .../v1/SetInstanceMachineTypeRequest.java | 830 + ...etInstanceMachineTypeRequestOrBuilder.java | 79 + .../notebooks/v1/StartInstanceRequest.java | 643 + .../v1/StartInstanceRequestOrBuilder.java | 52 + .../notebooks/v1/StartRuntimeRequest.java | 643 + .../v1/StartRuntimeRequestOrBuilder.java | 52 + .../notebooks/v1/StopInstanceRequest.java | 643 + .../v1/StopInstanceRequestOrBuilder.java | 52 + .../notebooks/v1/StopRuntimeRequest.java | 642 + .../v1/StopRuntimeRequestOrBuilder.java | 52 + .../notebooks/v1/SwitchRuntimeRequest.java | 1106 + .../v1/SwitchRuntimeRequestOrBuilder.java | 112 + .../notebooks/v1/TriggerScheduleRequest.java | 657 + .../v1/TriggerScheduleRequestOrBuilder.java | 56 + .../v1/UpdateInstanceConfigRequest.java | 921 + .../UpdateInstanceConfigRequestOrBuilder.java | 87 + .../UpdateShieldedInstanceConfigRequest.java | 966 + ...hieldedInstanceConfigRequestOrBuilder.java | 91 + .../v1/UpgradeInstanceInternalRequest.java | 834 + ...gradeInstanceInternalRequestOrBuilder.java | 79 + .../notebooks/v1/UpgradeInstanceRequest.java | 643 + .../v1/UpgradeInstanceRequestOrBuilder.java | 52 + .../cloud/notebooks/v1/VirtualMachine.java | 1098 + .../notebooks/v1/VirtualMachineConfig.java | 4925 +++++ .../v1/VirtualMachineConfigOrBuilder.java | 731 + .../notebooks/v1/VirtualMachineOrBuilder.java | 110 + .../google/cloud/notebooks/v1/VmImage.java | 1197 + .../cloud/notebooks/v1/VmImageOrBuilder.java | 131 + .../google/cloud/location/locations.proto | 108 + .../cloud/notebooks/v1/environment.proto | 96 + .../google/cloud/notebooks/v1/event.proto | 42 + .../google/cloud/notebooks/v1/execution.proto | 321 + .../google/cloud/notebooks/v1/instance.proto | 520 + .../cloud/notebooks/v1/instance_config.proto | 35 + .../cloud/notebooks/v1/managed_service.proto | 283 + .../google/cloud/notebooks/v1/runtime.proto | 535 + .../google/cloud/notebooks/v1/schedule.proto | 107 + .../google/cloud/notebooks/v1/service.proto | 931 + versions.txt | 2 + 203 files changed, 148146 insertions(+) create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceClient.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceSettings.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceClient.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceSettings.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/gapic_metadata.json create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/package-info.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcManagedNotebookServiceCallableFactory.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcManagedNotebookServiceStub.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcNotebookServiceCallableFactory.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcNotebookServiceStub.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/ManagedNotebookServiceStub.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/ManagedNotebookServiceStubSettings.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/NotebookServiceStub.java create mode 100644 google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/NotebookServiceStubSettings.java create mode 100644 google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceClientTest.java create mode 100644 google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockManagedNotebookService.java create mode 100644 google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockManagedNotebookServiceImpl.java create mode 100644 google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockNotebookService.java create mode 100644 google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockNotebookServiceImpl.java create mode 100644 google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/NotebookServiceClientTest.java create mode 100644 grpc-google-cloud-notebooks-v1/pom.xml create mode 100644 grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationsGrpc.java create mode 100644 grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceGrpc.java create mode 100644 grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceGrpc.java create mode 100644 proto-google-cloud-notebooks-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-notebooks-v1/pom.xml create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/GetLocationRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsResponse.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/Location.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationsProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ContainerImage.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ContainerImageOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateEnvironmentRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateEnvironmentRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateExecutionRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateExecutionRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateRuntimeRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateRuntimeRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateScheduleRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateScheduleRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteEnvironmentRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteEnvironmentRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteExecutionRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteExecutionRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteRuntimeRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteRuntimeRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteScheduleRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteScheduleRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EncryptionConfig.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EncryptionConfigOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Environment.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EnvironmentOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EnvironmentProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Event.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EventOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EventProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Execution.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionName.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionTemplate.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionTemplateOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetEnvironmentRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetEnvironmentRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetExecutionRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetExecutionRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthResponse.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthResponseOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetRuntimeRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetRuntimeRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetScheduleRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetScheduleRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Instance.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfig.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfigOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfigProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceName.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableResponse.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableResponseOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsResponse.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsResponseOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsResponse.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsResponseOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesResponse.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesResponseOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesResponse.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesResponseOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesResponse.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesResponseOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDisk.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskInitializeParams.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskInitializeParamsOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocationName.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebooksProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/NotebooksProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/OperationMetadata.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/OperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RegisterInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RegisterInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportInstanceInfoRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportInstanceInfoRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportRuntimeEventRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportRuntimeEventRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReservationAffinity.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReservationAffinityOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetRuntimeRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetRuntimeRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RollbackInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RollbackInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Runtime.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAcceleratorConfig.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAcceleratorConfigOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAccessConfig.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAccessConfigOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeMetrics.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeMetricsOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeName.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeShieldedInstanceConfig.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeShieldedInstanceConfigOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeSoftwareConfig.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeSoftwareConfigOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Schedule.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleName.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleProto.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceAcceleratorRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceAcceleratorRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceLabelsRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceLabelsRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceMachineTypeRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceMachineTypeRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartRuntimeRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartRuntimeRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopRuntimeRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopRuntimeRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SwitchRuntimeRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SwitchRuntimeRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/TriggerScheduleRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/TriggerScheduleRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateInstanceConfigRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateInstanceConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateShieldedInstanceConfigRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateShieldedInstanceConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceInternalRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceInternalRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceRequest.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceRequestOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachine.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineConfig.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineConfigOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VmImage.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VmImageOrBuilder.java create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/location/locations.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/environment.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/event.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/execution.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/instance.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/instance_config.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/managed_service.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/runtime.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/schedule.proto create mode 100644 proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/service.proto diff --git a/google-cloud-notebooks-bom/pom.xml b/google-cloud-notebooks-bom/pom.xml index 5c74a999..637adf33 100644 --- a/google-cloud-notebooks-bom/pom.xml +++ b/google-cloud-notebooks-bom/pom.xml @@ -63,11 +63,21 @@ grpc-google-cloud-notebooks-v1beta1 0.5.1-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-notebooks-v1 + 0.5.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-notebooks-v1beta1 0.5.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-notebooks-v1 + 0.5.1-SNAPSHOT +
diff --git a/google-cloud-notebooks/pom.xml b/google-cloud-notebooks/pom.xml index 1d7b8e04..25d7ba9b 100644 --- a/google-cloud-notebooks/pom.xml +++ b/google-cloud-notebooks/pom.xml @@ -42,6 +42,10 @@ proto-google-common-protos
+ + com.google.api.grpc + proto-google-cloud-notebooks-v1 + com.google.api.grpc proto-google-cloud-notebooks-v1beta1 @@ -79,6 +83,11 @@ grpc-google-cloud-notebooks-v1beta1 test + + com.google.api.grpc + grpc-google-cloud-notebooks-v1 + test + com.google.api diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceClient.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceClient.java new file mode 100644 index 00000000..b6036db7 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceClient.java @@ -0,0 +1,1293 @@ +/* + * Copyright 2021 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.notebooks.v1; + +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.longrunning.OperationFuture; +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.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.notebooks.v1.stub.ManagedNotebookServiceStub; +import com.google.cloud.notebooks.v1.stub.ManagedNotebookServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: API v1 service for Managed Notebooks. + * + *

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: + * + *

{@code
+ * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+ *     ManagedNotebookServiceClient.create()) {
+ *   RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]");
+ *   Runtime response = managedNotebookServiceClient.getRuntime(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ManagedNotebookServiceClient 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 ManagedNotebookServiceSettings + * to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * ManagedNotebookServiceSettings managedNotebookServiceSettings =
+ *     ManagedNotebookServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ManagedNotebookServiceClient managedNotebookServiceClient =
+ *     ManagedNotebookServiceClient.create(managedNotebookServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ManagedNotebookServiceSettings managedNotebookServiceSettings =
+ *     ManagedNotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ManagedNotebookServiceClient managedNotebookServiceClient =
+ *     ManagedNotebookServiceClient.create(managedNotebookServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ManagedNotebookServiceClient implements BackgroundResource { + private final ManagedNotebookServiceSettings settings; + private final ManagedNotebookServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of ManagedNotebookServiceClient with default settings. */ + public static final ManagedNotebookServiceClient create() throws IOException { + return create(ManagedNotebookServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ManagedNotebookServiceClient, 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 ManagedNotebookServiceClient create(ManagedNotebookServiceSettings settings) + throws IOException { + return new ManagedNotebookServiceClient(settings); + } + + /** + * Constructs an instance of ManagedNotebookServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(ManagedNotebookServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ManagedNotebookServiceClient create(ManagedNotebookServiceStub stub) { + return new ManagedNotebookServiceClient(stub); + } + + /** + * Constructs an instance of ManagedNotebookServiceClient, 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 ManagedNotebookServiceClient(ManagedNotebookServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((ManagedNotebookServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ManagedNotebookServiceClient(ManagedNotebookServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final ManagedNotebookServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ManagedNotebookServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Runtime element : managedNotebookServiceClient.listRuntimes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuntimesPagedResponse listRuntimes(LocationName parent) { + ListRuntimesRequest request = + ListRuntimesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRuntimes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String parent = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString();
+   *   for (Runtime element : managedNotebookServiceClient.listRuntimes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuntimesPagedResponse listRuntimes(String parent) { + ListRuntimesRequest request = ListRuntimesRequest.newBuilder().setParent(parent).build(); + return listRuntimes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ListRuntimesRequest request =
+   *       ListRuntimesRequest.newBuilder()
+   *           .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Runtime element : managedNotebookServiceClient.listRuntimes(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 + */ + public final ListRuntimesPagedResponse listRuntimes(ListRuntimesRequest request) { + return listRuntimesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ListRuntimesRequest request =
+   *       ListRuntimesRequest.newBuilder()
+   *           .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.listRuntimesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Runtime element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRuntimesPagedCallable() { + return stub.listRuntimesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ListRuntimesRequest request =
+   *       ListRuntimesRequest.newBuilder()
+   *           .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListRuntimesResponse response =
+   *         managedNotebookServiceClient.listRuntimesCallable().call(request);
+   *     for (Runtime element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listRuntimesCallable() { + return stub.listRuntimesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]");
+   *   Runtime response = managedNotebookServiceClient.getRuntime(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Runtime getRuntime(RuntimeName name) { + GetRuntimeRequest request = + GetRuntimeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRuntime(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString();
+   *   Runtime response = managedNotebookServiceClient.getRuntime(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Runtime getRuntime(String name) { + GetRuntimeRequest request = GetRuntimeRequest.newBuilder().setName(name).build(); + return getRuntime(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   GetRuntimeRequest request =
+   *       GetRuntimeRequest.newBuilder()
+   *           .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .build();
+   *   Runtime response = managedNotebookServiceClient.getRuntime(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 + */ + public final Runtime getRuntime(GetRuntimeRequest request) { + return getRuntimeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   GetRuntimeRequest request =
+   *       GetRuntimeRequest.newBuilder()
+   *           .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.getRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Runtime response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRuntimeCallable() { + return stub.getRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Runtime in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   RuntimeName parent = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]");
+   *   String runtimeId = "runtimeId121455379";
+   *   Runtime runtime = Runtime.newBuilder().build();
+   *   Runtime response =
+   *       managedNotebookServiceClient.createRuntimeAsync(parent, runtimeId, runtime).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param runtimeId Required. User-defined unique ID of this Runtime. + * @param runtime Required. The Runtime to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRuntimeAsync( + RuntimeName parent, String runtimeId, Runtime runtime) { + CreateRuntimeRequest request = + CreateRuntimeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRuntimeId(runtimeId) + .setRuntime(runtime) + .build(); + return createRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Runtime in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String parent = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString();
+   *   String runtimeId = "runtimeId121455379";
+   *   Runtime runtime = Runtime.newBuilder().build();
+   *   Runtime response =
+   *       managedNotebookServiceClient.createRuntimeAsync(parent, runtimeId, runtime).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param runtimeId Required. User-defined unique ID of this Runtime. + * @param runtime Required. The Runtime to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createRuntimeAsync( + String parent, String runtimeId, Runtime runtime) { + CreateRuntimeRequest request = + CreateRuntimeRequest.newBuilder() + .setParent(parent) + .setRuntimeId(runtimeId) + .setRuntime(runtime) + .build(); + return createRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Runtime in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   CreateRuntimeRequest request =
+   *       CreateRuntimeRequest.newBuilder()
+   *           .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setRuntimeId("runtimeId121455379")
+   *           .setRuntime(Runtime.newBuilder().build())
+   *           .build();
+   *   Runtime response = managedNotebookServiceClient.createRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture createRuntimeAsync( + CreateRuntimeRequest request) { + return createRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Runtime in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   CreateRuntimeRequest request =
+   *       CreateRuntimeRequest.newBuilder()
+   *           .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setRuntimeId("runtimeId121455379")
+   *           .setRuntime(Runtime.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       managedNotebookServiceClient.createRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Runtime response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createRuntimeOperationCallable() { + return stub.createRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Runtime in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   CreateRuntimeRequest request =
+   *       CreateRuntimeRequest.newBuilder()
+   *           .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setRuntimeId("runtimeId121455379")
+   *           .setRuntime(Runtime.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.createRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createRuntimeCallable() { + return stub.createRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]");
+   *   managedNotebookServiceClient.deleteRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRuntimeAsync(RuntimeName name) { + DeleteRuntimeRequest request = + DeleteRuntimeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString();
+   *   managedNotebookServiceClient.deleteRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteRuntimeAsync(String name) { + DeleteRuntimeRequest request = DeleteRuntimeRequest.newBuilder().setName(name).build(); + return deleteRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   DeleteRuntimeRequest request =
+   *       DeleteRuntimeRequest.newBuilder()
+   *           .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .build();
+   *   managedNotebookServiceClient.deleteRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture deleteRuntimeAsync( + DeleteRuntimeRequest request) { + return deleteRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   DeleteRuntimeRequest request =
+   *       DeleteRuntimeRequest.newBuilder()
+   *           .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       managedNotebookServiceClient.deleteRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteRuntimeOperationCallable() { + return stub.deleteRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   DeleteRuntimeRequest request =
+   *       DeleteRuntimeRequest.newBuilder()
+   *           .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.deleteRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteRuntimeCallable() { + return stub.deleteRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances + * See: https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String name = "name3373707";
+   *   Runtime response = managedNotebookServiceClient.startRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture startRuntimeAsync(String name) { + StartRuntimeRequest request = StartRuntimeRequest.newBuilder().setName(name).build(); + return startRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances + * See: https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   StartRuntimeRequest request = StartRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   Runtime response = managedNotebookServiceClient.startRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture startRuntimeAsync( + StartRuntimeRequest request) { + return startRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances + * See: https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   StartRuntimeRequest request = StartRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       managedNotebookServiceClient.startRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Runtime response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + startRuntimeOperationCallable() { + return stub.startRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances + * See: https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   StartRuntimeRequest request = StartRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.startRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable startRuntimeCallable() { + return stub.startRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances + * See: https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String name = "name3373707";
+   *   Runtime response = managedNotebookServiceClient.stopRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture stopRuntimeAsync(String name) { + StopRuntimeRequest request = StopRuntimeRequest.newBuilder().setName(name).build(); + return stopRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances + * See: https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   StopRuntimeRequest request = StopRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   Runtime response = managedNotebookServiceClient.stopRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture stopRuntimeAsync( + StopRuntimeRequest request) { + return stopRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances + * See: https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   StopRuntimeRequest request = StopRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       managedNotebookServiceClient.stopRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Runtime response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + stopRuntimeOperationCallable() { + return stub.stopRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances + * See: https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   StopRuntimeRequest request = StopRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.stopRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable stopRuntimeCallable() { + return stub.stopRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Switch a Managed Notebook Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String name = "name3373707";
+   *   Runtime response = managedNotebookServiceClient.switchRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture switchRuntimeAsync(String name) { + SwitchRuntimeRequest request = SwitchRuntimeRequest.newBuilder().setName(name).build(); + return switchRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Switch a Managed Notebook Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   SwitchRuntimeRequest request =
+   *       SwitchRuntimeRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setMachineType("machineType-218117087")
+   *           .setAcceleratorConfig(RuntimeAcceleratorConfig.newBuilder().build())
+   *           .build();
+   *   Runtime response = managedNotebookServiceClient.switchRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture switchRuntimeAsync( + SwitchRuntimeRequest request) { + return switchRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Switch a Managed Notebook Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   SwitchRuntimeRequest request =
+   *       SwitchRuntimeRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setMachineType("machineType-218117087")
+   *           .setAcceleratorConfig(RuntimeAcceleratorConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       managedNotebookServiceClient.switchRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Runtime response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + switchRuntimeOperationCallable() { + return stub.switchRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Switch a Managed Notebook Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   SwitchRuntimeRequest request =
+   *       SwitchRuntimeRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setMachineType("machineType-218117087")
+   *           .setAcceleratorConfig(RuntimeAcceleratorConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.switchRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable switchRuntimeCallable() { + return stub.switchRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resets a Managed Notebook Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String name = "name3373707";
+   *   Runtime response = managedNotebookServiceClient.resetRuntimeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture resetRuntimeAsync(String name) { + ResetRuntimeRequest request = ResetRuntimeRequest.newBuilder().setName(name).build(); + return resetRuntimeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resets a Managed Notebook Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ResetRuntimeRequest request = ResetRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   Runtime response = managedNotebookServiceClient.resetRuntimeAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture resetRuntimeAsync( + ResetRuntimeRequest request) { + return resetRuntimeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resets a Managed Notebook Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ResetRuntimeRequest request = ResetRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       managedNotebookServiceClient.resetRuntimeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Runtime response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + resetRuntimeOperationCallable() { + return stub.resetRuntimeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resets a Managed Notebook Runtime. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ResetRuntimeRequest request = ResetRuntimeRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.resetRuntimeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable resetRuntimeCallable() { + return stub.resetRuntimeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Report and process a runtime event. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]");
+   *   Runtime response = managedNotebookServiceClient.reportRuntimeEventAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture reportRuntimeEventAsync( + RuntimeName name) { + ReportRuntimeEventRequest request = + ReportRuntimeEventRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return reportRuntimeEventAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Report and process a runtime event. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   String name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString();
+   *   Runtime response = managedNotebookServiceClient.reportRuntimeEventAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture reportRuntimeEventAsync(String name) { + ReportRuntimeEventRequest request = + ReportRuntimeEventRequest.newBuilder().setName(name).build(); + return reportRuntimeEventAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Report and process a runtime event. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ReportRuntimeEventRequest request =
+   *       ReportRuntimeEventRequest.newBuilder()
+   *           .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setVmId("vmId3622450")
+   *           .setEvent(Event.newBuilder().build())
+   *           .build();
+   *   Runtime response = managedNotebookServiceClient.reportRuntimeEventAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture reportRuntimeEventAsync( + ReportRuntimeEventRequest request) { + return reportRuntimeEventOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Report and process a runtime event. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ReportRuntimeEventRequest request =
+   *       ReportRuntimeEventRequest.newBuilder()
+   *           .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setVmId("vmId3622450")
+   *           .setEvent(Event.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       managedNotebookServiceClient.reportRuntimeEventOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Runtime response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + reportRuntimeEventOperationCallable() { + return stub.reportRuntimeEventOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Report and process a runtime event. + * + *

Sample code: + * + *

{@code
+   * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+   *     ManagedNotebookServiceClient.create()) {
+   *   ReportRuntimeEventRequest request =
+   *       ReportRuntimeEventRequest.newBuilder()
+   *           .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
+   *           .setVmId("vmId3622450")
+   *           .setEvent(Event.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       managedNotebookServiceClient.reportRuntimeEventCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable reportRuntimeEventCallable() { + return stub.reportRuntimeEventCallable(); + } + + @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 ListRuntimesPagedResponse + extends AbstractPagedListResponse< + ListRuntimesRequest, + ListRuntimesResponse, + Runtime, + ListRuntimesPage, + ListRuntimesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRuntimesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRuntimesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRuntimesPagedResponse(ListRuntimesPage page) { + super(page, ListRuntimesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRuntimesPage + extends AbstractPage { + + private ListRuntimesPage( + PageContext context, + ListRuntimesResponse response) { + super(context, response); + } + + private static ListRuntimesPage createEmptyPage() { + return new ListRuntimesPage(null, null); + } + + @Override + protected ListRuntimesPage createPage( + PageContext context, + ListRuntimesResponse response) { + return new ListRuntimesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRuntimesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRuntimesRequest, + ListRuntimesResponse, + Runtime, + ListRuntimesPage, + ListRuntimesFixedSizeCollection> { + + private ListRuntimesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRuntimesFixedSizeCollection createEmptyCollection() { + return new ListRuntimesFixedSizeCollection(null, 0); + } + + @Override + protected ListRuntimesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRuntimesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceSettings.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceSettings.java new file mode 100644 index 00000000..ead95ccc --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceSettings.java @@ -0,0 +1,361 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import static com.google.cloud.notebooks.v1.ManagedNotebookServiceClient.ListRuntimesPagedResponse; + +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.grpc.InstantiatingGrpcChannelProvider; +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.OperationCallSettings; +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.notebooks.v1.stub.ManagedNotebookServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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 ManagedNotebookServiceClient}. + * + *

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

    + *
  • The default service address (notebooks.googleapis.com) 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 getRuntime to 30 seconds: + * + *

{@code
+ * ManagedNotebookServiceSettings.Builder managedNotebookServiceSettingsBuilder =
+ *     ManagedNotebookServiceSettings.newBuilder();
+ * managedNotebookServiceSettingsBuilder
+ *     .getRuntimeSettings()
+ *     .setRetrySettings(
+ *         managedNotebookServiceSettingsBuilder
+ *             .getRuntimeSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ManagedNotebookServiceSettings managedNotebookServiceSettings =
+ *     managedNotebookServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ManagedNotebookServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listRuntimes. */ + public PagedCallSettings + listRuntimesSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).listRuntimesSettings(); + } + + /** Returns the object with the settings used for calls to getRuntime. */ + public UnaryCallSettings getRuntimeSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).getRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to createRuntime. */ + public UnaryCallSettings createRuntimeSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).createRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to createRuntime. */ + public OperationCallSettings + createRuntimeOperationSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()) + .createRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteRuntime. */ + public UnaryCallSettings deleteRuntimeSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).deleteRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to deleteRuntime. */ + public OperationCallSettings + deleteRuntimeOperationSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()) + .deleteRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to startRuntime. */ + public UnaryCallSettings startRuntimeSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).startRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to startRuntime. */ + public OperationCallSettings + startRuntimeOperationSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).startRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to stopRuntime. */ + public UnaryCallSettings stopRuntimeSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).stopRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to stopRuntime. */ + public OperationCallSettings + stopRuntimeOperationSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).stopRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to switchRuntime. */ + public UnaryCallSettings switchRuntimeSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).switchRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to switchRuntime. */ + public OperationCallSettings + switchRuntimeOperationSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()) + .switchRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to resetRuntime. */ + public UnaryCallSettings resetRuntimeSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).resetRuntimeSettings(); + } + + /** Returns the object with the settings used for calls to resetRuntime. */ + public OperationCallSettings + resetRuntimeOperationSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).resetRuntimeOperationSettings(); + } + + /** Returns the object with the settings used for calls to reportRuntimeEvent. */ + public UnaryCallSettings reportRuntimeEventSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()).reportRuntimeEventSettings(); + } + + /** Returns the object with the settings used for calls to reportRuntimeEvent. */ + public OperationCallSettings + reportRuntimeEventOperationSettings() { + return ((ManagedNotebookServiceStubSettings) getStubSettings()) + .reportRuntimeEventOperationSettings(); + } + + public static final ManagedNotebookServiceSettings create(ManagedNotebookServiceStubSettings stub) + throws IOException { + return new ManagedNotebookServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ManagedNotebookServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ManagedNotebookServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ManagedNotebookServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ManagedNotebookServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ManagedNotebookServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ManagedNotebookServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ManagedNotebookServiceStubSettings.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 ManagedNotebookServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ManagedNotebookServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ManagedNotebookServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ManagedNotebookServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ManagedNotebookServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ManagedNotebookServiceStubSettings.newBuilder()); + } + + public ManagedNotebookServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ManagedNotebookServiceStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listRuntimes. */ + public PagedCallSettings.Builder< + ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> + listRuntimesSettings() { + return getStubSettingsBuilder().listRuntimesSettings(); + } + + /** Returns the builder for the settings used for calls to getRuntime. */ + public UnaryCallSettings.Builder getRuntimeSettings() { + return getStubSettingsBuilder().getRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to createRuntime. */ + public UnaryCallSettings.Builder createRuntimeSettings() { + return getStubSettingsBuilder().createRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to createRuntime. */ + public OperationCallSettings.Builder + createRuntimeOperationSettings() { + return getStubSettingsBuilder().createRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRuntime. */ + public UnaryCallSettings.Builder deleteRuntimeSettings() { + return getStubSettingsBuilder().deleteRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteRuntime. */ + public OperationCallSettings.Builder + deleteRuntimeOperationSettings() { + return getStubSettingsBuilder().deleteRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startRuntime. */ + public UnaryCallSettings.Builder startRuntimeSettings() { + return getStubSettingsBuilder().startRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to startRuntime. */ + public OperationCallSettings.Builder + startRuntimeOperationSettings() { + return getStubSettingsBuilder().startRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to stopRuntime. */ + public UnaryCallSettings.Builder stopRuntimeSettings() { + return getStubSettingsBuilder().stopRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to stopRuntime. */ + public OperationCallSettings.Builder + stopRuntimeOperationSettings() { + return getStubSettingsBuilder().stopRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to switchRuntime. */ + public UnaryCallSettings.Builder switchRuntimeSettings() { + return getStubSettingsBuilder().switchRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to switchRuntime. */ + public OperationCallSettings.Builder + switchRuntimeOperationSettings() { + return getStubSettingsBuilder().switchRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to resetRuntime. */ + public UnaryCallSettings.Builder resetRuntimeSettings() { + return getStubSettingsBuilder().resetRuntimeSettings(); + } + + /** Returns the builder for the settings used for calls to resetRuntime. */ + public OperationCallSettings.Builder + resetRuntimeOperationSettings() { + return getStubSettingsBuilder().resetRuntimeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to reportRuntimeEvent. */ + public UnaryCallSettings.Builder + reportRuntimeEventSettings() { + return getStubSettingsBuilder().reportRuntimeEventSettings(); + } + + /** Returns the builder for the settings used for calls to reportRuntimeEvent. */ + public OperationCallSettings.Builder + reportRuntimeEventOperationSettings() { + return getStubSettingsBuilder().reportRuntimeEventOperationSettings(); + } + + @Override + public ManagedNotebookServiceSettings build() throws IOException { + return new ManagedNotebookServiceSettings(this); + } + } +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceClient.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceClient.java new file mode 100644 index 00000000..247ff84e --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceClient.java @@ -0,0 +1,3391 @@ +/* + * Copyright 2021 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.notebooks.v1; + +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.longrunning.OperationFuture; +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.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.notebooks.v1.stub.NotebookServiceStub; +import com.google.cloud.notebooks.v1.stub.NotebookServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: API v1 service for Cloud AI Platform Notebooks. + * + *

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: + * + *

{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ *   String name = "name3373707";
+ *   Instance response = notebookServiceClient.getInstance(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the NotebookServiceClient 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 NotebookServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * NotebookServiceSettings notebookServiceSettings =
+ *     NotebookServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * NotebookServiceClient notebookServiceClient =
+ *     NotebookServiceClient.create(notebookServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * NotebookServiceSettings notebookServiceSettings =
+ *     NotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * NotebookServiceClient notebookServiceClient =
+ *     NotebookServiceClient.create(notebookServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class NotebookServiceClient implements BackgroundResource { + private final NotebookServiceSettings settings; + private final NotebookServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of NotebookServiceClient with default settings. */ + public static final NotebookServiceClient create() throws IOException { + return create(NotebookServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of NotebookServiceClient, 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 NotebookServiceClient create(NotebookServiceSettings settings) + throws IOException { + return new NotebookServiceClient(settings); + } + + /** + * Constructs an instance of NotebookServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(NotebookServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final NotebookServiceClient create(NotebookServiceStub stub) { + return new NotebookServiceClient(stub); + } + + /** + * Constructs an instance of NotebookServiceClient, 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 NotebookServiceClient(NotebookServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((NotebookServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected NotebookServiceClient(NotebookServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final NotebookServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public NotebookServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Instance element : notebookServiceClient.listInstances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(String parent) { + ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Instance element : notebookServiceClient.listInstances(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 + */ + public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { + return listInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listInstancesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Instance element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancesPagedCallable() { + return stub.listInstancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListInstancesResponse response =
+   *         notebookServiceClient.listInstancesCallable().call(request);
+   *     for (Instance element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listInstancesCallable() { + return stub.listInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = "name3373707";
+   *   Instance response = notebookServiceClient.getInstance(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(String name) { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = notebookServiceClient.getInstance(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 + */ + public final Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = notebookServiceClient.getInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInstanceCallable() { + return stub.getInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Instance in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Instance instance = Instance.newBuilder().build();
+   *   String instanceId = "instanceId902024336";
+   *   Instance response =
+   *       notebookServiceClient.createInstanceAsync(parent, instance, instanceId).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param instance Required. The instance to be created. + * @param instanceId Required. User-defined unique ID of this instance. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInstanceAsync( + String parent, Instance instance, String instanceId) { + CreateInstanceRequest request = + CreateInstanceRequest.newBuilder() + .setParent(parent) + .setInstance(instance) + .setInstanceId(instanceId) + .build(); + return createInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Instance in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   Instance response = notebookServiceClient.createInstanceAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture createInstanceAsync( + CreateInstanceRequest request) { + return createInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Instance in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.createInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createInstanceOperationCallable() { + return stub.createInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Instance in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateInstanceRequest request =
+   *       CreateInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .setInstance(Instance.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.createInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createInstanceCallable() { + return stub.createInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances + * are instances created with the legacy Compute Engine calls. They are not manageable by the + * Notebooks API out of the box. This call makes these instances manageable by the Notebooks API. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   RegisterInstanceRequest request =
+   *       RegisterInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .build();
+   *   Instance response = notebookServiceClient.registerInstanceAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture registerInstanceAsync( + RegisterInstanceRequest request) { + return registerInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances + * are instances created with the legacy Compute Engine calls. They are not manageable by the + * Notebooks API out of the box. This call makes these instances manageable by the Notebooks API. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   RegisterInstanceRequest request =
+   *       RegisterInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.registerInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + registerInstanceOperationCallable() { + return stub.registerInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances + * are instances created with the legacy Compute Engine calls. They are not manageable by the + * Notebooks API out of the box. This call makes these instances manageable by the Notebooks API. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   RegisterInstanceRequest request =
+   *       RegisterInstanceRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setInstanceId("instanceId902024336")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.registerInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable registerInstanceCallable() { + return stub.registerInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the guest accelerators of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceAcceleratorRequest request =
+   *       SetInstanceAcceleratorRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setCoreCount(-1963855761)
+   *           .build();
+   *   Instance response = notebookServiceClient.setInstanceAcceleratorAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture setInstanceAcceleratorAsync( + SetInstanceAcceleratorRequest request) { + return setInstanceAcceleratorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the guest accelerators of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceAcceleratorRequest request =
+   *       SetInstanceAcceleratorRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setCoreCount(-1963855761)
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.setInstanceAcceleratorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + setInstanceAcceleratorOperationCallable() { + return stub.setInstanceAcceleratorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the guest accelerators of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceAcceleratorRequest request =
+   *       SetInstanceAcceleratorRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setCoreCount(-1963855761)
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.setInstanceAcceleratorCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + setInstanceAcceleratorCallable() { + return stub.setInstanceAcceleratorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the machine type of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceMachineTypeRequest request =
+   *       SetInstanceMachineTypeRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setMachineType("machineType-218117087")
+   *           .build();
+   *   Instance response = notebookServiceClient.setInstanceMachineTypeAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture setInstanceMachineTypeAsync( + SetInstanceMachineTypeRequest request) { + return setInstanceMachineTypeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the machine type of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceMachineTypeRequest request =
+   *       SetInstanceMachineTypeRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setMachineType("machineType-218117087")
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.setInstanceMachineTypeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + setInstanceMachineTypeOperationCallable() { + return stub.setInstanceMachineTypeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the machine type of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceMachineTypeRequest request =
+   *       SetInstanceMachineTypeRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setMachineType("machineType-218117087")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.setInstanceMachineTypeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + setInstanceMachineTypeCallable() { + return stub.setInstanceMachineTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update Notebook Instance configurations. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpdateInstanceConfigRequest request =
+   *       UpdateInstanceConfigRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setConfig(InstanceConfig.newBuilder().build())
+   *           .build();
+   *   Instance response = notebookServiceClient.updateInstanceConfigAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture updateInstanceConfigAsync( + UpdateInstanceConfigRequest request) { + return updateInstanceConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update Notebook Instance configurations. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpdateInstanceConfigRequest request =
+   *       UpdateInstanceConfigRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setConfig(InstanceConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.updateInstanceConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateInstanceConfigOperationCallable() { + return stub.updateInstanceConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update Notebook Instance configurations. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpdateInstanceConfigRequest request =
+   *       UpdateInstanceConfigRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setConfig(InstanceConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.updateInstanceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateInstanceConfigCallable() { + return stub.updateInstanceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Shielded instance configuration of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpdateShieldedInstanceConfigRequest request =
+   *       UpdateShieldedInstanceConfigRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
+   *           .build();
+   *   Instance response = notebookServiceClient.updateShieldedInstanceConfigAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture updateShieldedInstanceConfigAsync( + UpdateShieldedInstanceConfigRequest request) { + return updateShieldedInstanceConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Shielded instance configuration of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpdateShieldedInstanceConfigRequest request =
+   *       UpdateShieldedInstanceConfigRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.updateShieldedInstanceConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateShieldedInstanceConfigOperationCallable() { + return stub.updateShieldedInstanceConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Shielded instance configuration of a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpdateShieldedInstanceConfigRequest request =
+   *       UpdateShieldedInstanceConfigRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.updateShieldedInstanceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateShieldedInstanceConfigCallable() { + return stub.updateShieldedInstanceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Replaces all the labels of an Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceLabelsRequest request =
+   *       SetInstanceLabelsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .putAllLabels(new HashMap())
+   *           .build();
+   *   Instance response = notebookServiceClient.setInstanceLabelsAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture setInstanceLabelsAsync( + SetInstanceLabelsRequest request) { + return setInstanceLabelsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Replaces all the labels of an Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceLabelsRequest request =
+   *       SetInstanceLabelsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .putAllLabels(new HashMap())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.setInstanceLabelsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + setInstanceLabelsOperationCallable() { + return stub.setInstanceLabelsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Replaces all the labels of an Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   SetInstanceLabelsRequest request =
+   *       SetInstanceLabelsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .putAllLabels(new HashMap())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.setInstanceLabelsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setInstanceLabelsCallable() { + return stub.setInstanceLabelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = "name3373707";
+   *   notebookServiceClient.deleteInstanceAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInstanceAsync(String name) { + DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); + return deleteInstanceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   notebookServiceClient.deleteInstanceAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture deleteInstanceAsync( + DeleteInstanceRequest request) { + return deleteInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       notebookServiceClient.deleteInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteInstanceOperationCallable() { + return stub.deleteInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteInstanceRequest request =
+   *       DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       notebookServiceClient.deleteInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteInstanceCallable() { + return stub.deleteInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartInstanceRequest request =
+   *       StartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = notebookServiceClient.startInstanceAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture startInstanceAsync( + StartInstanceRequest request) { + return startInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartInstanceRequest request =
+   *       StartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       notebookServiceClient.startInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + startInstanceOperationCallable() { + return stub.startInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StartInstanceRequest request =
+   *       StartInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       notebookServiceClient.startInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable startInstanceCallable() { + return stub.startInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = notebookServiceClient.stopInstanceAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture stopInstanceAsync( + StopInstanceRequest request) { + return stopInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       notebookServiceClient.stopInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + stopInstanceOperationCallable() { + return stub.stopInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       notebookServiceClient.stopInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable stopInstanceCallable() { + return stub.stopInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resets a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ResetInstanceRequest request =
+   *       ResetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = notebookServiceClient.resetInstanceAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture resetInstanceAsync( + ResetInstanceRequest request) { + return resetInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resets a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ResetInstanceRequest request =
+   *       ResetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       notebookServiceClient.resetInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + resetInstanceOperationCallable() { + return stub.resetInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resets a notebook instance. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ResetInstanceRequest request =
+   *       ResetInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       notebookServiceClient.resetInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable resetInstanceCallable() { + return stub.resetInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Allows notebook instances to report their latest instance information to the Notebooks API + * server. The server will merge the reported information to the instance metadata store. Do not + * use this method directly. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ReportInstanceInfoRequest request =
+   *       ReportInstanceInfoRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVmId("vmId3622450")
+   *           .putAllMetadata(new HashMap())
+   *           .build();
+   *   Instance response = notebookServiceClient.reportInstanceInfoAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture reportInstanceInfoAsync( + ReportInstanceInfoRequest request) { + return reportInstanceInfoOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Allows notebook instances to report their latest instance information to the Notebooks API + * server. The server will merge the reported information to the instance metadata store. Do not + * use this method directly. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ReportInstanceInfoRequest request =
+   *       ReportInstanceInfoRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVmId("vmId3622450")
+   *           .putAllMetadata(new HashMap())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.reportInstanceInfoOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + reportInstanceInfoOperationCallable() { + return stub.reportInstanceInfoOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Allows notebook instances to report their latest instance information to the Notebooks API + * server. The server will merge the reported information to the instance metadata store. Do not + * use this method directly. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ReportInstanceInfoRequest request =
+   *       ReportInstanceInfoRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVmId("vmId3622450")
+   *           .putAllMetadata(new HashMap())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.reportInstanceInfoCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable reportInstanceInfoCallable() { + return stub.reportInstanceInfoCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if a notebook instance is upgradable. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   IsInstanceUpgradeableRequest request =
+   *       IsInstanceUpgradeableRequest.newBuilder()
+   *           .setNotebookInstance("notebookInstance-544239728")
+   *           .build();
+   *   IsInstanceUpgradeableResponse response = notebookServiceClient.isInstanceUpgradeable(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 + */ + public final IsInstanceUpgradeableResponse isInstanceUpgradeable( + IsInstanceUpgradeableRequest request) { + return isInstanceUpgradeableCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if a notebook instance is upgradable. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   IsInstanceUpgradeableRequest request =
+   *       IsInstanceUpgradeableRequest.newBuilder()
+   *           .setNotebookInstance("notebookInstance-544239728")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.isInstanceUpgradeableCallable().futureCall(request);
+   *   // Do something.
+   *   IsInstanceUpgradeableResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + isInstanceUpgradeableCallable() { + return stub.isInstanceUpgradeableCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if a notebook instance is healthy. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
+   *   GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GetInstanceHealthResponse getInstanceHealth(InstanceName name) { + GetInstanceHealthRequest request = + GetInstanceHealthRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getInstanceHealth(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if a notebook instance is healthy. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+   *   GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GetInstanceHealthResponse getInstanceHealth(String name) { + GetInstanceHealthRequest request = GetInstanceHealthRequest.newBuilder().setName(name).build(); + return getInstanceHealth(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if a notebook instance is healthy. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetInstanceHealthRequest request =
+   *       GetInstanceHealthRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .build();
+   *   GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(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 + */ + public final GetInstanceHealthResponse getInstanceHealth(GetInstanceHealthRequest request) { + return getInstanceHealthCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if a notebook instance is healthy. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetInstanceHealthRequest request =
+   *       GetInstanceHealthRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.getInstanceHealthCallable().futureCall(request);
+   *   // Do something.
+   *   GetInstanceHealthResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getInstanceHealthCallable() { + return stub.getInstanceHealthCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a notebook instance to the latest version. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeInstanceRequest request =
+   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *   Instance response = notebookServiceClient.upgradeInstanceAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture upgradeInstanceAsync( + UpgradeInstanceRequest request) { + return upgradeInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a notebook instance to the latest version. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeInstanceRequest request =
+   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       notebookServiceClient.upgradeInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + upgradeInstanceOperationCallable() { + return stub.upgradeInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upgrades a notebook instance to the latest version. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeInstanceRequest request =
+   *       UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       notebookServiceClient.upgradeInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable upgradeInstanceCallable() { + return stub.upgradeInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rollbacks a notebook instance to the previous version. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   RollbackInstanceRequest request =
+   *       RollbackInstanceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setTargetSnapshot("targetSnapshot-1307211147")
+   *           .build();
+   *   Instance response = notebookServiceClient.rollbackInstanceAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture rollbackInstanceAsync( + RollbackInstanceRequest request) { + return rollbackInstanceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rollbacks a notebook instance to the previous version. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   RollbackInstanceRequest request =
+   *       RollbackInstanceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setTargetSnapshot("targetSnapshot-1307211147")
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.rollbackInstanceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + rollbackInstanceOperationCallable() { + return stub.rollbackInstanceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rollbacks a notebook instance to the previous version. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   RollbackInstanceRequest request =
+   *       RollbackInstanceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setTargetSnapshot("targetSnapshot-1307211147")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.rollbackInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable rollbackInstanceCallable() { + return stub.rollbackInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method + * directly. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeInstanceInternalRequest request =
+   *       UpgradeInstanceInternalRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVmId("vmId3622450")
+   *           .build();
+   *   Instance response = notebookServiceClient.upgradeInstanceInternalAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture upgradeInstanceInternalAsync( + UpgradeInstanceInternalRequest request) { + return upgradeInstanceInternalOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method + * directly. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeInstanceInternalRequest request =
+   *       UpgradeInstanceInternalRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVmId("vmId3622450")
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.upgradeInstanceInternalOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + upgradeInstanceInternalOperationCallable() { + return stub.upgradeInstanceInternalOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method + * directly. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   UpgradeInstanceInternalRequest request =
+   *       UpgradeInstanceInternalRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setVmId("vmId3622450")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.upgradeInstanceInternalCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + upgradeInstanceInternalCallable() { + return stub.upgradeInstanceInternalCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists environments in a project. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Environment element : notebookServiceClient.listEnvironments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEnvironmentsPagedResponse listEnvironments(String parent) { + ListEnvironmentsRequest request = + ListEnvironmentsRequest.newBuilder().setParent(parent).build(); + return listEnvironments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists environments in a project. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Environment element : notebookServiceClient.listEnvironments(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 + */ + public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request) { + return listEnvironmentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists environments in a project. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listEnvironmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Environment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEnvironmentsPagedCallable() { + return stub.listEnvironmentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists environments in a project. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListEnvironmentsResponse response =
+   *         notebookServiceClient.listEnvironmentsCallable().call(request);
+   *     for (Environment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEnvironmentsCallable() { + return stub.listEnvironmentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = "name3373707";
+   *   Environment response = notebookServiceClient.getEnvironment(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Environment getEnvironment(String name) { + GetEnvironmentRequest request = GetEnvironmentRequest.newBuilder().setName(name).build(); + return getEnvironment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   Environment response = notebookServiceClient.getEnvironment(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 + */ + public final Environment getEnvironment(GetEnvironmentRequest request) { + return getEnvironmentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       notebookServiceClient.getEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getEnvironmentCallable() { + return stub.getEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Environment environment = Environment.newBuilder().build();
+   *   String environmentId = "environmentId-950205810";
+   *   Environment response =
+   *       notebookServiceClient.createEnvironmentAsync(parent, environment, environmentId).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `projects/{project_id}/locations/{location}` + * @param environment Required. The environment to be created. + * @param environmentId Required. User-defined unique ID of this environment. The `environment_id` + * must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and + * dashes. The first character must be a lowercase letter and the last character cannot be a + * dash. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEnvironmentAsync( + String parent, Environment environment, String environmentId) { + CreateEnvironmentRequest request = + CreateEnvironmentRequest.newBuilder() + .setParent(parent) + .setEnvironment(environment) + .setEnvironmentId(environmentId) + .build(); + return createEnvironmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironmentId("environmentId-950205810")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   Environment response = notebookServiceClient.createEnvironmentAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture createEnvironmentAsync( + CreateEnvironmentRequest request) { + return createEnvironmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironmentId("environmentId-950205810")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.createEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createEnvironmentOperationCallable() { + return stub.createEnvironmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironmentId("environmentId-950205810")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.createEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createEnvironmentCallable() { + return stub.createEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = "name3373707";
+   *   notebookServiceClient.deleteEnvironmentAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEnvironmentAsync(String name) { + DeleteEnvironmentRequest request = DeleteEnvironmentRequest.newBuilder().setName(name).build(); + return deleteEnvironmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   notebookServiceClient.deleteEnvironmentAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture deleteEnvironmentAsync( + DeleteEnvironmentRequest request) { + return deleteEnvironmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       notebookServiceClient.deleteEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteEnvironmentOperationCallable() { + return stub.deleteEnvironmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Environment. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       notebookServiceClient.deleteEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteEnvironmentCallable() { + return stub.deleteEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists schedules in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
+   *   for (Schedule element : notebookServiceClient.listSchedules(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSchedulesPagedResponse listSchedules(ScheduleName parent) { + ListSchedulesRequest request = + ListSchedulesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSchedules(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists schedules in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
+   *   for (Schedule element : notebookServiceClient.listSchedules(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSchedulesPagedResponse listSchedules(String parent) { + ListSchedulesRequest request = ListSchedulesRequest.newBuilder().setParent(parent).build(); + return listSchedules(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists schedules in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListSchedulesRequest request =
+   *       ListSchedulesRequest.newBuilder()
+   *           .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Schedule element : notebookServiceClient.listSchedules(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 + */ + public final ListSchedulesPagedResponse listSchedules(ListSchedulesRequest request) { + return listSchedulesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists schedules in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListSchedulesRequest request =
+   *       ListSchedulesRequest.newBuilder()
+   *           .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listSchedulesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Schedule element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSchedulesPagedCallable() { + return stub.listSchedulesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists schedules in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListSchedulesRequest request =
+   *       ListSchedulesRequest.newBuilder()
+   *           .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListSchedulesResponse response =
+   *         notebookServiceClient.listSchedulesCallable().call(request);
+   *     for (Schedule element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSchedulesCallable() { + return stub.listSchedulesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of schedule + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
+   *   Schedule response = notebookServiceClient.getSchedule(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Schedule getSchedule(ScheduleName name) { + GetScheduleRequest request = + GetScheduleRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSchedule(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of schedule + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
+   *   Schedule response = notebookServiceClient.getSchedule(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Schedule getSchedule(String name) { + GetScheduleRequest request = GetScheduleRequest.newBuilder().setName(name).build(); + return getSchedule(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of schedule + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetScheduleRequest request =
+   *       GetScheduleRequest.newBuilder()
+   *           .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .build();
+   *   Schedule response = notebookServiceClient.getSchedule(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 + */ + public final Schedule getSchedule(GetScheduleRequest request) { + return getScheduleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of schedule + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetScheduleRequest request =
+   *       GetScheduleRequest.newBuilder()
+   *           .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .build();
+   *   ApiFuture future = notebookServiceClient.getScheduleCallable().futureCall(request);
+   *   // Do something.
+   *   Schedule response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getScheduleCallable() { + return stub.getScheduleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes schedule and all underlying jobs + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
+   *   notebookServiceClient.deleteScheduleAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteScheduleAsync(ScheduleName name) { + DeleteScheduleRequest request = + DeleteScheduleRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteScheduleAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes schedule and all underlying jobs + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
+   *   notebookServiceClient.deleteScheduleAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteScheduleAsync(String name) { + DeleteScheduleRequest request = DeleteScheduleRequest.newBuilder().setName(name).build(); + return deleteScheduleAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes schedule and all underlying jobs + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteScheduleRequest request =
+   *       DeleteScheduleRequest.newBuilder()
+   *           .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .build();
+   *   notebookServiceClient.deleteScheduleAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture deleteScheduleAsync( + DeleteScheduleRequest request) { + return deleteScheduleOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes schedule and all underlying jobs + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteScheduleRequest request =
+   *       DeleteScheduleRequest.newBuilder()
+   *           .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.deleteScheduleOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteScheduleOperationCallable() { + return stub.deleteScheduleOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes schedule and all underlying jobs + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteScheduleRequest request =
+   *       DeleteScheduleRequest.newBuilder()
+   *           .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.deleteScheduleCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteScheduleCallable() { + return stub.deleteScheduleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
+   *   Schedule schedule = Schedule.newBuilder().build();
+   *   String scheduleId = "scheduleId-687058414";
+   *   Schedule response =
+   *       notebookServiceClient.createScheduleAsync(parent, schedule, scheduleId).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param schedule Required. The schedule to be created. + * @param scheduleId Required. User-defined unique ID of this schedule. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createScheduleAsync( + ScheduleName parent, Schedule schedule, String scheduleId) { + CreateScheduleRequest request = + CreateScheduleRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSchedule(schedule) + .setScheduleId(scheduleId) + .build(); + return createScheduleAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
+   *   Schedule schedule = Schedule.newBuilder().build();
+   *   String scheduleId = "scheduleId-687058414";
+   *   Schedule response =
+   *       notebookServiceClient.createScheduleAsync(parent, schedule, scheduleId).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param schedule Required. The schedule to be created. + * @param scheduleId Required. User-defined unique ID of this schedule. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createScheduleAsync( + String parent, Schedule schedule, String scheduleId) { + CreateScheduleRequest request = + CreateScheduleRequest.newBuilder() + .setParent(parent) + .setSchedule(schedule) + .setScheduleId(scheduleId) + .build(); + return createScheduleAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateScheduleRequest request =
+   *       CreateScheduleRequest.newBuilder()
+   *           .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .setScheduleId("scheduleId-687058414")
+   *           .setSchedule(Schedule.newBuilder().build())
+   *           .build();
+   *   Schedule response = notebookServiceClient.createScheduleAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture createScheduleAsync( + CreateScheduleRequest request) { + return createScheduleOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateScheduleRequest request =
+   *       CreateScheduleRequest.newBuilder()
+   *           .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .setScheduleId("scheduleId-687058414")
+   *           .setSchedule(Schedule.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.createScheduleOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Schedule response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createScheduleOperationCallable() { + return stub.createScheduleOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateScheduleRequest request =
+   *       CreateScheduleRequest.newBuilder()
+   *           .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .setScheduleId("scheduleId-687058414")
+   *           .setSchedule(Schedule.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.createScheduleCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createScheduleCallable() { + return stub.createScheduleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers execution of an existing schedule. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   TriggerScheduleRequest request =
+   *       TriggerScheduleRequest.newBuilder()
+   *           .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .build();
+   *   Schedule response = notebookServiceClient.triggerScheduleAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture triggerScheduleAsync( + TriggerScheduleRequest request) { + return triggerScheduleOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers execution of an existing schedule. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   TriggerScheduleRequest request =
+   *       TriggerScheduleRequest.newBuilder()
+   *           .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.triggerScheduleOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Schedule response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + triggerScheduleOperationCallable() { + return stub.triggerScheduleOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers execution of an existing schedule. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   TriggerScheduleRequest request =
+   *       TriggerScheduleRequest.newBuilder()
+   *           .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.triggerScheduleCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable triggerScheduleCallable() { + return stub.triggerScheduleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists executions in a given project and location + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
+   *   for (Execution element : notebookServiceClient.listExecutions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExecutionsPagedResponse listExecutions(ExecutionName parent) { + ListExecutionsRequest request = + ListExecutionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExecutions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists executions in a given project and location + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
+   *   for (Execution element : notebookServiceClient.listExecutions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExecutionsPagedResponse listExecutions(String parent) { + ListExecutionsRequest request = ListExecutionsRequest.newBuilder().setParent(parent).build(); + return listExecutions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists executions in a given project and location + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListExecutionsRequest request =
+   *       ListExecutionsRequest.newBuilder()
+   *           .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Execution element : notebookServiceClient.listExecutions(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 + */ + public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest request) { + return listExecutionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists executions in a given project and location + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListExecutionsRequest request =
+   *       ListExecutionsRequest.newBuilder()
+   *           .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.listExecutionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Execution element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listExecutionsPagedCallable() { + return stub.listExecutionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists executions in a given project and location + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ListExecutionsRequest request =
+   *       ListExecutionsRequest.newBuilder()
+   *           .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListExecutionsResponse response =
+   *         notebookServiceClient.listExecutionsCallable().call(request);
+   *     for (Execution element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listExecutionsCallable() { + return stub.listExecutionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of executions + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
+   *   Execution response = notebookServiceClient.getExecution(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Execution getExecution(ExecutionName name) { + GetExecutionRequest request = + GetExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getExecution(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of executions + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
+   *   Execution response = notebookServiceClient.getExecution(name);
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Execution getExecution(String name) { + GetExecutionRequest request = GetExecutionRequest.newBuilder().setName(name).build(); + return getExecution(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of executions + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetExecutionRequest request =
+   *       GetExecutionRequest.newBuilder()
+   *           .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .build();
+   *   Execution response = notebookServiceClient.getExecution(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 + */ + public final Execution getExecution(GetExecutionRequest request) { + return getExecutionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of executions + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   GetExecutionRequest request =
+   *       GetExecutionRequest.newBuilder()
+   *           .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.getExecutionCallable().futureCall(request);
+   *   // Do something.
+   *   Execution response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getExecutionCallable() { + return stub.getExecutionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes execution + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
+   *   notebookServiceClient.deleteExecutionAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteExecutionAsync(ExecutionName name) { + DeleteExecutionRequest request = + DeleteExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteExecutionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes execution + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
+   *   notebookServiceClient.deleteExecutionAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteExecutionAsync(String name) { + DeleteExecutionRequest request = DeleteExecutionRequest.newBuilder().setName(name).build(); + return deleteExecutionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes execution + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteExecutionRequest request =
+   *       DeleteExecutionRequest.newBuilder()
+   *           .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .build();
+   *   notebookServiceClient.deleteExecutionAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture deleteExecutionAsync( + DeleteExecutionRequest request) { + return deleteExecutionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes execution + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteExecutionRequest request =
+   *       DeleteExecutionRequest.newBuilder()
+   *           .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.deleteExecutionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteExecutionOperationCallable() { + return stub.deleteExecutionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes execution + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   DeleteExecutionRequest request =
+   *       DeleteExecutionRequest.newBuilder()
+   *           .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.deleteExecutionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteExecutionCallable() { + return stub.deleteExecutionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
+   *   Execution execution = Execution.newBuilder().build();
+   *   String executionId = "executionId-454906285";
+   *   Execution response =
+   *       notebookServiceClient.createExecutionAsync(parent, execution, executionId).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param execution Required. The execution to be created. + * @param executionId Required. User-defined unique ID of this execution. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createExecutionAsync( + ExecutionName parent, Execution execution, String executionId) { + CreateExecutionRequest request = + CreateExecutionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setExecution(execution) + .setExecutionId(executionId) + .build(); + return createExecutionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   String parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
+   *   Execution execution = Execution.newBuilder().build();
+   *   String executionId = "executionId-454906285";
+   *   Execution response =
+   *       notebookServiceClient.createExecutionAsync(parent, execution, executionId).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param execution Required. The execution to be created. + * @param executionId Required. User-defined unique ID of this execution. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createExecutionAsync( + String parent, Execution execution, String executionId) { + CreateExecutionRequest request = + CreateExecutionRequest.newBuilder() + .setParent(parent) + .setExecution(execution) + .setExecutionId(executionId) + .build(); + return createExecutionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateExecutionRequest request =
+   *       CreateExecutionRequest.newBuilder()
+   *           .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .setExecutionId("executionId-454906285")
+   *           .setExecution(Execution.newBuilder().build())
+   *           .build();
+   *   Execution response = notebookServiceClient.createExecutionAsync(request).get();
+   * }
+   * }
+ * + * @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 + */ + public final OperationFuture createExecutionAsync( + CreateExecutionRequest request) { + return createExecutionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateExecutionRequest request =
+   *       CreateExecutionRequest.newBuilder()
+   *           .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .setExecutionId("executionId-454906285")
+   *           .setExecution(Execution.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       notebookServiceClient.createExecutionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Execution response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createExecutionOperationCallable() { + return stub.createExecutionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Scheduled Notebook in a given project and location. + * + *

Sample code: + * + *

{@code
+   * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+   *   CreateExecutionRequest request =
+   *       CreateExecutionRequest.newBuilder()
+   *           .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+   *           .setExecutionId("executionId-454906285")
+   *           .setExecution(Execution.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       notebookServiceClient.createExecutionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createExecutionCallable() { + return stub.createExecutionCallable(); + } + + @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 ListInstancesPagedResponse + extends AbstractPagedListResponse< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInstancesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInstancesPagedResponse(ListInstancesPage page) { + super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancesPage + extends AbstractPage< + ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { + + private ListInstancesPage( + PageContext context, + ListInstancesResponse response) { + super(context, response); + } + + private static ListInstancesPage createEmptyPage() { + return new ListInstancesPage(null, null); + } + + @Override + protected ListInstancesPage createPage( + PageContext context, + ListInstancesResponse response) { + return new ListInstancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + private ListInstancesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancesFixedSizeCollection createEmptyCollection() { + return new ListInstancesFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListEnvironmentsPagedResponse + extends AbstractPagedListResponse< + ListEnvironmentsRequest, + ListEnvironmentsResponse, + Environment, + ListEnvironmentsPage, + ListEnvironmentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEnvironmentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListEnvironmentsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListEnvironmentsPagedResponse(ListEnvironmentsPage page) { + super(page, ListEnvironmentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEnvironmentsPage + extends AbstractPage< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment, ListEnvironmentsPage> { + + private ListEnvironmentsPage( + PageContext context, + ListEnvironmentsResponse response) { + super(context, response); + } + + private static ListEnvironmentsPage createEmptyPage() { + return new ListEnvironmentsPage(null, null); + } + + @Override + protected ListEnvironmentsPage createPage( + PageContext context, + ListEnvironmentsResponse response) { + return new ListEnvironmentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEnvironmentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEnvironmentsRequest, + ListEnvironmentsResponse, + Environment, + ListEnvironmentsPage, + ListEnvironmentsFixedSizeCollection> { + + private ListEnvironmentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEnvironmentsFixedSizeCollection createEmptyCollection() { + return new ListEnvironmentsFixedSizeCollection(null, 0); + } + + @Override + protected ListEnvironmentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEnvironmentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSchedulesPagedResponse + extends AbstractPagedListResponse< + ListSchedulesRequest, + ListSchedulesResponse, + Schedule, + ListSchedulesPage, + ListSchedulesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSchedulesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSchedulesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSchedulesPagedResponse(ListSchedulesPage page) { + super(page, ListSchedulesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSchedulesPage + extends AbstractPage< + ListSchedulesRequest, ListSchedulesResponse, Schedule, ListSchedulesPage> { + + private ListSchedulesPage( + PageContext context, + ListSchedulesResponse response) { + super(context, response); + } + + private static ListSchedulesPage createEmptyPage() { + return new ListSchedulesPage(null, null); + } + + @Override + protected ListSchedulesPage createPage( + PageContext context, + ListSchedulesResponse response) { + return new ListSchedulesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSchedulesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSchedulesRequest, + ListSchedulesResponse, + Schedule, + ListSchedulesPage, + ListSchedulesFixedSizeCollection> { + + private ListSchedulesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSchedulesFixedSizeCollection createEmptyCollection() { + return new ListSchedulesFixedSizeCollection(null, 0); + } + + @Override + protected ListSchedulesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSchedulesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListExecutionsPagedResponse + extends AbstractPagedListResponse< + ListExecutionsRequest, + ListExecutionsResponse, + Execution, + ListExecutionsPage, + ListExecutionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListExecutionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListExecutionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListExecutionsPagedResponse(ListExecutionsPage page) { + super(page, ListExecutionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListExecutionsPage + extends AbstractPage< + ListExecutionsRequest, ListExecutionsResponse, Execution, ListExecutionsPage> { + + private ListExecutionsPage( + PageContext context, + ListExecutionsResponse response) { + super(context, response); + } + + private static ListExecutionsPage createEmptyPage() { + return new ListExecutionsPage(null, null); + } + + @Override + protected ListExecutionsPage createPage( + PageContext context, + ListExecutionsResponse response) { + return new ListExecutionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListExecutionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListExecutionsRequest, + ListExecutionsResponse, + Execution, + ListExecutionsPage, + ListExecutionsFixedSizeCollection> { + + private ListExecutionsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListExecutionsFixedSizeCollection createEmptyCollection() { + return new ListExecutionsFixedSizeCollection(null, 0); + } + + @Override + protected ListExecutionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListExecutionsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceSettings.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceSettings.java new file mode 100644 index 00000000..c7e89a1d --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceSettings.java @@ -0,0 +1,804 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListEnvironmentsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListInstancesPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse; + +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.grpc.InstantiatingGrpcChannelProvider; +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.OperationCallSettings; +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.notebooks.v1.stub.NotebookServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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 NotebookServiceClient}. + * + *

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

    + *
  • The default service address (notebooks.googleapis.com) 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 getInstance to 30 seconds: + * + *

{@code
+ * NotebookServiceSettings.Builder notebookServiceSettingsBuilder =
+ *     NotebookServiceSettings.newBuilder();
+ * notebookServiceSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         notebookServiceSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * NotebookServiceSettings notebookServiceSettings = notebookServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class NotebookServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listInstancesSettings(); + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).createInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).createInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to registerInstance. */ + public UnaryCallSettings registerInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).registerInstanceSettings(); + } + + /** Returns the object with the settings used for calls to registerInstance. */ + public OperationCallSettings + registerInstanceOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).registerInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to setInstanceAccelerator. */ + public UnaryCallSettings + setInstanceAcceleratorSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).setInstanceAcceleratorSettings(); + } + + /** Returns the object with the settings used for calls to setInstanceAccelerator. */ + public OperationCallSettings + setInstanceAcceleratorOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .setInstanceAcceleratorOperationSettings(); + } + + /** Returns the object with the settings used for calls to setInstanceMachineType. */ + public UnaryCallSettings + setInstanceMachineTypeSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).setInstanceMachineTypeSettings(); + } + + /** Returns the object with the settings used for calls to setInstanceMachineType. */ + public OperationCallSettings + setInstanceMachineTypeOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .setInstanceMachineTypeOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateInstanceConfig. */ + public UnaryCallSettings updateInstanceConfigSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).updateInstanceConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateInstanceConfig. */ + public OperationCallSettings + updateInstanceConfigOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .updateInstanceConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateShieldedInstanceConfig. */ + public UnaryCallSettings + updateShieldedInstanceConfigSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).updateShieldedInstanceConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateShieldedInstanceConfig. */ + public OperationCallSettings + updateShieldedInstanceConfigOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .updateShieldedInstanceConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to setInstanceLabels. */ + public UnaryCallSettings setInstanceLabelsSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).setInstanceLabelsSettings(); + } + + /** Returns the object with the settings used for calls to setInstanceLabels. */ + public OperationCallSettings + setInstanceLabelsOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).setInstanceLabelsOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to startInstance. */ + public UnaryCallSettings startInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).startInstanceSettings(); + } + + /** Returns the object with the settings used for calls to startInstance. */ + public OperationCallSettings + startInstanceOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).startInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public UnaryCallSettings stopInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).stopInstanceSettings(); + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public OperationCallSettings + stopInstanceOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).stopInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to resetInstance. */ + public UnaryCallSettings resetInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).resetInstanceSettings(); + } + + /** Returns the object with the settings used for calls to resetInstance. */ + public OperationCallSettings + resetInstanceOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).resetInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to reportInstanceInfo. */ + public UnaryCallSettings reportInstanceInfoSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).reportInstanceInfoSettings(); + } + + /** Returns the object with the settings used for calls to reportInstanceInfo. */ + public OperationCallSettings + reportInstanceInfoOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).reportInstanceInfoOperationSettings(); + } + + /** Returns the object with the settings used for calls to isInstanceUpgradeable. */ + public UnaryCallSettings + isInstanceUpgradeableSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).isInstanceUpgradeableSettings(); + } + + /** Returns the object with the settings used for calls to getInstanceHealth. */ + public UnaryCallSettings + getInstanceHealthSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getInstanceHealthSettings(); + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + public UnaryCallSettings upgradeInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).upgradeInstanceSettings(); + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + public OperationCallSettings + upgradeInstanceOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).upgradeInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to rollbackInstance. */ + public UnaryCallSettings rollbackInstanceSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).rollbackInstanceSettings(); + } + + /** Returns the object with the settings used for calls to rollbackInstance. */ + public OperationCallSettings + rollbackInstanceOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).rollbackInstanceOperationSettings(); + } + + /** Returns the object with the settings used for calls to upgradeInstanceInternal. */ + public UnaryCallSettings + upgradeInstanceInternalSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).upgradeInstanceInternalSettings(); + } + + /** Returns the object with the settings used for calls to upgradeInstanceInternal. */ + public OperationCallSettings + upgradeInstanceInternalOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()) + .upgradeInstanceInternalOperationSettings(); + } + + /** Returns the object with the settings used for calls to listEnvironments. */ + public PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listEnvironmentsSettings(); + } + + /** Returns the object with the settings used for calls to getEnvironment. */ + public UnaryCallSettings getEnvironmentSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to createEnvironment. */ + public UnaryCallSettings createEnvironmentSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).createEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to createEnvironment. */ + public OperationCallSettings + createEnvironmentOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).createEnvironmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings deleteEnvironmentSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public OperationCallSettings + deleteEnvironmentOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteEnvironmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to listSchedules. */ + public PagedCallSettings + listSchedulesSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listSchedulesSettings(); + } + + /** Returns the object with the settings used for calls to getSchedule. */ + public UnaryCallSettings getScheduleSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getScheduleSettings(); + } + + /** Returns the object with the settings used for calls to deleteSchedule. */ + public UnaryCallSettings deleteScheduleSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteScheduleSettings(); + } + + /** Returns the object with the settings used for calls to deleteSchedule. */ + public OperationCallSettings + deleteScheduleOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteScheduleOperationSettings(); + } + + /** Returns the object with the settings used for calls to createSchedule. */ + public UnaryCallSettings createScheduleSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).createScheduleSettings(); + } + + /** Returns the object with the settings used for calls to createSchedule. */ + public OperationCallSettings + createScheduleOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).createScheduleOperationSettings(); + } + + /** Returns the object with the settings used for calls to triggerSchedule. */ + public UnaryCallSettings triggerScheduleSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).triggerScheduleSettings(); + } + + /** Returns the object with the settings used for calls to triggerSchedule. */ + public OperationCallSettings + triggerScheduleOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).triggerScheduleOperationSettings(); + } + + /** Returns the object with the settings used for calls to listExecutions. */ + public PagedCallSettings< + ListExecutionsRequest, ListExecutionsResponse, ListExecutionsPagedResponse> + listExecutionsSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).listExecutionsSettings(); + } + + /** Returns the object with the settings used for calls to getExecution. */ + public UnaryCallSettings getExecutionSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).getExecutionSettings(); + } + + /** Returns the object with the settings used for calls to deleteExecution. */ + public UnaryCallSettings deleteExecutionSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteExecutionSettings(); + } + + /** Returns the object with the settings used for calls to deleteExecution. */ + public OperationCallSettings + deleteExecutionOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).deleteExecutionOperationSettings(); + } + + /** Returns the object with the settings used for calls to createExecution. */ + public UnaryCallSettings createExecutionSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).createExecutionSettings(); + } + + /** Returns the object with the settings used for calls to createExecution. */ + public OperationCallSettings + createExecutionOperationSettings() { + return ((NotebookServiceStubSettings) getStubSettings()).createExecutionOperationSettings(); + } + + public static final NotebookServiceSettings create(NotebookServiceStubSettings stub) + throws IOException { + return new NotebookServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return NotebookServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return NotebookServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return NotebookServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return NotebookServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return NotebookServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return NotebookServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return NotebookServiceStubSettings.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 NotebookServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for NotebookServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(NotebookServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(NotebookServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(NotebookServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(NotebookServiceStubSettings.newBuilder()); + } + + public NotebookServiceStubSettings.Builder getStubSettingsBuilder() { + return ((NotebookServiceStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return getStubSettingsBuilder().listInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getStubSettingsBuilder().getInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return getStubSettingsBuilder().createInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return getStubSettingsBuilder().createInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to registerInstance. */ + public UnaryCallSettings.Builder + registerInstanceSettings() { + return getStubSettingsBuilder().registerInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to registerInstance. */ + public OperationCallSettings.Builder + registerInstanceOperationSettings() { + return getStubSettingsBuilder().registerInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to setInstanceAccelerator. */ + public UnaryCallSettings.Builder + setInstanceAcceleratorSettings() { + return getStubSettingsBuilder().setInstanceAcceleratorSettings(); + } + + /** Returns the builder for the settings used for calls to setInstanceAccelerator. */ + public OperationCallSettings.Builder + setInstanceAcceleratorOperationSettings() { + return getStubSettingsBuilder().setInstanceAcceleratorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to setInstanceMachineType. */ + public UnaryCallSettings.Builder + setInstanceMachineTypeSettings() { + return getStubSettingsBuilder().setInstanceMachineTypeSettings(); + } + + /** Returns the builder for the settings used for calls to setInstanceMachineType. */ + public OperationCallSettings.Builder + setInstanceMachineTypeOperationSettings() { + return getStubSettingsBuilder().setInstanceMachineTypeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstanceConfig. */ + public UnaryCallSettings.Builder + updateInstanceConfigSettings() { + return getStubSettingsBuilder().updateInstanceConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateInstanceConfig. */ + public OperationCallSettings.Builder + updateInstanceConfigOperationSettings() { + return getStubSettingsBuilder().updateInstanceConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateShieldedInstanceConfig. */ + public UnaryCallSettings.Builder + updateShieldedInstanceConfigSettings() { + return getStubSettingsBuilder().updateShieldedInstanceConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateShieldedInstanceConfig. */ + public OperationCallSettings.Builder< + UpdateShieldedInstanceConfigRequest, Instance, OperationMetadata> + updateShieldedInstanceConfigOperationSettings() { + return getStubSettingsBuilder().updateShieldedInstanceConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to setInstanceLabels. */ + public UnaryCallSettings.Builder + setInstanceLabelsSettings() { + return getStubSettingsBuilder().setInstanceLabelsSettings(); + } + + /** Returns the builder for the settings used for calls to setInstanceLabels. */ + public OperationCallSettings.Builder + setInstanceLabelsOperationSettings() { + return getStubSettingsBuilder().setInstanceLabelsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return getStubSettingsBuilder().deleteInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return getStubSettingsBuilder().deleteInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startInstance. */ + public UnaryCallSettings.Builder startInstanceSettings() { + return getStubSettingsBuilder().startInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to startInstance. */ + public OperationCallSettings.Builder + startInstanceOperationSettings() { + return getStubSettingsBuilder().startInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public UnaryCallSettings.Builder stopInstanceSettings() { + return getStubSettingsBuilder().stopInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public OperationCallSettings.Builder + stopInstanceOperationSettings() { + return getStubSettingsBuilder().stopInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to resetInstance. */ + public UnaryCallSettings.Builder resetInstanceSettings() { + return getStubSettingsBuilder().resetInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to resetInstance. */ + public OperationCallSettings.Builder + resetInstanceOperationSettings() { + return getStubSettingsBuilder().resetInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to reportInstanceInfo. */ + public UnaryCallSettings.Builder + reportInstanceInfoSettings() { + return getStubSettingsBuilder().reportInstanceInfoSettings(); + } + + /** Returns the builder for the settings used for calls to reportInstanceInfo. */ + public OperationCallSettings.Builder + reportInstanceInfoOperationSettings() { + return getStubSettingsBuilder().reportInstanceInfoOperationSettings(); + } + + /** Returns the builder for the settings used for calls to isInstanceUpgradeable. */ + public UnaryCallSettings.Builder + isInstanceUpgradeableSettings() { + return getStubSettingsBuilder().isInstanceUpgradeableSettings(); + } + + /** Returns the builder for the settings used for calls to getInstanceHealth. */ + public UnaryCallSettings.Builder + getInstanceHealthSettings() { + return getStubSettingsBuilder().getInstanceHealthSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + public UnaryCallSettings.Builder upgradeInstanceSettings() { + return getStubSettingsBuilder().upgradeInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + public OperationCallSettings.Builder + upgradeInstanceOperationSettings() { + return getStubSettingsBuilder().upgradeInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to rollbackInstance. */ + public UnaryCallSettings.Builder + rollbackInstanceSettings() { + return getStubSettingsBuilder().rollbackInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to rollbackInstance. */ + public OperationCallSettings.Builder + rollbackInstanceOperationSettings() { + return getStubSettingsBuilder().rollbackInstanceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeInstanceInternal. */ + public UnaryCallSettings.Builder + upgradeInstanceInternalSettings() { + return getStubSettingsBuilder().upgradeInstanceInternalSettings(); + } + + /** Returns the builder for the settings used for calls to upgradeInstanceInternal. */ + public OperationCallSettings.Builder< + UpgradeInstanceInternalRequest, Instance, OperationMetadata> + upgradeInstanceInternalOperationSettings() { + return getStubSettingsBuilder().upgradeInstanceInternalOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return getStubSettingsBuilder().listEnvironmentsSettings(); + } + + /** Returns the builder for the settings used for calls to getEnvironment. */ + public UnaryCallSettings.Builder getEnvironmentSettings() { + return getStubSettingsBuilder().getEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + public UnaryCallSettings.Builder + createEnvironmentSettings() { + return getStubSettingsBuilder().createEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + public OperationCallSettings.Builder + createEnvironmentOperationSettings() { + return getStubSettingsBuilder().createEnvironmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings.Builder + deleteEnvironmentSettings() { + return getStubSettingsBuilder().deleteEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public OperationCallSettings.Builder + deleteEnvironmentOperationSettings() { + return getStubSettingsBuilder().deleteEnvironmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listSchedules. */ + public PagedCallSettings.Builder< + ListSchedulesRequest, ListSchedulesResponse, ListSchedulesPagedResponse> + listSchedulesSettings() { + return getStubSettingsBuilder().listSchedulesSettings(); + } + + /** Returns the builder for the settings used for calls to getSchedule. */ + public UnaryCallSettings.Builder getScheduleSettings() { + return getStubSettingsBuilder().getScheduleSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSchedule. */ + public UnaryCallSettings.Builder deleteScheduleSettings() { + return getStubSettingsBuilder().deleteScheduleSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSchedule. */ + public OperationCallSettings.Builder + deleteScheduleOperationSettings() { + return getStubSettingsBuilder().deleteScheduleOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createSchedule. */ + public UnaryCallSettings.Builder createScheduleSettings() { + return getStubSettingsBuilder().createScheduleSettings(); + } + + /** Returns the builder for the settings used for calls to createSchedule. */ + public OperationCallSettings.Builder + createScheduleOperationSettings() { + return getStubSettingsBuilder().createScheduleOperationSettings(); + } + + /** Returns the builder for the settings used for calls to triggerSchedule. */ + public UnaryCallSettings.Builder triggerScheduleSettings() { + return getStubSettingsBuilder().triggerScheduleSettings(); + } + + /** Returns the builder for the settings used for calls to triggerSchedule. */ + public OperationCallSettings.Builder + triggerScheduleOperationSettings() { + return getStubSettingsBuilder().triggerScheduleOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listExecutions. */ + public PagedCallSettings.Builder< + ListExecutionsRequest, ListExecutionsResponse, ListExecutionsPagedResponse> + listExecutionsSettings() { + return getStubSettingsBuilder().listExecutionsSettings(); + } + + /** Returns the builder for the settings used for calls to getExecution. */ + public UnaryCallSettings.Builder getExecutionSettings() { + return getStubSettingsBuilder().getExecutionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteExecution. */ + public UnaryCallSettings.Builder deleteExecutionSettings() { + return getStubSettingsBuilder().deleteExecutionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteExecution. */ + public OperationCallSettings.Builder + deleteExecutionOperationSettings() { + return getStubSettingsBuilder().deleteExecutionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createExecution. */ + public UnaryCallSettings.Builder createExecutionSettings() { + return getStubSettingsBuilder().createExecutionSettings(); + } + + /** Returns the builder for the settings used for calls to createExecution. */ + public OperationCallSettings.Builder + createExecutionOperationSettings() { + return getStubSettingsBuilder().createExecutionOperationSettings(); + } + + @Override + public NotebookServiceSettings build() throws IOException { + return new NotebookServiceSettings(this); + } + } +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/gapic_metadata.json b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/gapic_metadata.json new file mode 100644 index 00000000..57519fd6 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/gapic_metadata.json @@ -0,0 +1,150 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.notebooks.v1", + "libraryPackage": "com.google.cloud.notebooks.v1", + "services": { + "ManagedNotebookService": { + "clients": { + "grpc": { + "libraryClient": "ManagedNotebookServiceClient", + "rpcs": { + "CreateRuntime": { + "methods": ["createRuntimeAsync", "createRuntimeAsync", "createRuntimeAsync", "createRuntimeOperationCallable", "createRuntimeCallable"] + }, + "DeleteRuntime": { + "methods": ["deleteRuntimeAsync", "deleteRuntimeAsync", "deleteRuntimeAsync", "deleteRuntimeOperationCallable", "deleteRuntimeCallable"] + }, + "GetRuntime": { + "methods": ["getRuntime", "getRuntime", "getRuntime", "getRuntimeCallable"] + }, + "ListRuntimes": { + "methods": ["listRuntimes", "listRuntimes", "listRuntimes", "listRuntimesPagedCallable", "listRuntimesCallable"] + }, + "ReportRuntimeEvent": { + "methods": ["reportRuntimeEventAsync", "reportRuntimeEventAsync", "reportRuntimeEventAsync", "reportRuntimeEventOperationCallable", "reportRuntimeEventCallable"] + }, + "ResetRuntime": { + "methods": ["resetRuntimeAsync", "resetRuntimeAsync", "resetRuntimeOperationCallable", "resetRuntimeCallable"] + }, + "StartRuntime": { + "methods": ["startRuntimeAsync", "startRuntimeAsync", "startRuntimeOperationCallable", "startRuntimeCallable"] + }, + "StopRuntime": { + "methods": ["stopRuntimeAsync", "stopRuntimeAsync", "stopRuntimeOperationCallable", "stopRuntimeCallable"] + }, + "SwitchRuntime": { + "methods": ["switchRuntimeAsync", "switchRuntimeAsync", "switchRuntimeOperationCallable", "switchRuntimeCallable"] + } + } + } + } + }, + "NotebookService": { + "clients": { + "grpc": { + "libraryClient": "NotebookServiceClient", + "rpcs": { + "CreateEnvironment": { + "methods": ["createEnvironmentAsync", "createEnvironmentAsync", "createEnvironmentOperationCallable", "createEnvironmentCallable"] + }, + "CreateExecution": { + "methods": ["createExecutionAsync", "createExecutionAsync", "createExecutionAsync", "createExecutionOperationCallable", "createExecutionCallable"] + }, + "CreateInstance": { + "methods": ["createInstanceAsync", "createInstanceAsync", "createInstanceOperationCallable", "createInstanceCallable"] + }, + "CreateSchedule": { + "methods": ["createScheduleAsync", "createScheduleAsync", "createScheduleAsync", "createScheduleOperationCallable", "createScheduleCallable"] + }, + "DeleteEnvironment": { + "methods": ["deleteEnvironmentAsync", "deleteEnvironmentAsync", "deleteEnvironmentOperationCallable", "deleteEnvironmentCallable"] + }, + "DeleteExecution": { + "methods": ["deleteExecutionAsync", "deleteExecutionAsync", "deleteExecutionAsync", "deleteExecutionOperationCallable", "deleteExecutionCallable"] + }, + "DeleteInstance": { + "methods": ["deleteInstanceAsync", "deleteInstanceAsync", "deleteInstanceOperationCallable", "deleteInstanceCallable"] + }, + "DeleteSchedule": { + "methods": ["deleteScheduleAsync", "deleteScheduleAsync", "deleteScheduleAsync", "deleteScheduleOperationCallable", "deleteScheduleCallable"] + }, + "GetEnvironment": { + "methods": ["getEnvironment", "getEnvironment", "getEnvironmentCallable"] + }, + "GetExecution": { + "methods": ["getExecution", "getExecution", "getExecution", "getExecutionCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstance", "getInstanceCallable"] + }, + "GetInstanceHealth": { + "methods": ["getInstanceHealth", "getInstanceHealth", "getInstanceHealth", "getInstanceHealthCallable"] + }, + "GetSchedule": { + "methods": ["getSchedule", "getSchedule", "getSchedule", "getScheduleCallable"] + }, + "IsInstanceUpgradeable": { + "methods": ["isInstanceUpgradeable", "isInstanceUpgradeableCallable"] + }, + "ListEnvironments": { + "methods": ["listEnvironments", "listEnvironments", "listEnvironmentsPagedCallable", "listEnvironmentsCallable"] + }, + "ListExecutions": { + "methods": ["listExecutions", "listExecutions", "listExecutions", "listExecutionsPagedCallable", "listExecutionsCallable"] + }, + "ListInstances": { + "methods": ["listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] + }, + "ListSchedules": { + "methods": ["listSchedules", "listSchedules", "listSchedules", "listSchedulesPagedCallable", "listSchedulesCallable"] + }, + "RegisterInstance": { + "methods": ["registerInstanceAsync", "registerInstanceOperationCallable", "registerInstanceCallable"] + }, + "ReportInstanceInfo": { + "methods": ["reportInstanceInfoAsync", "reportInstanceInfoOperationCallable", "reportInstanceInfoCallable"] + }, + "ResetInstance": { + "methods": ["resetInstanceAsync", "resetInstanceOperationCallable", "resetInstanceCallable"] + }, + "RollbackInstance": { + "methods": ["rollbackInstanceAsync", "rollbackInstanceOperationCallable", "rollbackInstanceCallable"] + }, + "SetInstanceAccelerator": { + "methods": ["setInstanceAcceleratorAsync", "setInstanceAcceleratorOperationCallable", "setInstanceAcceleratorCallable"] + }, + "SetInstanceLabels": { + "methods": ["setInstanceLabelsAsync", "setInstanceLabelsOperationCallable", "setInstanceLabelsCallable"] + }, + "SetInstanceMachineType": { + "methods": ["setInstanceMachineTypeAsync", "setInstanceMachineTypeOperationCallable", "setInstanceMachineTypeCallable"] + }, + "StartInstance": { + "methods": ["startInstanceAsync", "startInstanceOperationCallable", "startInstanceCallable"] + }, + "StopInstance": { + "methods": ["stopInstanceAsync", "stopInstanceOperationCallable", "stopInstanceCallable"] + }, + "TriggerSchedule": { + "methods": ["triggerScheduleAsync", "triggerScheduleOperationCallable", "triggerScheduleCallable"] + }, + "UpdateInstanceConfig": { + "methods": ["updateInstanceConfigAsync", "updateInstanceConfigOperationCallable", "updateInstanceConfigCallable"] + }, + "UpdateShieldedInstanceConfig": { + "methods": ["updateShieldedInstanceConfigAsync", "updateShieldedInstanceConfigOperationCallable", "updateShieldedInstanceConfigCallable"] + }, + "UpgradeInstance": { + "methods": ["upgradeInstanceAsync", "upgradeInstanceOperationCallable", "upgradeInstanceCallable"] + }, + "UpgradeInstanceInternal": { + "methods": ["upgradeInstanceInternalAsync", "upgradeInstanceInternalOperationCallable", "upgradeInstanceInternalCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/package-info.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/package-info.java new file mode 100644 index 00000000..d68f6a28 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/package-info.java @@ -0,0 +1,52 @@ +/* + * Copyright 2021 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. + */ + +/** + * A client to Notebooks API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= ManagedNotebookServiceClient ======================= + * + *

Service Description: API v1 service for Managed Notebooks. + * + *

Sample for ManagedNotebookServiceClient: + * + *

{@code
+ * try (ManagedNotebookServiceClient managedNotebookServiceClient =
+ *     ManagedNotebookServiceClient.create()) {
+ *   RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]");
+ *   Runtime response = managedNotebookServiceClient.getRuntime(name);
+ * }
+ * }
+ * + *

======================= NotebookServiceClient ======================= + * + *

Service Description: API v1 service for Cloud AI Platform Notebooks. + * + *

Sample for NotebookServiceClient: + * + *

{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ *   String name = "name3373707";
+ *   Instance response = notebookServiceClient.getInstance(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.notebooks.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcManagedNotebookServiceCallableFactory.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcManagedNotebookServiceCallableFactory.java new file mode 100644 index 00000000..d287c0e3 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcManagedNotebookServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 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.notebooks.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +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.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ManagedNotebookService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcManagedNotebookServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcManagedNotebookServiceStub.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcManagedNotebookServiceStub.java new file mode 100644 index 00000000..f841622a --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcManagedNotebookServiceStub.java @@ -0,0 +1,514 @@ +/* + * Copyright 2021 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.notebooks.v1.stub; + +import static com.google.cloud.notebooks.v1.ManagedNotebookServiceClient.ListRuntimesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.notebooks.v1.CreateRuntimeRequest; +import com.google.cloud.notebooks.v1.DeleteRuntimeRequest; +import com.google.cloud.notebooks.v1.GetRuntimeRequest; +import com.google.cloud.notebooks.v1.ListRuntimesRequest; +import com.google.cloud.notebooks.v1.ListRuntimesResponse; +import com.google.cloud.notebooks.v1.OperationMetadata; +import com.google.cloud.notebooks.v1.ReportRuntimeEventRequest; +import com.google.cloud.notebooks.v1.ResetRuntimeRequest; +import com.google.cloud.notebooks.v1.Runtime; +import com.google.cloud.notebooks.v1.StartRuntimeRequest; +import com.google.cloud.notebooks.v1.StopRuntimeRequest; +import com.google.cloud.notebooks.v1.SwitchRuntimeRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ManagedNotebookService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcManagedNotebookServiceStub extends ManagedNotebookServiceStub { + private static final MethodDescriptor + listRuntimesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.ManagedNotebookService/ListRuntimes") + .setRequestMarshaller(ProtoUtils.marshaller(ListRuntimesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRuntimesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.ManagedNotebookService/GetRuntime") + .setRequestMarshaller(ProtoUtils.marshaller(GetRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Runtime.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.ManagedNotebookService/CreateRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.ManagedNotebookService/DeleteRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + startRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.ManagedNotebookService/StartRuntime") + .setRequestMarshaller(ProtoUtils.marshaller(StartRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor stopRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.ManagedNotebookService/StopRuntime") + .setRequestMarshaller(ProtoUtils.marshaller(StopRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + switchRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.ManagedNotebookService/SwitchRuntime") + .setRequestMarshaller( + ProtoUtils.marshaller(SwitchRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + resetRuntimeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.ManagedNotebookService/ResetRuntime") + .setRequestMarshaller(ProtoUtils.marshaller(ResetRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + reportRuntimeEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.notebooks.v1.ManagedNotebookService/ReportRuntimeEvent") + .setRequestMarshaller( + ProtoUtils.marshaller(ReportRuntimeEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable listRuntimesCallable; + private final UnaryCallable + listRuntimesPagedCallable; + private final UnaryCallable getRuntimeCallable; + private final UnaryCallable createRuntimeCallable; + private final OperationCallable + createRuntimeOperationCallable; + private final UnaryCallable deleteRuntimeCallable; + private final OperationCallable + deleteRuntimeOperationCallable; + private final UnaryCallable startRuntimeCallable; + private final OperationCallable + startRuntimeOperationCallable; + private final UnaryCallable stopRuntimeCallable; + private final OperationCallable + stopRuntimeOperationCallable; + private final UnaryCallable switchRuntimeCallable; + private final OperationCallable + switchRuntimeOperationCallable; + private final UnaryCallable resetRuntimeCallable; + private final OperationCallable + resetRuntimeOperationCallable; + private final UnaryCallable reportRuntimeEventCallable; + private final OperationCallable + reportRuntimeEventOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcManagedNotebookServiceStub create( + ManagedNotebookServiceStubSettings settings) throws IOException { + return new GrpcManagedNotebookServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcManagedNotebookServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcManagedNotebookServiceStub( + ManagedNotebookServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcManagedNotebookServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcManagedNotebookServiceStub( + ManagedNotebookServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcManagedNotebookServiceStub, 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 GrpcManagedNotebookServiceStub( + ManagedNotebookServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcManagedNotebookServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcManagedNotebookServiceStub, 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 GrpcManagedNotebookServiceStub( + ManagedNotebookServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listRuntimesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRuntimesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings startRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings stopRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings switchRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(switchRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings resetRuntimeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resetRuntimeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings reportRuntimeEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(reportRuntimeEventMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.listRuntimesCallable = + callableFactory.createUnaryCallable( + listRuntimesTransportSettings, settings.listRuntimesSettings(), clientContext); + this.listRuntimesPagedCallable = + callableFactory.createPagedCallable( + listRuntimesTransportSettings, settings.listRuntimesSettings(), clientContext); + this.getRuntimeCallable = + callableFactory.createUnaryCallable( + getRuntimeTransportSettings, settings.getRuntimeSettings(), clientContext); + this.createRuntimeCallable = + callableFactory.createUnaryCallable( + createRuntimeTransportSettings, settings.createRuntimeSettings(), clientContext); + this.createRuntimeOperationCallable = + callableFactory.createOperationCallable( + createRuntimeTransportSettings, + settings.createRuntimeOperationSettings(), + clientContext, + operationsStub); + this.deleteRuntimeCallable = + callableFactory.createUnaryCallable( + deleteRuntimeTransportSettings, settings.deleteRuntimeSettings(), clientContext); + this.deleteRuntimeOperationCallable = + callableFactory.createOperationCallable( + deleteRuntimeTransportSettings, + settings.deleteRuntimeOperationSettings(), + clientContext, + operationsStub); + this.startRuntimeCallable = + callableFactory.createUnaryCallable( + startRuntimeTransportSettings, settings.startRuntimeSettings(), clientContext); + this.startRuntimeOperationCallable = + callableFactory.createOperationCallable( + startRuntimeTransportSettings, + settings.startRuntimeOperationSettings(), + clientContext, + operationsStub); + this.stopRuntimeCallable = + callableFactory.createUnaryCallable( + stopRuntimeTransportSettings, settings.stopRuntimeSettings(), clientContext); + this.stopRuntimeOperationCallable = + callableFactory.createOperationCallable( + stopRuntimeTransportSettings, + settings.stopRuntimeOperationSettings(), + clientContext, + operationsStub); + this.switchRuntimeCallable = + callableFactory.createUnaryCallable( + switchRuntimeTransportSettings, settings.switchRuntimeSettings(), clientContext); + this.switchRuntimeOperationCallable = + callableFactory.createOperationCallable( + switchRuntimeTransportSettings, + settings.switchRuntimeOperationSettings(), + clientContext, + operationsStub); + this.resetRuntimeCallable = + callableFactory.createUnaryCallable( + resetRuntimeTransportSettings, settings.resetRuntimeSettings(), clientContext); + this.resetRuntimeOperationCallable = + callableFactory.createOperationCallable( + resetRuntimeTransportSettings, + settings.resetRuntimeOperationSettings(), + clientContext, + operationsStub); + this.reportRuntimeEventCallable = + callableFactory.createUnaryCallable( + reportRuntimeEventTransportSettings, + settings.reportRuntimeEventSettings(), + clientContext); + this.reportRuntimeEventOperationCallable = + callableFactory.createOperationCallable( + reportRuntimeEventTransportSettings, + settings.reportRuntimeEventOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listRuntimesCallable() { + return listRuntimesCallable; + } + + @Override + public UnaryCallable listRuntimesPagedCallable() { + return listRuntimesPagedCallable; + } + + @Override + public UnaryCallable getRuntimeCallable() { + return getRuntimeCallable; + } + + @Override + public UnaryCallable createRuntimeCallable() { + return createRuntimeCallable; + } + + @Override + public OperationCallable + createRuntimeOperationCallable() { + return createRuntimeOperationCallable; + } + + @Override + public UnaryCallable deleteRuntimeCallable() { + return deleteRuntimeCallable; + } + + @Override + public OperationCallable + deleteRuntimeOperationCallable() { + return deleteRuntimeOperationCallable; + } + + @Override + public UnaryCallable startRuntimeCallable() { + return startRuntimeCallable; + } + + @Override + public OperationCallable + startRuntimeOperationCallable() { + return startRuntimeOperationCallable; + } + + @Override + public UnaryCallable stopRuntimeCallable() { + return stopRuntimeCallable; + } + + @Override + public OperationCallable + stopRuntimeOperationCallable() { + return stopRuntimeOperationCallable; + } + + @Override + public UnaryCallable switchRuntimeCallable() { + return switchRuntimeCallable; + } + + @Override + public OperationCallable + switchRuntimeOperationCallable() { + return switchRuntimeOperationCallable; + } + + @Override + public UnaryCallable resetRuntimeCallable() { + return resetRuntimeCallable; + } + + @Override + public OperationCallable + resetRuntimeOperationCallable() { + return resetRuntimeOperationCallable; + } + + @Override + public UnaryCallable reportRuntimeEventCallable() { + return reportRuntimeEventCallable; + } + + @Override + public OperationCallable + reportRuntimeEventOperationCallable() { + return reportRuntimeEventOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcNotebookServiceCallableFactory.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcNotebookServiceCallableFactory.java new file mode 100644 index 00000000..bd54cb52 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcNotebookServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 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.notebooks.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +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.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the NotebookService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcNotebookServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcNotebookServiceStub.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcNotebookServiceStub.java new file mode 100644 index 00000000..938a86b6 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/GrpcNotebookServiceStub.java @@ -0,0 +1,1508 @@ +/* + * Copyright 2021 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.notebooks.v1.stub; + +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListEnvironmentsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListInstancesPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.notebooks.v1.CreateEnvironmentRequest; +import com.google.cloud.notebooks.v1.CreateExecutionRequest; +import com.google.cloud.notebooks.v1.CreateInstanceRequest; +import com.google.cloud.notebooks.v1.CreateScheduleRequest; +import com.google.cloud.notebooks.v1.DeleteEnvironmentRequest; +import com.google.cloud.notebooks.v1.DeleteExecutionRequest; +import com.google.cloud.notebooks.v1.DeleteInstanceRequest; +import com.google.cloud.notebooks.v1.DeleteScheduleRequest; +import com.google.cloud.notebooks.v1.Environment; +import com.google.cloud.notebooks.v1.Execution; +import com.google.cloud.notebooks.v1.GetEnvironmentRequest; +import com.google.cloud.notebooks.v1.GetExecutionRequest; +import com.google.cloud.notebooks.v1.GetInstanceHealthRequest; +import com.google.cloud.notebooks.v1.GetInstanceHealthResponse; +import com.google.cloud.notebooks.v1.GetInstanceRequest; +import com.google.cloud.notebooks.v1.GetScheduleRequest; +import com.google.cloud.notebooks.v1.Instance; +import com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest; +import com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse; +import com.google.cloud.notebooks.v1.ListEnvironmentsRequest; +import com.google.cloud.notebooks.v1.ListEnvironmentsResponse; +import com.google.cloud.notebooks.v1.ListExecutionsRequest; +import com.google.cloud.notebooks.v1.ListExecutionsResponse; +import com.google.cloud.notebooks.v1.ListInstancesRequest; +import com.google.cloud.notebooks.v1.ListInstancesResponse; +import com.google.cloud.notebooks.v1.ListSchedulesRequest; +import com.google.cloud.notebooks.v1.ListSchedulesResponse; +import com.google.cloud.notebooks.v1.OperationMetadata; +import com.google.cloud.notebooks.v1.RegisterInstanceRequest; +import com.google.cloud.notebooks.v1.ReportInstanceInfoRequest; +import com.google.cloud.notebooks.v1.ResetInstanceRequest; +import com.google.cloud.notebooks.v1.RollbackInstanceRequest; +import com.google.cloud.notebooks.v1.Schedule; +import com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest; +import com.google.cloud.notebooks.v1.SetInstanceLabelsRequest; +import com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest; +import com.google.cloud.notebooks.v1.StartInstanceRequest; +import com.google.cloud.notebooks.v1.StopInstanceRequest; +import com.google.cloud.notebooks.v1.TriggerScheduleRequest; +import com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest; +import com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest; +import com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest; +import com.google.cloud.notebooks.v1.UpgradeInstanceRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the NotebookService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcNotebookServiceStub extends NotebookServiceStub { + private static final MethodDescriptor + listInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/ListInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/GetInstance") + .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/CreateInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + registerInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/RegisterInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(RegisterInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + setInstanceAcceleratorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/SetInstanceAccelerator") + .setRequestMarshaller( + ProtoUtils.marshaller(SetInstanceAcceleratorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + setInstanceMachineTypeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/SetInstanceMachineType") + .setRequestMarshaller( + ProtoUtils.marshaller(SetInstanceMachineTypeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateInstanceConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/UpdateInstanceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateInstanceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateShieldedInstanceConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.notebooks.v1.NotebookService/UpdateShieldedInstanceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateShieldedInstanceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + setInstanceLabelsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/SetInstanceLabels") + .setRequestMarshaller( + ProtoUtils.marshaller(SetInstanceLabelsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/DeleteInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + startInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/StartInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(StartInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + stopInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/StopInstance") + .setRequestMarshaller(ProtoUtils.marshaller(StopInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + resetInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/ResetInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(ResetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + reportInstanceInfoMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/ReportInstanceInfo") + .setRequestMarshaller( + ProtoUtils.marshaller(ReportInstanceInfoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + isInstanceUpgradeableMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/IsInstanceUpgradeable") + .setRequestMarshaller( + ProtoUtils.marshaller(IsInstanceUpgradeableRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(IsInstanceUpgradeableResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getInstanceHealthMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/GetInstanceHealth") + .setRequestMarshaller( + ProtoUtils.marshaller(GetInstanceHealthRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GetInstanceHealthResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + upgradeInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/UpgradeInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(UpgradeInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + rollbackInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/RollbackInstance") + .setRequestMarshaller( + ProtoUtils.marshaller(RollbackInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + upgradeInstanceInternalMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.notebooks.v1.NotebookService/UpgradeInstanceInternal") + .setRequestMarshaller( + ProtoUtils.marshaller(UpgradeInstanceInternalRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listEnvironmentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/ListEnvironments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEnvironmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEnvironmentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/GetEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Environment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/CreateEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/DeleteEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSchedulesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/ListSchedules") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSchedulesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSchedulesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getScheduleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/GetSchedule") + .setRequestMarshaller(ProtoUtils.marshaller(GetScheduleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Schedule.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteScheduleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/DeleteSchedule") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteScheduleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createScheduleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/CreateSchedule") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateScheduleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + triggerScheduleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/TriggerSchedule") + .setRequestMarshaller( + ProtoUtils.marshaller(TriggerScheduleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listExecutionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/ListExecutions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListExecutionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListExecutionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getExecutionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/GetExecution") + .setRequestMarshaller(ProtoUtils.marshaller(GetExecutionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Execution.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteExecutionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/DeleteExecution") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteExecutionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createExecutionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.notebooks.v1.NotebookService/CreateExecution") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateExecutionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable createInstanceCallable; + private final OperationCallable + createInstanceOperationCallable; + private final UnaryCallable registerInstanceCallable; + private final OperationCallable + registerInstanceOperationCallable; + private final UnaryCallable + setInstanceAcceleratorCallable; + private final OperationCallable + setInstanceAcceleratorOperationCallable; + private final UnaryCallable + setInstanceMachineTypeCallable; + private final OperationCallable + setInstanceMachineTypeOperationCallable; + private final UnaryCallable updateInstanceConfigCallable; + private final OperationCallable + updateInstanceConfigOperationCallable; + private final UnaryCallable + updateShieldedInstanceConfigCallable; + private final OperationCallable + updateShieldedInstanceConfigOperationCallable; + private final UnaryCallable setInstanceLabelsCallable; + private final OperationCallable + setInstanceLabelsOperationCallable; + private final UnaryCallable deleteInstanceCallable; + private final OperationCallable + deleteInstanceOperationCallable; + private final UnaryCallable startInstanceCallable; + private final OperationCallable + startInstanceOperationCallable; + private final UnaryCallable stopInstanceCallable; + private final OperationCallable + stopInstanceOperationCallable; + private final UnaryCallable resetInstanceCallable; + private final OperationCallable + resetInstanceOperationCallable; + private final UnaryCallable reportInstanceInfoCallable; + private final OperationCallable + reportInstanceInfoOperationCallable; + private final UnaryCallable + isInstanceUpgradeableCallable; + private final UnaryCallable + getInstanceHealthCallable; + private final UnaryCallable upgradeInstanceCallable; + private final OperationCallable + upgradeInstanceOperationCallable; + private final UnaryCallable rollbackInstanceCallable; + private final OperationCallable + rollbackInstanceOperationCallable; + private final UnaryCallable + upgradeInstanceInternalCallable; + private final OperationCallable + upgradeInstanceInternalOperationCallable; + private final UnaryCallable + listEnvironmentsCallable; + private final UnaryCallable + listEnvironmentsPagedCallable; + private final UnaryCallable getEnvironmentCallable; + private final UnaryCallable createEnvironmentCallable; + private final OperationCallable + createEnvironmentOperationCallable; + private final UnaryCallable deleteEnvironmentCallable; + private final OperationCallable + deleteEnvironmentOperationCallable; + private final UnaryCallable listSchedulesCallable; + private final UnaryCallable + listSchedulesPagedCallable; + private final UnaryCallable getScheduleCallable; + private final UnaryCallable deleteScheduleCallable; + private final OperationCallable + deleteScheduleOperationCallable; + private final UnaryCallable createScheduleCallable; + private final OperationCallable + createScheduleOperationCallable; + private final UnaryCallable triggerScheduleCallable; + private final OperationCallable + triggerScheduleOperationCallable; + private final UnaryCallable listExecutionsCallable; + private final UnaryCallable + listExecutionsPagedCallable; + private final UnaryCallable getExecutionCallable; + private final UnaryCallable deleteExecutionCallable; + private final OperationCallable + deleteExecutionOperationCallable; + private final UnaryCallable createExecutionCallable; + private final OperationCallable + createExecutionOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcNotebookServiceStub create(NotebookServiceStubSettings settings) + throws IOException { + return new GrpcNotebookServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcNotebookServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcNotebookServiceStub( + NotebookServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcNotebookServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcNotebookServiceStub( + NotebookServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcNotebookServiceStub, 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 GrpcNotebookServiceStub( + NotebookServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcNotebookServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcNotebookServiceStub, 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 GrpcNotebookServiceStub( + NotebookServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings registerInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(registerInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + setInstanceAcceleratorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setInstanceAcceleratorMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + setInstanceMachineTypeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setInstanceMachineTypeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updateInstanceConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateInstanceConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateShieldedInstanceConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateShieldedInstanceConfigMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setInstanceLabelsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setInstanceLabelsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings startInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings stopInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings resetInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resetInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings reportInstanceInfoTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(reportInstanceInfoMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + isInstanceUpgradeableTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(isInstanceUpgradeableMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "notebook_instance", String.valueOf(request.getNotebookInstance())); + return params.build(); + }) + .build(); + GrpcCallSettings + getInstanceHealthTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceHealthMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings upgradeInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(upgradeInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings rollbackInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rollbackInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + upgradeInstanceInternalTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(upgradeInstanceInternalMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listEnvironmentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEnvironmentsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEnvironmentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createEnvironmentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEnvironmentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listSchedulesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSchedulesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getScheduleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getScheduleMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteScheduleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteScheduleMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createScheduleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createScheduleMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings triggerScheduleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(triggerScheduleMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listExecutionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listExecutionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getExecutionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getExecutionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteExecutionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteExecutionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createExecutionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createExecutionMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.createInstanceCallable = + callableFactory.createUnaryCallable( + createInstanceTransportSettings, settings.createInstanceSettings(), clientContext); + this.createInstanceOperationCallable = + callableFactory.createOperationCallable( + createInstanceTransportSettings, + settings.createInstanceOperationSettings(), + clientContext, + operationsStub); + this.registerInstanceCallable = + callableFactory.createUnaryCallable( + registerInstanceTransportSettings, settings.registerInstanceSettings(), clientContext); + this.registerInstanceOperationCallable = + callableFactory.createOperationCallable( + registerInstanceTransportSettings, + settings.registerInstanceOperationSettings(), + clientContext, + operationsStub); + this.setInstanceAcceleratorCallable = + callableFactory.createUnaryCallable( + setInstanceAcceleratorTransportSettings, + settings.setInstanceAcceleratorSettings(), + clientContext); + this.setInstanceAcceleratorOperationCallable = + callableFactory.createOperationCallable( + setInstanceAcceleratorTransportSettings, + settings.setInstanceAcceleratorOperationSettings(), + clientContext, + operationsStub); + this.setInstanceMachineTypeCallable = + callableFactory.createUnaryCallable( + setInstanceMachineTypeTransportSettings, + settings.setInstanceMachineTypeSettings(), + clientContext); + this.setInstanceMachineTypeOperationCallable = + callableFactory.createOperationCallable( + setInstanceMachineTypeTransportSettings, + settings.setInstanceMachineTypeOperationSettings(), + clientContext, + operationsStub); + this.updateInstanceConfigCallable = + callableFactory.createUnaryCallable( + updateInstanceConfigTransportSettings, + settings.updateInstanceConfigSettings(), + clientContext); + this.updateInstanceConfigOperationCallable = + callableFactory.createOperationCallable( + updateInstanceConfigTransportSettings, + settings.updateInstanceConfigOperationSettings(), + clientContext, + operationsStub); + this.updateShieldedInstanceConfigCallable = + callableFactory.createUnaryCallable( + updateShieldedInstanceConfigTransportSettings, + settings.updateShieldedInstanceConfigSettings(), + clientContext); + this.updateShieldedInstanceConfigOperationCallable = + callableFactory.createOperationCallable( + updateShieldedInstanceConfigTransportSettings, + settings.updateShieldedInstanceConfigOperationSettings(), + clientContext, + operationsStub); + this.setInstanceLabelsCallable = + callableFactory.createUnaryCallable( + setInstanceLabelsTransportSettings, + settings.setInstanceLabelsSettings(), + clientContext); + this.setInstanceLabelsOperationCallable = + callableFactory.createOperationCallable( + setInstanceLabelsTransportSettings, + settings.setInstanceLabelsOperationSettings(), + clientContext, + operationsStub); + this.deleteInstanceCallable = + callableFactory.createUnaryCallable( + deleteInstanceTransportSettings, settings.deleteInstanceSettings(), clientContext); + this.deleteInstanceOperationCallable = + callableFactory.createOperationCallable( + deleteInstanceTransportSettings, + settings.deleteInstanceOperationSettings(), + clientContext, + operationsStub); + this.startInstanceCallable = + callableFactory.createUnaryCallable( + startInstanceTransportSettings, settings.startInstanceSettings(), clientContext); + this.startInstanceOperationCallable = + callableFactory.createOperationCallable( + startInstanceTransportSettings, + settings.startInstanceOperationSettings(), + clientContext, + operationsStub); + this.stopInstanceCallable = + callableFactory.createUnaryCallable( + stopInstanceTransportSettings, settings.stopInstanceSettings(), clientContext); + this.stopInstanceOperationCallable = + callableFactory.createOperationCallable( + stopInstanceTransportSettings, + settings.stopInstanceOperationSettings(), + clientContext, + operationsStub); + this.resetInstanceCallable = + callableFactory.createUnaryCallable( + resetInstanceTransportSettings, settings.resetInstanceSettings(), clientContext); + this.resetInstanceOperationCallable = + callableFactory.createOperationCallable( + resetInstanceTransportSettings, + settings.resetInstanceOperationSettings(), + clientContext, + operationsStub); + this.reportInstanceInfoCallable = + callableFactory.createUnaryCallable( + reportInstanceInfoTransportSettings, + settings.reportInstanceInfoSettings(), + clientContext); + this.reportInstanceInfoOperationCallable = + callableFactory.createOperationCallable( + reportInstanceInfoTransportSettings, + settings.reportInstanceInfoOperationSettings(), + clientContext, + operationsStub); + this.isInstanceUpgradeableCallable = + callableFactory.createUnaryCallable( + isInstanceUpgradeableTransportSettings, + settings.isInstanceUpgradeableSettings(), + clientContext); + this.getInstanceHealthCallable = + callableFactory.createUnaryCallable( + getInstanceHealthTransportSettings, + settings.getInstanceHealthSettings(), + clientContext); + this.upgradeInstanceCallable = + callableFactory.createUnaryCallable( + upgradeInstanceTransportSettings, settings.upgradeInstanceSettings(), clientContext); + this.upgradeInstanceOperationCallable = + callableFactory.createOperationCallable( + upgradeInstanceTransportSettings, + settings.upgradeInstanceOperationSettings(), + clientContext, + operationsStub); + this.rollbackInstanceCallable = + callableFactory.createUnaryCallable( + rollbackInstanceTransportSettings, settings.rollbackInstanceSettings(), clientContext); + this.rollbackInstanceOperationCallable = + callableFactory.createOperationCallable( + rollbackInstanceTransportSettings, + settings.rollbackInstanceOperationSettings(), + clientContext, + operationsStub); + this.upgradeInstanceInternalCallable = + callableFactory.createUnaryCallable( + upgradeInstanceInternalTransportSettings, + settings.upgradeInstanceInternalSettings(), + clientContext); + this.upgradeInstanceInternalOperationCallable = + callableFactory.createOperationCallable( + upgradeInstanceInternalTransportSettings, + settings.upgradeInstanceInternalOperationSettings(), + clientContext, + operationsStub); + this.listEnvironmentsCallable = + callableFactory.createUnaryCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + this.listEnvironmentsPagedCallable = + callableFactory.createPagedCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + this.getEnvironmentCallable = + callableFactory.createUnaryCallable( + getEnvironmentTransportSettings, settings.getEnvironmentSettings(), clientContext); + this.createEnvironmentCallable = + callableFactory.createUnaryCallable( + createEnvironmentTransportSettings, + settings.createEnvironmentSettings(), + clientContext); + this.createEnvironmentOperationCallable = + callableFactory.createOperationCallable( + createEnvironmentTransportSettings, + settings.createEnvironmentOperationSettings(), + clientContext, + operationsStub); + this.deleteEnvironmentCallable = + callableFactory.createUnaryCallable( + deleteEnvironmentTransportSettings, + settings.deleteEnvironmentSettings(), + clientContext); + this.deleteEnvironmentOperationCallable = + callableFactory.createOperationCallable( + deleteEnvironmentTransportSettings, + settings.deleteEnvironmentOperationSettings(), + clientContext, + operationsStub); + this.listSchedulesCallable = + callableFactory.createUnaryCallable( + listSchedulesTransportSettings, settings.listSchedulesSettings(), clientContext); + this.listSchedulesPagedCallable = + callableFactory.createPagedCallable( + listSchedulesTransportSettings, settings.listSchedulesSettings(), clientContext); + this.getScheduleCallable = + callableFactory.createUnaryCallable( + getScheduleTransportSettings, settings.getScheduleSettings(), clientContext); + this.deleteScheduleCallable = + callableFactory.createUnaryCallable( + deleteScheduleTransportSettings, settings.deleteScheduleSettings(), clientContext); + this.deleteScheduleOperationCallable = + callableFactory.createOperationCallable( + deleteScheduleTransportSettings, + settings.deleteScheduleOperationSettings(), + clientContext, + operationsStub); + this.createScheduleCallable = + callableFactory.createUnaryCallable( + createScheduleTransportSettings, settings.createScheduleSettings(), clientContext); + this.createScheduleOperationCallable = + callableFactory.createOperationCallable( + createScheduleTransportSettings, + settings.createScheduleOperationSettings(), + clientContext, + operationsStub); + this.triggerScheduleCallable = + callableFactory.createUnaryCallable( + triggerScheduleTransportSettings, settings.triggerScheduleSettings(), clientContext); + this.triggerScheduleOperationCallable = + callableFactory.createOperationCallable( + triggerScheduleTransportSettings, + settings.triggerScheduleOperationSettings(), + clientContext, + operationsStub); + this.listExecutionsCallable = + callableFactory.createUnaryCallable( + listExecutionsTransportSettings, settings.listExecutionsSettings(), clientContext); + this.listExecutionsPagedCallable = + callableFactory.createPagedCallable( + listExecutionsTransportSettings, settings.listExecutionsSettings(), clientContext); + this.getExecutionCallable = + callableFactory.createUnaryCallable( + getExecutionTransportSettings, settings.getExecutionSettings(), clientContext); + this.deleteExecutionCallable = + callableFactory.createUnaryCallable( + deleteExecutionTransportSettings, settings.deleteExecutionSettings(), clientContext); + this.deleteExecutionOperationCallable = + callableFactory.createOperationCallable( + deleteExecutionTransportSettings, + settings.deleteExecutionOperationSettings(), + clientContext, + operationsStub); + this.createExecutionCallable = + callableFactory.createUnaryCallable( + createExecutionTransportSettings, settings.createExecutionSettings(), clientContext); + this.createExecutionOperationCallable = + callableFactory.createOperationCallable( + createExecutionTransportSettings, + settings.createExecutionOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable createInstanceCallable() { + return createInstanceCallable; + } + + @Override + public OperationCallable + createInstanceOperationCallable() { + return createInstanceOperationCallable; + } + + @Override + public UnaryCallable registerInstanceCallable() { + return registerInstanceCallable; + } + + @Override + public OperationCallable + registerInstanceOperationCallable() { + return registerInstanceOperationCallable; + } + + @Override + public UnaryCallable setInstanceAcceleratorCallable() { + return setInstanceAcceleratorCallable; + } + + @Override + public OperationCallable + setInstanceAcceleratorOperationCallable() { + return setInstanceAcceleratorOperationCallable; + } + + @Override + public UnaryCallable setInstanceMachineTypeCallable() { + return setInstanceMachineTypeCallable; + } + + @Override + public OperationCallable + setInstanceMachineTypeOperationCallable() { + return setInstanceMachineTypeOperationCallable; + } + + @Override + public UnaryCallable updateInstanceConfigCallable() { + return updateInstanceConfigCallable; + } + + @Override + public OperationCallable + updateInstanceConfigOperationCallable() { + return updateInstanceConfigOperationCallable; + } + + @Override + public UnaryCallable + updateShieldedInstanceConfigCallable() { + return updateShieldedInstanceConfigCallable; + } + + @Override + public OperationCallable + updateShieldedInstanceConfigOperationCallable() { + return updateShieldedInstanceConfigOperationCallable; + } + + @Override + public UnaryCallable setInstanceLabelsCallable() { + return setInstanceLabelsCallable; + } + + @Override + public OperationCallable + setInstanceLabelsOperationCallable() { + return setInstanceLabelsOperationCallable; + } + + @Override + public UnaryCallable deleteInstanceCallable() { + return deleteInstanceCallable; + } + + @Override + public OperationCallable + deleteInstanceOperationCallable() { + return deleteInstanceOperationCallable; + } + + @Override + public UnaryCallable startInstanceCallable() { + return startInstanceCallable; + } + + @Override + public OperationCallable + startInstanceOperationCallable() { + return startInstanceOperationCallable; + } + + @Override + public UnaryCallable stopInstanceCallable() { + return stopInstanceCallable; + } + + @Override + public OperationCallable + stopInstanceOperationCallable() { + return stopInstanceOperationCallable; + } + + @Override + public UnaryCallable resetInstanceCallable() { + return resetInstanceCallable; + } + + @Override + public OperationCallable + resetInstanceOperationCallable() { + return resetInstanceOperationCallable; + } + + @Override + public UnaryCallable reportInstanceInfoCallable() { + return reportInstanceInfoCallable; + } + + @Override + public OperationCallable + reportInstanceInfoOperationCallable() { + return reportInstanceInfoOperationCallable; + } + + @Override + public UnaryCallable + isInstanceUpgradeableCallable() { + return isInstanceUpgradeableCallable; + } + + @Override + public UnaryCallable + getInstanceHealthCallable() { + return getInstanceHealthCallable; + } + + @Override + public UnaryCallable upgradeInstanceCallable() { + return upgradeInstanceCallable; + } + + @Override + public OperationCallable + upgradeInstanceOperationCallable() { + return upgradeInstanceOperationCallable; + } + + @Override + public UnaryCallable rollbackInstanceCallable() { + return rollbackInstanceCallable; + } + + @Override + public OperationCallable + rollbackInstanceOperationCallable() { + return rollbackInstanceOperationCallable; + } + + @Override + public UnaryCallable + upgradeInstanceInternalCallable() { + return upgradeInstanceInternalCallable; + } + + @Override + public OperationCallable + upgradeInstanceInternalOperationCallable() { + return upgradeInstanceInternalOperationCallable; + } + + @Override + public UnaryCallable + listEnvironmentsCallable() { + return listEnvironmentsCallable; + } + + @Override + public UnaryCallable + listEnvironmentsPagedCallable() { + return listEnvironmentsPagedCallable; + } + + @Override + public UnaryCallable getEnvironmentCallable() { + return getEnvironmentCallable; + } + + @Override + public UnaryCallable createEnvironmentCallable() { + return createEnvironmentCallable; + } + + @Override + public OperationCallable + createEnvironmentOperationCallable() { + return createEnvironmentOperationCallable; + } + + @Override + public UnaryCallable deleteEnvironmentCallable() { + return deleteEnvironmentCallable; + } + + @Override + public OperationCallable + deleteEnvironmentOperationCallable() { + return deleteEnvironmentOperationCallable; + } + + @Override + public UnaryCallable listSchedulesCallable() { + return listSchedulesCallable; + } + + @Override + public UnaryCallable + listSchedulesPagedCallable() { + return listSchedulesPagedCallable; + } + + @Override + public UnaryCallable getScheduleCallable() { + return getScheduleCallable; + } + + @Override + public UnaryCallable deleteScheduleCallable() { + return deleteScheduleCallable; + } + + @Override + public OperationCallable + deleteScheduleOperationCallable() { + return deleteScheduleOperationCallable; + } + + @Override + public UnaryCallable createScheduleCallable() { + return createScheduleCallable; + } + + @Override + public OperationCallable + createScheduleOperationCallable() { + return createScheduleOperationCallable; + } + + @Override + public UnaryCallable triggerScheduleCallable() { + return triggerScheduleCallable; + } + + @Override + public OperationCallable + triggerScheduleOperationCallable() { + return triggerScheduleOperationCallable; + } + + @Override + public UnaryCallable listExecutionsCallable() { + return listExecutionsCallable; + } + + @Override + public UnaryCallable + listExecutionsPagedCallable() { + return listExecutionsPagedCallable; + } + + @Override + public UnaryCallable getExecutionCallable() { + return getExecutionCallable; + } + + @Override + public UnaryCallable deleteExecutionCallable() { + return deleteExecutionCallable; + } + + @Override + public OperationCallable + deleteExecutionOperationCallable() { + return deleteExecutionOperationCallable; + } + + @Override + public UnaryCallable createExecutionCallable() { + return createExecutionCallable; + } + + @Override + public OperationCallable + createExecutionOperationCallable() { + return createExecutionOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/ManagedNotebookServiceStub.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/ManagedNotebookServiceStub.java new file mode 100644 index 00000000..4f3f4d64 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/ManagedNotebookServiceStub.java @@ -0,0 +1,132 @@ +/* + * Copyright 2021 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.notebooks.v1.stub; + +import static com.google.cloud.notebooks.v1.ManagedNotebookServiceClient.ListRuntimesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.notebooks.v1.CreateRuntimeRequest; +import com.google.cloud.notebooks.v1.DeleteRuntimeRequest; +import com.google.cloud.notebooks.v1.GetRuntimeRequest; +import com.google.cloud.notebooks.v1.ListRuntimesRequest; +import com.google.cloud.notebooks.v1.ListRuntimesResponse; +import com.google.cloud.notebooks.v1.OperationMetadata; +import com.google.cloud.notebooks.v1.ReportRuntimeEventRequest; +import com.google.cloud.notebooks.v1.ResetRuntimeRequest; +import com.google.cloud.notebooks.v1.Runtime; +import com.google.cloud.notebooks.v1.StartRuntimeRequest; +import com.google.cloud.notebooks.v1.StopRuntimeRequest; +import com.google.cloud.notebooks.v1.SwitchRuntimeRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ManagedNotebookService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ManagedNotebookServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable listRuntimesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRuntimesPagedCallable()"); + } + + public UnaryCallable listRuntimesCallable() { + throw new UnsupportedOperationException("Not implemented: listRuntimesCallable()"); + } + + public UnaryCallable getRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: getRuntimeCallable()"); + } + + public OperationCallable + createRuntimeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createRuntimeOperationCallable()"); + } + + public UnaryCallable createRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: createRuntimeCallable()"); + } + + public OperationCallable + deleteRuntimeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRuntimeOperationCallable()"); + } + + public UnaryCallable deleteRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteRuntimeCallable()"); + } + + public OperationCallable + startRuntimeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: startRuntimeOperationCallable()"); + } + + public UnaryCallable startRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: startRuntimeCallable()"); + } + + public OperationCallable + stopRuntimeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: stopRuntimeOperationCallable()"); + } + + public UnaryCallable stopRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: stopRuntimeCallable()"); + } + + public OperationCallable + switchRuntimeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: switchRuntimeOperationCallable()"); + } + + public UnaryCallable switchRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: switchRuntimeCallable()"); + } + + public OperationCallable + resetRuntimeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: resetRuntimeOperationCallable()"); + } + + public UnaryCallable resetRuntimeCallable() { + throw new UnsupportedOperationException("Not implemented: resetRuntimeCallable()"); + } + + public OperationCallable + reportRuntimeEventOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: reportRuntimeEventOperationCallable()"); + } + + public UnaryCallable reportRuntimeEventCallable() { + throw new UnsupportedOperationException("Not implemented: reportRuntimeEventCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/ManagedNotebookServiceStubSettings.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/ManagedNotebookServiceStubSettings.java new file mode 100644 index 00000000..f72e27c1 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/ManagedNotebookServiceStubSettings.java @@ -0,0 +1,869 @@ +/* + * Copyright 2021 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.notebooks.v1.stub; + +import static com.google.cloud.notebooks.v1.ManagedNotebookServiceClient.ListRuntimesPagedResponse; + +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.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +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.OperationCallSettings; +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.notebooks.v1.CreateRuntimeRequest; +import com.google.cloud.notebooks.v1.DeleteRuntimeRequest; +import com.google.cloud.notebooks.v1.GetRuntimeRequest; +import com.google.cloud.notebooks.v1.ListRuntimesRequest; +import com.google.cloud.notebooks.v1.ListRuntimesResponse; +import com.google.cloud.notebooks.v1.OperationMetadata; +import com.google.cloud.notebooks.v1.ReportRuntimeEventRequest; +import com.google.cloud.notebooks.v1.ResetRuntimeRequest; +import com.google.cloud.notebooks.v1.Runtime; +import com.google.cloud.notebooks.v1.StartRuntimeRequest; +import com.google.cloud.notebooks.v1.StopRuntimeRequest; +import com.google.cloud.notebooks.v1.SwitchRuntimeRequest; +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 com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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 ManagedNotebookServiceStub}. + * + *

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

    + *
  • The default service address (notebooks.googleapis.com) 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 getRuntime to 30 seconds: + * + *

{@code
+ * ManagedNotebookServiceStubSettings.Builder managedNotebookServiceSettingsBuilder =
+ *     ManagedNotebookServiceStubSettings.newBuilder();
+ * managedNotebookServiceSettingsBuilder
+ *     .getRuntimeSettings()
+ *     .setRetrySettings(
+ *         managedNotebookServiceSettingsBuilder
+ *             .getRuntimeSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ManagedNotebookServiceStubSettings managedNotebookServiceSettings =
+ *     managedNotebookServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ManagedNotebookServiceStubSettings + 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").build(); + + private final PagedCallSettings< + ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> + listRuntimesSettings; + private final UnaryCallSettings getRuntimeSettings; + private final UnaryCallSettings createRuntimeSettings; + private final OperationCallSettings + createRuntimeOperationSettings; + private final UnaryCallSettings deleteRuntimeSettings; + private final OperationCallSettings + deleteRuntimeOperationSettings; + private final UnaryCallSettings startRuntimeSettings; + private final OperationCallSettings + startRuntimeOperationSettings; + private final UnaryCallSettings stopRuntimeSettings; + private final OperationCallSettings + stopRuntimeOperationSettings; + private final UnaryCallSettings switchRuntimeSettings; + private final OperationCallSettings + switchRuntimeOperationSettings; + private final UnaryCallSettings resetRuntimeSettings; + private final OperationCallSettings + resetRuntimeOperationSettings; + private final UnaryCallSettings reportRuntimeEventSettings; + private final OperationCallSettings + reportRuntimeEventOperationSettings; + + private static final PagedListDescriptor + LIST_RUNTIMES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRuntimesRequest injectToken(ListRuntimesRequest payload, String token) { + return ListRuntimesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRuntimesRequest injectPageSize(ListRuntimesRequest payload, int pageSize) { + return ListRuntimesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRuntimesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRuntimesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRuntimesResponse payload) { + return payload.getRuntimesList() == null + ? ImmutableList.of() + : payload.getRuntimesList(); + } + }; + + private static final PagedListResponseFactory< + ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> + LIST_RUNTIMES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRuntimesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_RUNTIMES_PAGE_STR_DESC, request, context); + return ListRuntimesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listRuntimes. */ + public PagedCallSettings + listRuntimesSettings() { + return listRuntimesSettings; + } + + /** Returns the object with the settings used for calls to getRuntime. */ + public UnaryCallSettings getRuntimeSettings() { + return getRuntimeSettings; + } + + /** Returns the object with the settings used for calls to createRuntime. */ + public UnaryCallSettings createRuntimeSettings() { + return createRuntimeSettings; + } + + /** Returns the object with the settings used for calls to createRuntime. */ + public OperationCallSettings + createRuntimeOperationSettings() { + return createRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteRuntime. */ + public UnaryCallSettings deleteRuntimeSettings() { + return deleteRuntimeSettings; + } + + /** Returns the object with the settings used for calls to deleteRuntime. */ + public OperationCallSettings + deleteRuntimeOperationSettings() { + return deleteRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to startRuntime. */ + public UnaryCallSettings startRuntimeSettings() { + return startRuntimeSettings; + } + + /** Returns the object with the settings used for calls to startRuntime. */ + public OperationCallSettings + startRuntimeOperationSettings() { + return startRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to stopRuntime. */ + public UnaryCallSettings stopRuntimeSettings() { + return stopRuntimeSettings; + } + + /** Returns the object with the settings used for calls to stopRuntime. */ + public OperationCallSettings + stopRuntimeOperationSettings() { + return stopRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to switchRuntime. */ + public UnaryCallSettings switchRuntimeSettings() { + return switchRuntimeSettings; + } + + /** Returns the object with the settings used for calls to switchRuntime. */ + public OperationCallSettings + switchRuntimeOperationSettings() { + return switchRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to resetRuntime. */ + public UnaryCallSettings resetRuntimeSettings() { + return resetRuntimeSettings; + } + + /** Returns the object with the settings used for calls to resetRuntime. */ + public OperationCallSettings + resetRuntimeOperationSettings() { + return resetRuntimeOperationSettings; + } + + /** Returns the object with the settings used for calls to reportRuntimeEvent. */ + public UnaryCallSettings reportRuntimeEventSettings() { + return reportRuntimeEventSettings; + } + + /** Returns the object with the settings used for calls to reportRuntimeEvent. */ + public OperationCallSettings + reportRuntimeEventOperationSettings() { + return reportRuntimeEventOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ManagedNotebookServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcManagedNotebookServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", 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 "notebooks.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "notebooks.mtls.googleapis.com: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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().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(ManagedNotebookServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** 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 ManagedNotebookServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listRuntimesSettings = settingsBuilder.listRuntimesSettings().build(); + getRuntimeSettings = settingsBuilder.getRuntimeSettings().build(); + createRuntimeSettings = settingsBuilder.createRuntimeSettings().build(); + createRuntimeOperationSettings = settingsBuilder.createRuntimeOperationSettings().build(); + deleteRuntimeSettings = settingsBuilder.deleteRuntimeSettings().build(); + deleteRuntimeOperationSettings = settingsBuilder.deleteRuntimeOperationSettings().build(); + startRuntimeSettings = settingsBuilder.startRuntimeSettings().build(); + startRuntimeOperationSettings = settingsBuilder.startRuntimeOperationSettings().build(); + stopRuntimeSettings = settingsBuilder.stopRuntimeSettings().build(); + stopRuntimeOperationSettings = settingsBuilder.stopRuntimeOperationSettings().build(); + switchRuntimeSettings = settingsBuilder.switchRuntimeSettings().build(); + switchRuntimeOperationSettings = settingsBuilder.switchRuntimeOperationSettings().build(); + resetRuntimeSettings = settingsBuilder.resetRuntimeSettings().build(); + resetRuntimeOperationSettings = settingsBuilder.resetRuntimeOperationSettings().build(); + reportRuntimeEventSettings = settingsBuilder.reportRuntimeEventSettings().build(); + reportRuntimeEventOperationSettings = + settingsBuilder.reportRuntimeEventOperationSettings().build(); + } + + /** Builder for ManagedNotebookServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> + listRuntimesSettings; + private final UnaryCallSettings.Builder getRuntimeSettings; + private final UnaryCallSettings.Builder createRuntimeSettings; + private final OperationCallSettings.Builder + createRuntimeOperationSettings; + private final UnaryCallSettings.Builder deleteRuntimeSettings; + private final OperationCallSettings.Builder + deleteRuntimeOperationSettings; + private final UnaryCallSettings.Builder startRuntimeSettings; + private final OperationCallSettings.Builder + startRuntimeOperationSettings; + private final UnaryCallSettings.Builder stopRuntimeSettings; + private final OperationCallSettings.Builder + stopRuntimeOperationSettings; + private final UnaryCallSettings.Builder switchRuntimeSettings; + private final OperationCallSettings.Builder + switchRuntimeOperationSettings; + private final UnaryCallSettings.Builder resetRuntimeSettings; + private final OperationCallSettings.Builder + resetRuntimeOperationSettings; + private final UnaryCallSettings.Builder + reportRuntimeEventSettings; + private final OperationCallSettings.Builder< + ReportRuntimeEventRequest, Runtime, OperationMetadata> + reportRuntimeEventOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listRuntimesSettings = PagedCallSettings.newBuilder(LIST_RUNTIMES_PAGE_STR_FACT); + getRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createRuntimeOperationSettings = OperationCallSettings.newBuilder(); + deleteRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteRuntimeOperationSettings = OperationCallSettings.newBuilder(); + startRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startRuntimeOperationSettings = OperationCallSettings.newBuilder(); + stopRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopRuntimeOperationSettings = OperationCallSettings.newBuilder(); + switchRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + switchRuntimeOperationSettings = OperationCallSettings.newBuilder(); + resetRuntimeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resetRuntimeOperationSettings = OperationCallSettings.newBuilder(); + reportRuntimeEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + reportRuntimeEventOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listRuntimesSettings, + getRuntimeSettings, + createRuntimeSettings, + deleteRuntimeSettings, + startRuntimeSettings, + stopRuntimeSettings, + switchRuntimeSettings, + resetRuntimeSettings, + reportRuntimeEventSettings); + initDefaults(this); + } + + protected Builder(ManagedNotebookServiceStubSettings settings) { + super(settings); + + listRuntimesSettings = settings.listRuntimesSettings.toBuilder(); + getRuntimeSettings = settings.getRuntimeSettings.toBuilder(); + createRuntimeSettings = settings.createRuntimeSettings.toBuilder(); + createRuntimeOperationSettings = settings.createRuntimeOperationSettings.toBuilder(); + deleteRuntimeSettings = settings.deleteRuntimeSettings.toBuilder(); + deleteRuntimeOperationSettings = settings.deleteRuntimeOperationSettings.toBuilder(); + startRuntimeSettings = settings.startRuntimeSettings.toBuilder(); + startRuntimeOperationSettings = settings.startRuntimeOperationSettings.toBuilder(); + stopRuntimeSettings = settings.stopRuntimeSettings.toBuilder(); + stopRuntimeOperationSettings = settings.stopRuntimeOperationSettings.toBuilder(); + switchRuntimeSettings = settings.switchRuntimeSettings.toBuilder(); + switchRuntimeOperationSettings = settings.switchRuntimeOperationSettings.toBuilder(); + resetRuntimeSettings = settings.resetRuntimeSettings.toBuilder(); + resetRuntimeOperationSettings = settings.resetRuntimeOperationSettings.toBuilder(); + reportRuntimeEventSettings = settings.reportRuntimeEventSettings.toBuilder(); + reportRuntimeEventOperationSettings = + settings.reportRuntimeEventOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listRuntimesSettings, + getRuntimeSettings, + createRuntimeSettings, + deleteRuntimeSettings, + startRuntimeSettings, + stopRuntimeSettings, + switchRuntimeSettings, + resetRuntimeSettings, + reportRuntimeEventSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listRuntimesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .startRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .stopRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .switchRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .resetRuntimeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .reportRuntimeEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .startRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .stopRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .switchRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .resetRuntimeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .reportRuntimeEventOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Runtime.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listRuntimes. */ + public PagedCallSettings.Builder< + ListRuntimesRequest, ListRuntimesResponse, ListRuntimesPagedResponse> + listRuntimesSettings() { + return listRuntimesSettings; + } + + /** Returns the builder for the settings used for calls to getRuntime. */ + public UnaryCallSettings.Builder getRuntimeSettings() { + return getRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to createRuntime. */ + public UnaryCallSettings.Builder createRuntimeSettings() { + return createRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to createRuntime. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createRuntimeOperationSettings() { + return createRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteRuntime. */ + public UnaryCallSettings.Builder deleteRuntimeSettings() { + return deleteRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to deleteRuntime. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteRuntimeOperationSettings() { + return deleteRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to startRuntime. */ + public UnaryCallSettings.Builder startRuntimeSettings() { + return startRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to startRuntime. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + startRuntimeOperationSettings() { + return startRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to stopRuntime. */ + public UnaryCallSettings.Builder stopRuntimeSettings() { + return stopRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to stopRuntime. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + stopRuntimeOperationSettings() { + return stopRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to switchRuntime. */ + public UnaryCallSettings.Builder switchRuntimeSettings() { + return switchRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to switchRuntime. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + switchRuntimeOperationSettings() { + return switchRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to resetRuntime. */ + public UnaryCallSettings.Builder resetRuntimeSettings() { + return resetRuntimeSettings; + } + + /** Returns the builder for the settings used for calls to resetRuntime. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + resetRuntimeOperationSettings() { + return resetRuntimeOperationSettings; + } + + /** Returns the builder for the settings used for calls to reportRuntimeEvent. */ + public UnaryCallSettings.Builder + reportRuntimeEventSettings() { + return reportRuntimeEventSettings; + } + + /** Returns the builder for the settings used for calls to reportRuntimeEvent. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + reportRuntimeEventOperationSettings() { + return reportRuntimeEventOperationSettings; + } + + @Override + public ManagedNotebookServiceStubSettings build() throws IOException { + return new ManagedNotebookServiceStubSettings(this); + } + } +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/NotebookServiceStub.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/NotebookServiceStub.java new file mode 100644 index 00000000..a58c1074 --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/NotebookServiceStub.java @@ -0,0 +1,363 @@ +/* + * Copyright 2021 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.notebooks.v1.stub; + +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListEnvironmentsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListInstancesPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.notebooks.v1.CreateEnvironmentRequest; +import com.google.cloud.notebooks.v1.CreateExecutionRequest; +import com.google.cloud.notebooks.v1.CreateInstanceRequest; +import com.google.cloud.notebooks.v1.CreateScheduleRequest; +import com.google.cloud.notebooks.v1.DeleteEnvironmentRequest; +import com.google.cloud.notebooks.v1.DeleteExecutionRequest; +import com.google.cloud.notebooks.v1.DeleteInstanceRequest; +import com.google.cloud.notebooks.v1.DeleteScheduleRequest; +import com.google.cloud.notebooks.v1.Environment; +import com.google.cloud.notebooks.v1.Execution; +import com.google.cloud.notebooks.v1.GetEnvironmentRequest; +import com.google.cloud.notebooks.v1.GetExecutionRequest; +import com.google.cloud.notebooks.v1.GetInstanceHealthRequest; +import com.google.cloud.notebooks.v1.GetInstanceHealthResponse; +import com.google.cloud.notebooks.v1.GetInstanceRequest; +import com.google.cloud.notebooks.v1.GetScheduleRequest; +import com.google.cloud.notebooks.v1.Instance; +import com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest; +import com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse; +import com.google.cloud.notebooks.v1.ListEnvironmentsRequest; +import com.google.cloud.notebooks.v1.ListEnvironmentsResponse; +import com.google.cloud.notebooks.v1.ListExecutionsRequest; +import com.google.cloud.notebooks.v1.ListExecutionsResponse; +import com.google.cloud.notebooks.v1.ListInstancesRequest; +import com.google.cloud.notebooks.v1.ListInstancesResponse; +import com.google.cloud.notebooks.v1.ListSchedulesRequest; +import com.google.cloud.notebooks.v1.ListSchedulesResponse; +import com.google.cloud.notebooks.v1.OperationMetadata; +import com.google.cloud.notebooks.v1.RegisterInstanceRequest; +import com.google.cloud.notebooks.v1.ReportInstanceInfoRequest; +import com.google.cloud.notebooks.v1.ResetInstanceRequest; +import com.google.cloud.notebooks.v1.RollbackInstanceRequest; +import com.google.cloud.notebooks.v1.Schedule; +import com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest; +import com.google.cloud.notebooks.v1.SetInstanceLabelsRequest; +import com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest; +import com.google.cloud.notebooks.v1.StartInstanceRequest; +import com.google.cloud.notebooks.v1.StopInstanceRequest; +import com.google.cloud.notebooks.v1.TriggerScheduleRequest; +import com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest; +import com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest; +import com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest; +import com.google.cloud.notebooks.v1.UpgradeInstanceRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the NotebookService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class NotebookServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listInstancesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); + } + + public UnaryCallable listInstancesCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); + } + + public UnaryCallable getInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); + } + + public OperationCallable + createInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()"); + } + + public UnaryCallable createInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: createInstanceCallable()"); + } + + public OperationCallable + registerInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: registerInstanceOperationCallable()"); + } + + public UnaryCallable registerInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: registerInstanceCallable()"); + } + + public OperationCallable + setInstanceAcceleratorOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: setInstanceAcceleratorOperationCallable()"); + } + + public UnaryCallable setInstanceAcceleratorCallable() { + throw new UnsupportedOperationException("Not implemented: setInstanceAcceleratorCallable()"); + } + + public OperationCallable + setInstanceMachineTypeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: setInstanceMachineTypeOperationCallable()"); + } + + public UnaryCallable setInstanceMachineTypeCallable() { + throw new UnsupportedOperationException("Not implemented: setInstanceMachineTypeCallable()"); + } + + public OperationCallable + updateInstanceConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateInstanceConfigOperationCallable()"); + } + + public UnaryCallable updateInstanceConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateInstanceConfigCallable()"); + } + + public OperationCallable + updateShieldedInstanceConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateShieldedInstanceConfigOperationCallable()"); + } + + public UnaryCallable + updateShieldedInstanceConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateShieldedInstanceConfigCallable()"); + } + + public OperationCallable + setInstanceLabelsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: setInstanceLabelsOperationCallable()"); + } + + public UnaryCallable setInstanceLabelsCallable() { + throw new UnsupportedOperationException("Not implemented: setInstanceLabelsCallable()"); + } + + public OperationCallable + deleteInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceOperationCallable()"); + } + + public UnaryCallable deleteInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); + } + + public OperationCallable + startInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: startInstanceOperationCallable()"); + } + + public UnaryCallable startInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: startInstanceCallable()"); + } + + public OperationCallable + stopInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: stopInstanceOperationCallable()"); + } + + public UnaryCallable stopInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: stopInstanceCallable()"); + } + + public OperationCallable + resetInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: resetInstanceOperationCallable()"); + } + + public UnaryCallable resetInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: resetInstanceCallable()"); + } + + public OperationCallable + reportInstanceInfoOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: reportInstanceInfoOperationCallable()"); + } + + public UnaryCallable reportInstanceInfoCallable() { + throw new UnsupportedOperationException("Not implemented: reportInstanceInfoCallable()"); + } + + public UnaryCallable + isInstanceUpgradeableCallable() { + throw new UnsupportedOperationException("Not implemented: isInstanceUpgradeableCallable()"); + } + + public UnaryCallable + getInstanceHealthCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceHealthCallable()"); + } + + public OperationCallable + upgradeInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeInstanceOperationCallable()"); + } + + public UnaryCallable upgradeInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeInstanceCallable()"); + } + + public OperationCallable + rollbackInstanceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: rollbackInstanceOperationCallable()"); + } + + public UnaryCallable rollbackInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: rollbackInstanceCallable()"); + } + + public OperationCallable + upgradeInstanceInternalOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: upgradeInstanceInternalOperationCallable()"); + } + + public UnaryCallable + upgradeInstanceInternalCallable() { + throw new UnsupportedOperationException("Not implemented: upgradeInstanceInternalCallable()"); + } + + public UnaryCallable + listEnvironmentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsPagedCallable()"); + } + + public UnaryCallable + listEnvironmentsCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsCallable()"); + } + + public UnaryCallable getEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: getEnvironmentCallable()"); + } + + public OperationCallable + createEnvironmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createEnvironmentOperationCallable()"); + } + + public UnaryCallable createEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: createEnvironmentCallable()"); + } + + public OperationCallable + deleteEnvironmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteEnvironmentOperationCallable()"); + } + + public UnaryCallable deleteEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEnvironmentCallable()"); + } + + public UnaryCallable + listSchedulesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSchedulesPagedCallable()"); + } + + public UnaryCallable listSchedulesCallable() { + throw new UnsupportedOperationException("Not implemented: listSchedulesCallable()"); + } + + public UnaryCallable getScheduleCallable() { + throw new UnsupportedOperationException("Not implemented: getScheduleCallable()"); + } + + public OperationCallable + deleteScheduleOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteScheduleOperationCallable()"); + } + + public UnaryCallable deleteScheduleCallable() { + throw new UnsupportedOperationException("Not implemented: deleteScheduleCallable()"); + } + + public OperationCallable + createScheduleOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createScheduleOperationCallable()"); + } + + public UnaryCallable createScheduleCallable() { + throw new UnsupportedOperationException("Not implemented: createScheduleCallable()"); + } + + public OperationCallable + triggerScheduleOperationCallable() { + throw new UnsupportedOperationException("Not implemented: triggerScheduleOperationCallable()"); + } + + public UnaryCallable triggerScheduleCallable() { + throw new UnsupportedOperationException("Not implemented: triggerScheduleCallable()"); + } + + public UnaryCallable + listExecutionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listExecutionsPagedCallable()"); + } + + public UnaryCallable listExecutionsCallable() { + throw new UnsupportedOperationException("Not implemented: listExecutionsCallable()"); + } + + public UnaryCallable getExecutionCallable() { + throw new UnsupportedOperationException("Not implemented: getExecutionCallable()"); + } + + public OperationCallable + deleteExecutionOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteExecutionOperationCallable()"); + } + + public UnaryCallable deleteExecutionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteExecutionCallable()"); + } + + public OperationCallable + createExecutionOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createExecutionOperationCallable()"); + } + + public UnaryCallable createExecutionCallable() { + throw new UnsupportedOperationException("Not implemented: createExecutionCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/NotebookServiceStubSettings.java b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/NotebookServiceStubSettings.java new file mode 100644 index 00000000..2043b83a --- /dev/null +++ b/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/stub/NotebookServiceStubSettings.java @@ -0,0 +1,2347 @@ +/* + * Copyright 2021 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.notebooks.v1.stub; + +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListEnvironmentsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListInstancesPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse; + +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.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +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.OperationCallSettings; +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.notebooks.v1.CreateEnvironmentRequest; +import com.google.cloud.notebooks.v1.CreateExecutionRequest; +import com.google.cloud.notebooks.v1.CreateInstanceRequest; +import com.google.cloud.notebooks.v1.CreateScheduleRequest; +import com.google.cloud.notebooks.v1.DeleteEnvironmentRequest; +import com.google.cloud.notebooks.v1.DeleteExecutionRequest; +import com.google.cloud.notebooks.v1.DeleteInstanceRequest; +import com.google.cloud.notebooks.v1.DeleteScheduleRequest; +import com.google.cloud.notebooks.v1.Environment; +import com.google.cloud.notebooks.v1.Execution; +import com.google.cloud.notebooks.v1.GetEnvironmentRequest; +import com.google.cloud.notebooks.v1.GetExecutionRequest; +import com.google.cloud.notebooks.v1.GetInstanceHealthRequest; +import com.google.cloud.notebooks.v1.GetInstanceHealthResponse; +import com.google.cloud.notebooks.v1.GetInstanceRequest; +import com.google.cloud.notebooks.v1.GetScheduleRequest; +import com.google.cloud.notebooks.v1.Instance; +import com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest; +import com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse; +import com.google.cloud.notebooks.v1.ListEnvironmentsRequest; +import com.google.cloud.notebooks.v1.ListEnvironmentsResponse; +import com.google.cloud.notebooks.v1.ListExecutionsRequest; +import com.google.cloud.notebooks.v1.ListExecutionsResponse; +import com.google.cloud.notebooks.v1.ListInstancesRequest; +import com.google.cloud.notebooks.v1.ListInstancesResponse; +import com.google.cloud.notebooks.v1.ListSchedulesRequest; +import com.google.cloud.notebooks.v1.ListSchedulesResponse; +import com.google.cloud.notebooks.v1.OperationMetadata; +import com.google.cloud.notebooks.v1.RegisterInstanceRequest; +import com.google.cloud.notebooks.v1.ReportInstanceInfoRequest; +import com.google.cloud.notebooks.v1.ResetInstanceRequest; +import com.google.cloud.notebooks.v1.RollbackInstanceRequest; +import com.google.cloud.notebooks.v1.Schedule; +import com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest; +import com.google.cloud.notebooks.v1.SetInstanceLabelsRequest; +import com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest; +import com.google.cloud.notebooks.v1.StartInstanceRequest; +import com.google.cloud.notebooks.v1.StopInstanceRequest; +import com.google.cloud.notebooks.v1.TriggerScheduleRequest; +import com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest; +import com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest; +import com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest; +import com.google.cloud.notebooks.v1.UpgradeInstanceRequest; +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 com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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 NotebookServiceStub}. + * + *

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

    + *
  • The default service address (notebooks.googleapis.com) 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 getInstance to 30 seconds: + * + *

{@code
+ * NotebookServiceStubSettings.Builder notebookServiceSettingsBuilder =
+ *     NotebookServiceStubSettings.newBuilder();
+ * notebookServiceSettingsBuilder
+ *     .getInstanceSettings()
+ *     .setRetrySettings(
+ *         notebookServiceSettingsBuilder
+ *             .getInstanceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * NotebookServiceStubSettings notebookServiceSettings = notebookServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class NotebookServiceStubSettings 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").build(); + + private final PagedCallSettings< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings getInstanceSettings; + private final UnaryCallSettings createInstanceSettings; + private final OperationCallSettings + createInstanceOperationSettings; + private final UnaryCallSettings registerInstanceSettings; + private final OperationCallSettings + registerInstanceOperationSettings; + private final UnaryCallSettings + setInstanceAcceleratorSettings; + private final OperationCallSettings + setInstanceAcceleratorOperationSettings; + private final UnaryCallSettings + setInstanceMachineTypeSettings; + private final OperationCallSettings + setInstanceMachineTypeOperationSettings; + private final UnaryCallSettings + updateInstanceConfigSettings; + private final OperationCallSettings + updateInstanceConfigOperationSettings; + private final UnaryCallSettings + updateShieldedInstanceConfigSettings; + private final OperationCallSettings< + UpdateShieldedInstanceConfigRequest, Instance, OperationMetadata> + updateShieldedInstanceConfigOperationSettings; + private final UnaryCallSettings setInstanceLabelsSettings; + private final OperationCallSettings + setInstanceLabelsOperationSettings; + private final UnaryCallSettings deleteInstanceSettings; + private final OperationCallSettings + deleteInstanceOperationSettings; + private final UnaryCallSettings startInstanceSettings; + private final OperationCallSettings + startInstanceOperationSettings; + private final UnaryCallSettings stopInstanceSettings; + private final OperationCallSettings + stopInstanceOperationSettings; + private final UnaryCallSettings resetInstanceSettings; + private final OperationCallSettings + resetInstanceOperationSettings; + private final UnaryCallSettings reportInstanceInfoSettings; + private final OperationCallSettings + reportInstanceInfoOperationSettings; + private final UnaryCallSettings + isInstanceUpgradeableSettings; + private final UnaryCallSettings + getInstanceHealthSettings; + private final UnaryCallSettings upgradeInstanceSettings; + private final OperationCallSettings + upgradeInstanceOperationSettings; + private final UnaryCallSettings rollbackInstanceSettings; + private final OperationCallSettings + rollbackInstanceOperationSettings; + private final UnaryCallSettings + upgradeInstanceInternalSettings; + private final OperationCallSettings + upgradeInstanceInternalOperationSettings; + private final PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings; + private final UnaryCallSettings getEnvironmentSettings; + private final UnaryCallSettings createEnvironmentSettings; + private final OperationCallSettings + createEnvironmentOperationSettings; + private final UnaryCallSettings deleteEnvironmentSettings; + private final OperationCallSettings + deleteEnvironmentOperationSettings; + private final PagedCallSettings< + ListSchedulesRequest, ListSchedulesResponse, ListSchedulesPagedResponse> + listSchedulesSettings; + private final UnaryCallSettings getScheduleSettings; + private final UnaryCallSettings deleteScheduleSettings; + private final OperationCallSettings + deleteScheduleOperationSettings; + private final UnaryCallSettings createScheduleSettings; + private final OperationCallSettings + createScheduleOperationSettings; + private final UnaryCallSettings triggerScheduleSettings; + private final OperationCallSettings + triggerScheduleOperationSettings; + private final PagedCallSettings< + ListExecutionsRequest, ListExecutionsResponse, ListExecutionsPagedResponse> + listExecutionsSettings; + private final UnaryCallSettings getExecutionSettings; + private final UnaryCallSettings deleteExecutionSettings; + private final OperationCallSettings + deleteExecutionOperationSettings; + private final UnaryCallSettings createExecutionSettings; + private final OperationCallSettings + createExecutionOperationSettings; + + private static final PagedListDescriptor + LIST_INSTANCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { + return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { + return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInstancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInstancesResponse payload) { + return payload.getInstancesList() == null + ? ImmutableList.of() + : payload.getInstancesList(); + } + }; + + private static final PagedListDescriptor< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> + LIST_ENVIRONMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEnvironmentsRequest injectToken( + ListEnvironmentsRequest payload, String token) { + return ListEnvironmentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEnvironmentsRequest injectPageSize( + ListEnvironmentsRequest payload, int pageSize) { + return ListEnvironmentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEnvironmentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEnvironmentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEnvironmentsResponse payload) { + return payload.getEnvironmentsList() == null + ? ImmutableList.of() + : payload.getEnvironmentsList(); + } + }; + + private static final PagedListDescriptor + LIST_SCHEDULES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSchedulesRequest injectToken(ListSchedulesRequest payload, String token) { + return ListSchedulesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSchedulesRequest injectPageSize(ListSchedulesRequest payload, int pageSize) { + return ListSchedulesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSchedulesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSchedulesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSchedulesResponse payload) { + return payload.getSchedulesList() == null + ? ImmutableList.of() + : payload.getSchedulesList(); + } + }; + + private static final PagedListDescriptor + LIST_EXECUTIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListExecutionsRequest injectToken(ListExecutionsRequest payload, String token) { + return ListExecutionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListExecutionsRequest injectPageSize( + ListExecutionsRequest payload, int pageSize) { + return ListExecutionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListExecutionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListExecutionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListExecutionsResponse payload) { + return payload.getExecutionsList() == null + ? ImmutableList.of() + : payload.getExecutionsList(); + } + }; + + private static final PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + LIST_INSTANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInstancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); + return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + LIST_ENVIRONMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEnvironmentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ENVIRONMENTS_PAGE_STR_DESC, request, context); + return ListEnvironmentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSchedulesRequest, ListSchedulesResponse, ListSchedulesPagedResponse> + LIST_SCHEDULES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSchedulesRequest, ListSchedulesResponse, ListSchedulesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSchedulesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SCHEDULES_PAGE_STR_DESC, request, context); + return ListSchedulesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListExecutionsRequest, ListExecutionsResponse, ListExecutionsPagedResponse> + LIST_EXECUTIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListExecutionsRequest, ListExecutionsResponse, ListExecutionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListExecutionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_EXECUTIONS_PAGE_STR_DESC, request, context); + return ListExecutionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the object with the settings used for calls to createInstance. */ + public UnaryCallSettings createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the object with the settings used for calls to createInstance. */ + public OperationCallSettings + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to registerInstance. */ + public UnaryCallSettings registerInstanceSettings() { + return registerInstanceSettings; + } + + /** Returns the object with the settings used for calls to registerInstance. */ + public OperationCallSettings + registerInstanceOperationSettings() { + return registerInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to setInstanceAccelerator. */ + public UnaryCallSettings + setInstanceAcceleratorSettings() { + return setInstanceAcceleratorSettings; + } + + /** Returns the object with the settings used for calls to setInstanceAccelerator. */ + public OperationCallSettings + setInstanceAcceleratorOperationSettings() { + return setInstanceAcceleratorOperationSettings; + } + + /** Returns the object with the settings used for calls to setInstanceMachineType. */ + public UnaryCallSettings + setInstanceMachineTypeSettings() { + return setInstanceMachineTypeSettings; + } + + /** Returns the object with the settings used for calls to setInstanceMachineType. */ + public OperationCallSettings + setInstanceMachineTypeOperationSettings() { + return setInstanceMachineTypeOperationSettings; + } + + /** Returns the object with the settings used for calls to updateInstanceConfig. */ + public UnaryCallSettings updateInstanceConfigSettings() { + return updateInstanceConfigSettings; + } + + /** Returns the object with the settings used for calls to updateInstanceConfig. */ + public OperationCallSettings + updateInstanceConfigOperationSettings() { + return updateInstanceConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to updateShieldedInstanceConfig. */ + public UnaryCallSettings + updateShieldedInstanceConfigSettings() { + return updateShieldedInstanceConfigSettings; + } + + /** Returns the object with the settings used for calls to updateShieldedInstanceConfig. */ + public OperationCallSettings + updateShieldedInstanceConfigOperationSettings() { + return updateShieldedInstanceConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to setInstanceLabels. */ + public UnaryCallSettings setInstanceLabelsSettings() { + return setInstanceLabelsSettings; + } + + /** Returns the object with the settings used for calls to setInstanceLabels. */ + public OperationCallSettings + setInstanceLabelsOperationSettings() { + return setInstanceLabelsOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public UnaryCallSettings deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the object with the settings used for calls to deleteInstance. */ + public OperationCallSettings + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to startInstance. */ + public UnaryCallSettings startInstanceSettings() { + return startInstanceSettings; + } + + /** Returns the object with the settings used for calls to startInstance. */ + public OperationCallSettings + startInstanceOperationSettings() { + return startInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public UnaryCallSettings stopInstanceSettings() { + return stopInstanceSettings; + } + + /** Returns the object with the settings used for calls to stopInstance. */ + public OperationCallSettings + stopInstanceOperationSettings() { + return stopInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to resetInstance. */ + public UnaryCallSettings resetInstanceSettings() { + return resetInstanceSettings; + } + + /** Returns the object with the settings used for calls to resetInstance. */ + public OperationCallSettings + resetInstanceOperationSettings() { + return resetInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to reportInstanceInfo. */ + public UnaryCallSettings reportInstanceInfoSettings() { + return reportInstanceInfoSettings; + } + + /** Returns the object with the settings used for calls to reportInstanceInfo. */ + public OperationCallSettings + reportInstanceInfoOperationSettings() { + return reportInstanceInfoOperationSettings; + } + + /** Returns the object with the settings used for calls to isInstanceUpgradeable. */ + public UnaryCallSettings + isInstanceUpgradeableSettings() { + return isInstanceUpgradeableSettings; + } + + /** Returns the object with the settings used for calls to getInstanceHealth. */ + public UnaryCallSettings + getInstanceHealthSettings() { + return getInstanceHealthSettings; + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + public UnaryCallSettings upgradeInstanceSettings() { + return upgradeInstanceSettings; + } + + /** Returns the object with the settings used for calls to upgradeInstance. */ + public OperationCallSettings + upgradeInstanceOperationSettings() { + return upgradeInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to rollbackInstance. */ + public UnaryCallSettings rollbackInstanceSettings() { + return rollbackInstanceSettings; + } + + /** Returns the object with the settings used for calls to rollbackInstance. */ + public OperationCallSettings + rollbackInstanceOperationSettings() { + return rollbackInstanceOperationSettings; + } + + /** Returns the object with the settings used for calls to upgradeInstanceInternal. */ + public UnaryCallSettings + upgradeInstanceInternalSettings() { + return upgradeInstanceInternalSettings; + } + + /** Returns the object with the settings used for calls to upgradeInstanceInternal. */ + public OperationCallSettings + upgradeInstanceInternalOperationSettings() { + return upgradeInstanceInternalOperationSettings; + } + + /** Returns the object with the settings used for calls to listEnvironments. */ + public PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + /** Returns the object with the settings used for calls to getEnvironment. */ + public UnaryCallSettings getEnvironmentSettings() { + return getEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to createEnvironment. */ + public UnaryCallSettings createEnvironmentSettings() { + return createEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to createEnvironment. */ + public OperationCallSettings + createEnvironmentOperationSettings() { + return createEnvironmentOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings deleteEnvironmentSettings() { + return deleteEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public OperationCallSettings + deleteEnvironmentOperationSettings() { + return deleteEnvironmentOperationSettings; + } + + /** Returns the object with the settings used for calls to listSchedules. */ + public PagedCallSettings + listSchedulesSettings() { + return listSchedulesSettings; + } + + /** Returns the object with the settings used for calls to getSchedule. */ + public UnaryCallSettings getScheduleSettings() { + return getScheduleSettings; + } + + /** Returns the object with the settings used for calls to deleteSchedule. */ + public UnaryCallSettings deleteScheduleSettings() { + return deleteScheduleSettings; + } + + /** Returns the object with the settings used for calls to deleteSchedule. */ + public OperationCallSettings + deleteScheduleOperationSettings() { + return deleteScheduleOperationSettings; + } + + /** Returns the object with the settings used for calls to createSchedule. */ + public UnaryCallSettings createScheduleSettings() { + return createScheduleSettings; + } + + /** Returns the object with the settings used for calls to createSchedule. */ + public OperationCallSettings + createScheduleOperationSettings() { + return createScheduleOperationSettings; + } + + /** Returns the object with the settings used for calls to triggerSchedule. */ + public UnaryCallSettings triggerScheduleSettings() { + return triggerScheduleSettings; + } + + /** Returns the object with the settings used for calls to triggerSchedule. */ + public OperationCallSettings + triggerScheduleOperationSettings() { + return triggerScheduleOperationSettings; + } + + /** Returns the object with the settings used for calls to listExecutions. */ + public PagedCallSettings< + ListExecutionsRequest, ListExecutionsResponse, ListExecutionsPagedResponse> + listExecutionsSettings() { + return listExecutionsSettings; + } + + /** Returns the object with the settings used for calls to getExecution. */ + public UnaryCallSettings getExecutionSettings() { + return getExecutionSettings; + } + + /** Returns the object with the settings used for calls to deleteExecution. */ + public UnaryCallSettings deleteExecutionSettings() { + return deleteExecutionSettings; + } + + /** Returns the object with the settings used for calls to deleteExecution. */ + public OperationCallSettings + deleteExecutionOperationSettings() { + return deleteExecutionOperationSettings; + } + + /** Returns the object with the settings used for calls to createExecution. */ + public UnaryCallSettings createExecutionSettings() { + return createExecutionSettings; + } + + /** Returns the object with the settings used for calls to createExecution. */ + public OperationCallSettings + createExecutionOperationSettings() { + return createExecutionOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public NotebookServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcNotebookServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", 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 "notebooks.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "notebooks.mtls.googleapis.com: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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().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(NotebookServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** 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 NotebookServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listInstancesSettings = settingsBuilder.listInstancesSettings().build(); + getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + createInstanceSettings = settingsBuilder.createInstanceSettings().build(); + createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build(); + registerInstanceSettings = settingsBuilder.registerInstanceSettings().build(); + registerInstanceOperationSettings = settingsBuilder.registerInstanceOperationSettings().build(); + setInstanceAcceleratorSettings = settingsBuilder.setInstanceAcceleratorSettings().build(); + setInstanceAcceleratorOperationSettings = + settingsBuilder.setInstanceAcceleratorOperationSettings().build(); + setInstanceMachineTypeSettings = settingsBuilder.setInstanceMachineTypeSettings().build(); + setInstanceMachineTypeOperationSettings = + settingsBuilder.setInstanceMachineTypeOperationSettings().build(); + updateInstanceConfigSettings = settingsBuilder.updateInstanceConfigSettings().build(); + updateInstanceConfigOperationSettings = + settingsBuilder.updateInstanceConfigOperationSettings().build(); + updateShieldedInstanceConfigSettings = + settingsBuilder.updateShieldedInstanceConfigSettings().build(); + updateShieldedInstanceConfigOperationSettings = + settingsBuilder.updateShieldedInstanceConfigOperationSettings().build(); + setInstanceLabelsSettings = settingsBuilder.setInstanceLabelsSettings().build(); + setInstanceLabelsOperationSettings = + settingsBuilder.setInstanceLabelsOperationSettings().build(); + deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); + deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); + startInstanceSettings = settingsBuilder.startInstanceSettings().build(); + startInstanceOperationSettings = settingsBuilder.startInstanceOperationSettings().build(); + stopInstanceSettings = settingsBuilder.stopInstanceSettings().build(); + stopInstanceOperationSettings = settingsBuilder.stopInstanceOperationSettings().build(); + resetInstanceSettings = settingsBuilder.resetInstanceSettings().build(); + resetInstanceOperationSettings = settingsBuilder.resetInstanceOperationSettings().build(); + reportInstanceInfoSettings = settingsBuilder.reportInstanceInfoSettings().build(); + reportInstanceInfoOperationSettings = + settingsBuilder.reportInstanceInfoOperationSettings().build(); + isInstanceUpgradeableSettings = settingsBuilder.isInstanceUpgradeableSettings().build(); + getInstanceHealthSettings = settingsBuilder.getInstanceHealthSettings().build(); + upgradeInstanceSettings = settingsBuilder.upgradeInstanceSettings().build(); + upgradeInstanceOperationSettings = settingsBuilder.upgradeInstanceOperationSettings().build(); + rollbackInstanceSettings = settingsBuilder.rollbackInstanceSettings().build(); + rollbackInstanceOperationSettings = settingsBuilder.rollbackInstanceOperationSettings().build(); + upgradeInstanceInternalSettings = settingsBuilder.upgradeInstanceInternalSettings().build(); + upgradeInstanceInternalOperationSettings = + settingsBuilder.upgradeInstanceInternalOperationSettings().build(); + listEnvironmentsSettings = settingsBuilder.listEnvironmentsSettings().build(); + getEnvironmentSettings = settingsBuilder.getEnvironmentSettings().build(); + createEnvironmentSettings = settingsBuilder.createEnvironmentSettings().build(); + createEnvironmentOperationSettings = + settingsBuilder.createEnvironmentOperationSettings().build(); + deleteEnvironmentSettings = settingsBuilder.deleteEnvironmentSettings().build(); + deleteEnvironmentOperationSettings = + settingsBuilder.deleteEnvironmentOperationSettings().build(); + listSchedulesSettings = settingsBuilder.listSchedulesSettings().build(); + getScheduleSettings = settingsBuilder.getScheduleSettings().build(); + deleteScheduleSettings = settingsBuilder.deleteScheduleSettings().build(); + deleteScheduleOperationSettings = settingsBuilder.deleteScheduleOperationSettings().build(); + createScheduleSettings = settingsBuilder.createScheduleSettings().build(); + createScheduleOperationSettings = settingsBuilder.createScheduleOperationSettings().build(); + triggerScheduleSettings = settingsBuilder.triggerScheduleSettings().build(); + triggerScheduleOperationSettings = settingsBuilder.triggerScheduleOperationSettings().build(); + listExecutionsSettings = settingsBuilder.listExecutionsSettings().build(); + getExecutionSettings = settingsBuilder.getExecutionSettings().build(); + deleteExecutionSettings = settingsBuilder.deleteExecutionSettings().build(); + deleteExecutionOperationSettings = settingsBuilder.deleteExecutionOperationSettings().build(); + createExecutionSettings = settingsBuilder.createExecutionSettings().build(); + createExecutionOperationSettings = settingsBuilder.createExecutionOperationSettings().build(); + } + + /** Builder for NotebookServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings.Builder getInstanceSettings; + private final UnaryCallSettings.Builder + createInstanceSettings; + private final OperationCallSettings.Builder + createInstanceOperationSettings; + private final UnaryCallSettings.Builder + registerInstanceSettings; + private final OperationCallSettings.Builder< + RegisterInstanceRequest, Instance, OperationMetadata> + registerInstanceOperationSettings; + private final UnaryCallSettings.Builder + setInstanceAcceleratorSettings; + private final OperationCallSettings.Builder< + SetInstanceAcceleratorRequest, Instance, OperationMetadata> + setInstanceAcceleratorOperationSettings; + private final UnaryCallSettings.Builder + setInstanceMachineTypeSettings; + private final OperationCallSettings.Builder< + SetInstanceMachineTypeRequest, Instance, OperationMetadata> + setInstanceMachineTypeOperationSettings; + private final UnaryCallSettings.Builder + updateInstanceConfigSettings; + private final OperationCallSettings.Builder< + UpdateInstanceConfigRequest, Instance, OperationMetadata> + updateInstanceConfigOperationSettings; + private final UnaryCallSettings.Builder + updateShieldedInstanceConfigSettings; + private final OperationCallSettings.Builder< + UpdateShieldedInstanceConfigRequest, Instance, OperationMetadata> + updateShieldedInstanceConfigOperationSettings; + private final UnaryCallSettings.Builder + setInstanceLabelsSettings; + private final OperationCallSettings.Builder< + SetInstanceLabelsRequest, Instance, OperationMetadata> + setInstanceLabelsOperationSettings; + private final UnaryCallSettings.Builder + deleteInstanceSettings; + private final OperationCallSettings.Builder + deleteInstanceOperationSettings; + private final UnaryCallSettings.Builder startInstanceSettings; + private final OperationCallSettings.Builder + startInstanceOperationSettings; + private final UnaryCallSettings.Builder stopInstanceSettings; + private final OperationCallSettings.Builder + stopInstanceOperationSettings; + private final UnaryCallSettings.Builder resetInstanceSettings; + private final OperationCallSettings.Builder + resetInstanceOperationSettings; + private final UnaryCallSettings.Builder + reportInstanceInfoSettings; + private final OperationCallSettings.Builder< + ReportInstanceInfoRequest, Instance, OperationMetadata> + reportInstanceInfoOperationSettings; + private final UnaryCallSettings.Builder< + IsInstanceUpgradeableRequest, IsInstanceUpgradeableResponse> + isInstanceUpgradeableSettings; + private final UnaryCallSettings.Builder + getInstanceHealthSettings; + private final UnaryCallSettings.Builder + upgradeInstanceSettings; + private final OperationCallSettings.Builder + upgradeInstanceOperationSettings; + private final UnaryCallSettings.Builder + rollbackInstanceSettings; + private final OperationCallSettings.Builder< + RollbackInstanceRequest, Instance, OperationMetadata> + rollbackInstanceOperationSettings; + private final UnaryCallSettings.Builder + upgradeInstanceInternalSettings; + private final OperationCallSettings.Builder< + UpgradeInstanceInternalRequest, Instance, OperationMetadata> + upgradeInstanceInternalOperationSettings; + private final PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings; + private final UnaryCallSettings.Builder + getEnvironmentSettings; + private final UnaryCallSettings.Builder + createEnvironmentSettings; + private final OperationCallSettings.Builder< + CreateEnvironmentRequest, Environment, OperationMetadata> + createEnvironmentOperationSettings; + private final UnaryCallSettings.Builder + deleteEnvironmentSettings; + private final OperationCallSettings.Builder + deleteEnvironmentOperationSettings; + private final PagedCallSettings.Builder< + ListSchedulesRequest, ListSchedulesResponse, ListSchedulesPagedResponse> + listSchedulesSettings; + private final UnaryCallSettings.Builder getScheduleSettings; + private final UnaryCallSettings.Builder + deleteScheduleSettings; + private final OperationCallSettings.Builder + deleteScheduleOperationSettings; + private final UnaryCallSettings.Builder + createScheduleSettings; + private final OperationCallSettings.Builder + createScheduleOperationSettings; + private final UnaryCallSettings.Builder + triggerScheduleSettings; + private final OperationCallSettings.Builder + triggerScheduleOperationSettings; + private final PagedCallSettings.Builder< + ListExecutionsRequest, ListExecutionsResponse, ListExecutionsPagedResponse> + listExecutionsSettings; + private final UnaryCallSettings.Builder getExecutionSettings; + private final UnaryCallSettings.Builder + deleteExecutionSettings; + private final OperationCallSettings.Builder + deleteExecutionOperationSettings; + private final UnaryCallSettings.Builder + createExecutionSettings; + private final OperationCallSettings.Builder< + CreateExecutionRequest, Execution, OperationMetadata> + createExecutionOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); + getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInstanceOperationSettings = OperationCallSettings.newBuilder(); + registerInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + registerInstanceOperationSettings = OperationCallSettings.newBuilder(); + setInstanceAcceleratorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setInstanceAcceleratorOperationSettings = OperationCallSettings.newBuilder(); + setInstanceMachineTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setInstanceMachineTypeOperationSettings = OperationCallSettings.newBuilder(); + updateInstanceConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInstanceConfigOperationSettings = OperationCallSettings.newBuilder(); + updateShieldedInstanceConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateShieldedInstanceConfigOperationSettings = OperationCallSettings.newBuilder(); + setInstanceLabelsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setInstanceLabelsOperationSettings = OperationCallSettings.newBuilder(); + deleteInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); + startInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startInstanceOperationSettings = OperationCallSettings.newBuilder(); + stopInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopInstanceOperationSettings = OperationCallSettings.newBuilder(); + resetInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resetInstanceOperationSettings = OperationCallSettings.newBuilder(); + reportInstanceInfoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + reportInstanceInfoOperationSettings = OperationCallSettings.newBuilder(); + isInstanceUpgradeableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getInstanceHealthSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + upgradeInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + upgradeInstanceOperationSettings = OperationCallSettings.newBuilder(); + rollbackInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + rollbackInstanceOperationSettings = OperationCallSettings.newBuilder(); + upgradeInstanceInternalSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + upgradeInstanceInternalOperationSettings = OperationCallSettings.newBuilder(); + listEnvironmentsSettings = PagedCallSettings.newBuilder(LIST_ENVIRONMENTS_PAGE_STR_FACT); + getEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + deleteEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + listSchedulesSettings = PagedCallSettings.newBuilder(LIST_SCHEDULES_PAGE_STR_FACT); + getScheduleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteScheduleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteScheduleOperationSettings = OperationCallSettings.newBuilder(); + createScheduleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createScheduleOperationSettings = OperationCallSettings.newBuilder(); + triggerScheduleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + triggerScheduleOperationSettings = OperationCallSettings.newBuilder(); + listExecutionsSettings = PagedCallSettings.newBuilder(LIST_EXECUTIONS_PAGE_STR_FACT); + getExecutionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteExecutionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteExecutionOperationSettings = OperationCallSettings.newBuilder(); + createExecutionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createExecutionOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listInstancesSettings, + getInstanceSettings, + createInstanceSettings, + registerInstanceSettings, + setInstanceAcceleratorSettings, + setInstanceMachineTypeSettings, + updateInstanceConfigSettings, + updateShieldedInstanceConfigSettings, + setInstanceLabelsSettings, + deleteInstanceSettings, + startInstanceSettings, + stopInstanceSettings, + resetInstanceSettings, + reportInstanceInfoSettings, + isInstanceUpgradeableSettings, + getInstanceHealthSettings, + upgradeInstanceSettings, + rollbackInstanceSettings, + upgradeInstanceInternalSettings, + listEnvironmentsSettings, + getEnvironmentSettings, + createEnvironmentSettings, + deleteEnvironmentSettings, + listSchedulesSettings, + getScheduleSettings, + deleteScheduleSettings, + createScheduleSettings, + triggerScheduleSettings, + listExecutionsSettings, + getExecutionSettings, + deleteExecutionSettings, + createExecutionSettings); + initDefaults(this); + } + + protected Builder(NotebookServiceStubSettings settings) { + super(settings); + + listInstancesSettings = settings.listInstancesSettings.toBuilder(); + getInstanceSettings = settings.getInstanceSettings.toBuilder(); + createInstanceSettings = settings.createInstanceSettings.toBuilder(); + createInstanceOperationSettings = settings.createInstanceOperationSettings.toBuilder(); + registerInstanceSettings = settings.registerInstanceSettings.toBuilder(); + registerInstanceOperationSettings = settings.registerInstanceOperationSettings.toBuilder(); + setInstanceAcceleratorSettings = settings.setInstanceAcceleratorSettings.toBuilder(); + setInstanceAcceleratorOperationSettings = + settings.setInstanceAcceleratorOperationSettings.toBuilder(); + setInstanceMachineTypeSettings = settings.setInstanceMachineTypeSettings.toBuilder(); + setInstanceMachineTypeOperationSettings = + settings.setInstanceMachineTypeOperationSettings.toBuilder(); + updateInstanceConfigSettings = settings.updateInstanceConfigSettings.toBuilder(); + updateInstanceConfigOperationSettings = + settings.updateInstanceConfigOperationSettings.toBuilder(); + updateShieldedInstanceConfigSettings = + settings.updateShieldedInstanceConfigSettings.toBuilder(); + updateShieldedInstanceConfigOperationSettings = + settings.updateShieldedInstanceConfigOperationSettings.toBuilder(); + setInstanceLabelsSettings = settings.setInstanceLabelsSettings.toBuilder(); + setInstanceLabelsOperationSettings = settings.setInstanceLabelsOperationSettings.toBuilder(); + deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); + deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); + startInstanceSettings = settings.startInstanceSettings.toBuilder(); + startInstanceOperationSettings = settings.startInstanceOperationSettings.toBuilder(); + stopInstanceSettings = settings.stopInstanceSettings.toBuilder(); + stopInstanceOperationSettings = settings.stopInstanceOperationSettings.toBuilder(); + resetInstanceSettings = settings.resetInstanceSettings.toBuilder(); + resetInstanceOperationSettings = settings.resetInstanceOperationSettings.toBuilder(); + reportInstanceInfoSettings = settings.reportInstanceInfoSettings.toBuilder(); + reportInstanceInfoOperationSettings = + settings.reportInstanceInfoOperationSettings.toBuilder(); + isInstanceUpgradeableSettings = settings.isInstanceUpgradeableSettings.toBuilder(); + getInstanceHealthSettings = settings.getInstanceHealthSettings.toBuilder(); + upgradeInstanceSettings = settings.upgradeInstanceSettings.toBuilder(); + upgradeInstanceOperationSettings = settings.upgradeInstanceOperationSettings.toBuilder(); + rollbackInstanceSettings = settings.rollbackInstanceSettings.toBuilder(); + rollbackInstanceOperationSettings = settings.rollbackInstanceOperationSettings.toBuilder(); + upgradeInstanceInternalSettings = settings.upgradeInstanceInternalSettings.toBuilder(); + upgradeInstanceInternalOperationSettings = + settings.upgradeInstanceInternalOperationSettings.toBuilder(); + listEnvironmentsSettings = settings.listEnvironmentsSettings.toBuilder(); + getEnvironmentSettings = settings.getEnvironmentSettings.toBuilder(); + createEnvironmentSettings = settings.createEnvironmentSettings.toBuilder(); + createEnvironmentOperationSettings = settings.createEnvironmentOperationSettings.toBuilder(); + deleteEnvironmentSettings = settings.deleteEnvironmentSettings.toBuilder(); + deleteEnvironmentOperationSettings = settings.deleteEnvironmentOperationSettings.toBuilder(); + listSchedulesSettings = settings.listSchedulesSettings.toBuilder(); + getScheduleSettings = settings.getScheduleSettings.toBuilder(); + deleteScheduleSettings = settings.deleteScheduleSettings.toBuilder(); + deleteScheduleOperationSettings = settings.deleteScheduleOperationSettings.toBuilder(); + createScheduleSettings = settings.createScheduleSettings.toBuilder(); + createScheduleOperationSettings = settings.createScheduleOperationSettings.toBuilder(); + triggerScheduleSettings = settings.triggerScheduleSettings.toBuilder(); + triggerScheduleOperationSettings = settings.triggerScheduleOperationSettings.toBuilder(); + listExecutionsSettings = settings.listExecutionsSettings.toBuilder(); + getExecutionSettings = settings.getExecutionSettings.toBuilder(); + deleteExecutionSettings = settings.deleteExecutionSettings.toBuilder(); + deleteExecutionOperationSettings = settings.deleteExecutionOperationSettings.toBuilder(); + createExecutionSettings = settings.createExecutionSettings.toBuilder(); + createExecutionOperationSettings = settings.createExecutionOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listInstancesSettings, + getInstanceSettings, + createInstanceSettings, + registerInstanceSettings, + setInstanceAcceleratorSettings, + setInstanceMachineTypeSettings, + updateInstanceConfigSettings, + updateShieldedInstanceConfigSettings, + setInstanceLabelsSettings, + deleteInstanceSettings, + startInstanceSettings, + stopInstanceSettings, + resetInstanceSettings, + reportInstanceInfoSettings, + isInstanceUpgradeableSettings, + getInstanceHealthSettings, + upgradeInstanceSettings, + rollbackInstanceSettings, + upgradeInstanceInternalSettings, + listEnvironmentsSettings, + getEnvironmentSettings, + createEnvironmentSettings, + deleteEnvironmentSettings, + listSchedulesSettings, + getScheduleSettings, + deleteScheduleSettings, + createScheduleSettings, + triggerScheduleSettings, + listExecutionsSettings, + getExecutionSettings, + deleteExecutionSettings, + createExecutionSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .registerInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .setInstanceAcceleratorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .setInstanceMachineTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateInstanceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateShieldedInstanceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .setInstanceLabelsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .startInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .stopInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .resetInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .reportInstanceInfoSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .isInstanceUpgradeableSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getInstanceHealthSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .upgradeInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .rollbackInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .upgradeInstanceInternalSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listEnvironmentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listSchedulesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getScheduleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteScheduleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createScheduleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .triggerScheduleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listExecutionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getExecutionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteExecutionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createExecutionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .registerInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .setInstanceAcceleratorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .setInstanceMachineTypeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateInstanceConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateShieldedInstanceConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .setInstanceLabelsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .startInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .stopInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .resetInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .reportInstanceInfoOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .upgradeInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .rollbackInstanceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .upgradeInstanceInternalOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createEnvironmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Environment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteEnvironmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteScheduleOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createScheduleOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Schedule.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .triggerScheduleOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Schedule.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteExecutionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createExecutionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Execution.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + public UnaryCallSettings.Builder createInstanceSettings() { + return createInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createInstanceOperationSettings() { + return createInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to registerInstance. */ + public UnaryCallSettings.Builder + registerInstanceSettings() { + return registerInstanceSettings; + } + + /** Returns the builder for the settings used for calls to registerInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + registerInstanceOperationSettings() { + return registerInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to setInstanceAccelerator. */ + public UnaryCallSettings.Builder + setInstanceAcceleratorSettings() { + return setInstanceAcceleratorSettings; + } + + /** Returns the builder for the settings used for calls to setInstanceAccelerator. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + setInstanceAcceleratorOperationSettings() { + return setInstanceAcceleratorOperationSettings; + } + + /** Returns the builder for the settings used for calls to setInstanceMachineType. */ + public UnaryCallSettings.Builder + setInstanceMachineTypeSettings() { + return setInstanceMachineTypeSettings; + } + + /** Returns the builder for the settings used for calls to setInstanceMachineType. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + setInstanceMachineTypeOperationSettings() { + return setInstanceMachineTypeOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateInstanceConfig. */ + public UnaryCallSettings.Builder + updateInstanceConfigSettings() { + return updateInstanceConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateInstanceConfig. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateInstanceConfigOperationSettings() { + return updateInstanceConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateShieldedInstanceConfig. */ + public UnaryCallSettings.Builder + updateShieldedInstanceConfigSettings() { + return updateShieldedInstanceConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateShieldedInstanceConfig. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateShieldedInstanceConfigRequest, Instance, OperationMetadata> + updateShieldedInstanceConfigOperationSettings() { + return updateShieldedInstanceConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to setInstanceLabels. */ + public UnaryCallSettings.Builder + setInstanceLabelsSettings() { + return setInstanceLabelsSettings; + } + + /** Returns the builder for the settings used for calls to setInstanceLabels. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + setInstanceLabelsOperationSettings() { + return setInstanceLabelsOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + public UnaryCallSettings.Builder deleteInstanceSettings() { + return deleteInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteInstanceOperationSettings() { + return deleteInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to startInstance. */ + public UnaryCallSettings.Builder startInstanceSettings() { + return startInstanceSettings; + } + + /** Returns the builder for the settings used for calls to startInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + startInstanceOperationSettings() { + return startInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + public UnaryCallSettings.Builder stopInstanceSettings() { + return stopInstanceSettings; + } + + /** Returns the builder for the settings used for calls to stopInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + stopInstanceOperationSettings() { + return stopInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to resetInstance. */ + public UnaryCallSettings.Builder resetInstanceSettings() { + return resetInstanceSettings; + } + + /** Returns the builder for the settings used for calls to resetInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + resetInstanceOperationSettings() { + return resetInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to reportInstanceInfo. */ + public UnaryCallSettings.Builder + reportInstanceInfoSettings() { + return reportInstanceInfoSettings; + } + + /** Returns the builder for the settings used for calls to reportInstanceInfo. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + reportInstanceInfoOperationSettings() { + return reportInstanceInfoOperationSettings; + } + + /** Returns the builder for the settings used for calls to isInstanceUpgradeable. */ + public UnaryCallSettings.Builder + isInstanceUpgradeableSettings() { + return isInstanceUpgradeableSettings; + } + + /** Returns the builder for the settings used for calls to getInstanceHealth. */ + public UnaryCallSettings.Builder + getInstanceHealthSettings() { + return getInstanceHealthSettings; + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + public UnaryCallSettings.Builder upgradeInstanceSettings() { + return upgradeInstanceSettings; + } + + /** Returns the builder for the settings used for calls to upgradeInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + upgradeInstanceOperationSettings() { + return upgradeInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to rollbackInstance. */ + public UnaryCallSettings.Builder + rollbackInstanceSettings() { + return rollbackInstanceSettings; + } + + /** Returns the builder for the settings used for calls to rollbackInstance. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + rollbackInstanceOperationSettings() { + return rollbackInstanceOperationSettings; + } + + /** Returns the builder for the settings used for calls to upgradeInstanceInternal. */ + public UnaryCallSettings.Builder + upgradeInstanceInternalSettings() { + return upgradeInstanceInternalSettings; + } + + /** Returns the builder for the settings used for calls to upgradeInstanceInternal. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpgradeInstanceInternalRequest, Instance, OperationMetadata> + upgradeInstanceInternalOperationSettings() { + return upgradeInstanceInternalOperationSettings; + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + /** Returns the builder for the settings used for calls to getEnvironment. */ + public UnaryCallSettings.Builder getEnvironmentSettings() { + return getEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + public UnaryCallSettings.Builder + createEnvironmentSettings() { + return createEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createEnvironmentOperationSettings() { + return createEnvironmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings.Builder + deleteEnvironmentSettings() { + return deleteEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteEnvironmentOperationSettings() { + return deleteEnvironmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to listSchedules. */ + public PagedCallSettings.Builder< + ListSchedulesRequest, ListSchedulesResponse, ListSchedulesPagedResponse> + listSchedulesSettings() { + return listSchedulesSettings; + } + + /** Returns the builder for the settings used for calls to getSchedule. */ + public UnaryCallSettings.Builder getScheduleSettings() { + return getScheduleSettings; + } + + /** Returns the builder for the settings used for calls to deleteSchedule. */ + public UnaryCallSettings.Builder deleteScheduleSettings() { + return deleteScheduleSettings; + } + + /** Returns the builder for the settings used for calls to deleteSchedule. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteScheduleOperationSettings() { + return deleteScheduleOperationSettings; + } + + /** Returns the builder for the settings used for calls to createSchedule. */ + public UnaryCallSettings.Builder createScheduleSettings() { + return createScheduleSettings; + } + + /** Returns the builder for the settings used for calls to createSchedule. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createScheduleOperationSettings() { + return createScheduleOperationSettings; + } + + /** Returns the builder for the settings used for calls to triggerSchedule. */ + public UnaryCallSettings.Builder triggerScheduleSettings() { + return triggerScheduleSettings; + } + + /** Returns the builder for the settings used for calls to triggerSchedule. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + triggerScheduleOperationSettings() { + return triggerScheduleOperationSettings; + } + + /** Returns the builder for the settings used for calls to listExecutions. */ + public PagedCallSettings.Builder< + ListExecutionsRequest, ListExecutionsResponse, ListExecutionsPagedResponse> + listExecutionsSettings() { + return listExecutionsSettings; + } + + /** Returns the builder for the settings used for calls to getExecution. */ + public UnaryCallSettings.Builder getExecutionSettings() { + return getExecutionSettings; + } + + /** Returns the builder for the settings used for calls to deleteExecution. */ + public UnaryCallSettings.Builder deleteExecutionSettings() { + return deleteExecutionSettings; + } + + /** Returns the builder for the settings used for calls to deleteExecution. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteExecutionOperationSettings() { + return deleteExecutionOperationSettings; + } + + /** Returns the builder for the settings used for calls to createExecution. */ + public UnaryCallSettings.Builder createExecutionSettings() { + return createExecutionSettings; + } + + /** Returns the builder for the settings used for calls to createExecution. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createExecutionOperationSettings() { + return createExecutionOperationSettings; + } + + @Override + public NotebookServiceStubSettings build() throws IOException { + return new NotebookServiceStubSettings(this); + } + } +} diff --git a/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceClientTest.java b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceClientTest.java new file mode 100644 index 00000000..e4e0a7c0 --- /dev/null +++ b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceClientTest.java @@ -0,0 +1,765 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import static com.google.cloud.notebooks.v1.ManagedNotebookServiceClient.ListRuntimesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ManagedNotebookServiceClientTest { + private static MockManagedNotebookService mockManagedNotebookService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ManagedNotebookServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockManagedNotebookService = new MockManagedNotebookService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockManagedNotebookService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ManagedNotebookServiceSettings settings = + ManagedNotebookServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ManagedNotebookServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listRuntimesTest() throws Exception { + Runtime responsesElement = Runtime.newBuilder().build(); + ListRuntimesResponse expectedResponse = + ListRuntimesResponse.newBuilder() + .setNextPageToken("") + .addAllRuntimes(Arrays.asList(responsesElement)) + .build(); + mockManagedNotebookService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRuntimesPagedResponse pagedListResponse = client.listRuntimes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuntimesList().get(0), resources.get(0)); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRuntimesRequest actualRequest = ((ListRuntimesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRuntimesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRuntimes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRuntimesTest2() throws Exception { + Runtime responsesElement = Runtime.newBuilder().build(); + ListRuntimesResponse expectedResponse = + ListRuntimesResponse.newBuilder() + .setNextPageToken("") + .addAllRuntimes(Arrays.asList(responsesElement)) + .build(); + mockManagedNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRuntimesPagedResponse pagedListResponse = client.listRuntimes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuntimesList().get(0), resources.get(0)); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRuntimesRequest actualRequest = ((ListRuntimesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRuntimesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRuntimes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRuntimeTest() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockManagedNotebookService.addResponse(expectedResponse); + + RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + + Runtime actualResponse = client.getRuntime(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRuntimeRequest actualRequest = ((GetRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + client.getRuntime(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRuntimeTest2() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockManagedNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + Runtime actualResponse = client.getRuntime(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRuntimeRequest actualRequest = ((GetRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getRuntime(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createRuntimeTest() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + RuntimeName parent = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + String runtimeId = "runtimeId121455379"; + Runtime runtime = Runtime.newBuilder().build(); + + Runtime actualResponse = client.createRuntimeAsync(parent, runtimeId, runtime).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRuntimeRequest actualRequest = ((CreateRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(runtimeId, actualRequest.getRuntimeId()); + Assert.assertEquals(runtime, actualRequest.getRuntime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + RuntimeName parent = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + String runtimeId = "runtimeId121455379"; + Runtime runtime = Runtime.newBuilder().build(); + client.createRuntimeAsync(parent, runtimeId, runtime).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createRuntimeTest2() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + String runtimeId = "runtimeId121455379"; + Runtime runtime = Runtime.newBuilder().build(); + + Runtime actualResponse = client.createRuntimeAsync(parent, runtimeId, runtime).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateRuntimeRequest actualRequest = ((CreateRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(runtimeId, actualRequest.getRuntimeId()); + Assert.assertEquals(runtime, actualRequest.getRuntime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + String runtimeId = "runtimeId121455379"; + Runtime runtime = Runtime.newBuilder().build(); + client.createRuntimeAsync(parent, runtimeId, runtime).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteRuntimeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + + client.deleteRuntimeAsync(name).get(); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRuntimeRequest actualRequest = ((DeleteRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + client.deleteRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteRuntimeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteRuntimeAsync(name).get(); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteRuntimeRequest actualRequest = ((DeleteRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteRuntimeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void startRuntimeTest() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + Runtime actualResponse = client.startRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartRuntimeRequest actualRequest = ((StartRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.startRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void stopRuntimeTest() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + Runtime actualResponse = client.stopRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopRuntimeRequest actualRequest = ((StopRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.stopRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void switchRuntimeTest() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("switchRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + Runtime actualResponse = client.switchRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SwitchRuntimeRequest actualRequest = ((SwitchRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void switchRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.switchRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void resetRuntimeTest() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resetRuntimeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + Runtime actualResponse = client.resetRuntimeAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResetRuntimeRequest actualRequest = ((ResetRuntimeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resetRuntimeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.resetRuntimeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void reportRuntimeEventTest() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("reportRuntimeEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + + Runtime actualResponse = client.reportRuntimeEventAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReportRuntimeEventRequest actualRequest = ((ReportRuntimeEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reportRuntimeEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + client.reportRuntimeEventAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void reportRuntimeEventTest2() throws Exception { + Runtime expectedResponse = + Runtime.newBuilder() + .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + .setAccessConfig(RuntimeAccessConfig.newBuilder().build()) + .setSoftwareConfig(RuntimeSoftwareConfig.newBuilder().build()) + .setMetrics(RuntimeMetrics.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("reportRuntimeEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockManagedNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + Runtime actualResponse = client.reportRuntimeEventAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockManagedNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReportRuntimeEventRequest actualRequest = ((ReportRuntimeEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reportRuntimeEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockManagedNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.reportRuntimeEventAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockManagedNotebookService.java b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockManagedNotebookService.java new file mode 100644 index 00000000..9548deaf --- /dev/null +++ b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockManagedNotebookService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockManagedNotebookService implements MockGrpcService { + private final MockManagedNotebookServiceImpl serviceImpl; + + public MockManagedNotebookService() { + serviceImpl = new MockManagedNotebookServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockManagedNotebookServiceImpl.java b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockManagedNotebookServiceImpl.java new file mode 100644 index 00000000..85afb7f9 --- /dev/null +++ b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockManagedNotebookServiceImpl.java @@ -0,0 +1,248 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.notebooks.v1.ManagedNotebookServiceGrpc.ManagedNotebookServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockManagedNotebookServiceImpl extends ManagedNotebookServiceImplBase { + private List requests; + private Queue responses; + + public MockManagedNotebookServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listRuntimes( + ListRuntimesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRuntimesResponse) { + requests.add(request); + responseObserver.onNext(((ListRuntimesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListRuntimes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRuntimesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRuntime(GetRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Runtime) { + requests.add(request); + responseObserver.onNext(((Runtime) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Runtime.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createRuntime( + CreateRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteRuntime( + DeleteRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void startRuntime( + StartRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StartRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void stopRuntime(StopRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StopRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void switchRuntime( + SwitchRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SwitchRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resetRuntime( + ResetRuntimeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ResetRuntime, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void reportRuntimeEvent( + ReportRuntimeEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReportRuntimeEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockNotebookService.java b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockNotebookService.java new file mode 100644 index 00000000..c50115a8 --- /dev/null +++ b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockNotebookService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNotebookService implements MockGrpcService { + private final MockNotebookServiceImpl serviceImpl; + + public MockNotebookService() { + serviceImpl = new MockNotebookServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockNotebookServiceImpl.java b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockNotebookServiceImpl.java new file mode 100644 index 00000000..6fde3a36 --- /dev/null +++ b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/MockNotebookServiceImpl.java @@ -0,0 +1,733 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.notebooks.v1.NotebookServiceGrpc.NotebookServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockNotebookServiceImpl extends NotebookServiceImplBase { + private List requests; + private Queue responses; + + public MockNotebookServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listInstances( + ListInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancesResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Instance) { + requests.add(request); + responseObserver.onNext(((Instance) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createInstance( + CreateInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void registerInstance( + RegisterInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RegisterInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setInstanceAccelerator( + SetInstanceAcceleratorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetInstanceAccelerator, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setInstanceMachineType( + SetInstanceMachineTypeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetInstanceMachineType, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateInstanceConfig( + UpdateInstanceConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateInstanceConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateShieldedInstanceConfig( + UpdateShieldedInstanceConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateShieldedInstanceConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setInstanceLabels( + SetInstanceLabelsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetInstanceLabels, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInstance( + DeleteInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void startInstance( + StartInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StartInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void stopInstance( + StopInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StopInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resetInstance( + ResetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ResetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void reportInstanceInfo( + ReportInstanceInfoRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReportInstanceInfo, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void isInstanceUpgradeable( + IsInstanceUpgradeableRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IsInstanceUpgradeableResponse) { + requests.add(request); + responseObserver.onNext(((IsInstanceUpgradeableResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method IsInstanceUpgradeable, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IsInstanceUpgradeableResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstanceHealth( + GetInstanceHealthRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GetInstanceHealthResponse) { + requests.add(request); + responseObserver.onNext(((GetInstanceHealthResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstanceHealth, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GetInstanceHealthResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void upgradeInstance( + UpgradeInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpgradeInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rollbackInstance( + RollbackInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RollbackInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void upgradeInstanceInternal( + UpgradeInstanceInternalRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpgradeInstanceInternal, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listEnvironments( + ListEnvironmentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEnvironmentsResponse) { + requests.add(request); + responseObserver.onNext(((ListEnvironmentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEnvironments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEnvironmentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getEnvironment( + GetEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Environment) { + requests.add(request); + responseObserver.onNext(((Environment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Environment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createEnvironment( + CreateEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteEnvironment( + DeleteEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSchedules( + ListSchedulesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSchedulesResponse) { + requests.add(request); + responseObserver.onNext(((ListSchedulesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSchedules, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSchedulesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSchedule(GetScheduleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Schedule) { + requests.add(request); + responseObserver.onNext(((Schedule) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSchedule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Schedule.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSchedule( + DeleteScheduleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSchedule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSchedule( + CreateScheduleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSchedule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void triggerSchedule( + TriggerScheduleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TriggerSchedule, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listExecutions( + ListExecutionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListExecutionsResponse) { + requests.add(request); + responseObserver.onNext(((ListExecutionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListExecutions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListExecutionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getExecution( + GetExecutionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Execution) { + requests.add(request); + responseObserver.onNext(((Execution) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetExecution, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Execution.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteExecution( + DeleteExecutionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteExecution, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createExecution( + CreateExecutionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateExecution, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/NotebookServiceClientTest.java b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/NotebookServiceClientTest.java new file mode 100644 index 00000000..4ef04ad0 --- /dev/null +++ b/google-cloud-notebooks/src/test/java/com/google/cloud/notebooks/v1/NotebookServiceClientTest.java @@ -0,0 +1,2483 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListEnvironmentsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListInstancesPagedResponse; +import static com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class NotebookServiceClientTest { + private static MockNotebookService mockNotebookService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private NotebookServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockNotebookService = new MockNotebookService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockNotebookService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + NotebookServiceSettings settings = + NotebookServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = NotebookServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + + Instance actualResponse = client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstanceRequest actualRequest = ((CreateInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(instanceId, actualRequest.getInstanceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + Instance instance = Instance.newBuilder().build(); + String instanceId = "instanceId902024336"; + client.createInstanceAsync(parent, instance, instanceId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void registerInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("registerInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + RegisterInstanceRequest request = + RegisterInstanceRequest.newBuilder() + .setParent("parent-995424086") + .setInstanceId("instanceId902024336") + .build(); + + Instance actualResponse = client.registerInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RegisterInstanceRequest actualRequest = ((RegisterInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getInstanceId(), actualRequest.getInstanceId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void registerInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + RegisterInstanceRequest request = + RegisterInstanceRequest.newBuilder() + .setParent("parent-995424086") + .setInstanceId("instanceId902024336") + .build(); + client.registerInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void setInstanceAcceleratorTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("setInstanceAcceleratorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + SetInstanceAcceleratorRequest request = + SetInstanceAcceleratorRequest.newBuilder() + .setName("name3373707") + .setCoreCount(-1963855761) + .build(); + + Instance actualResponse = client.setInstanceAcceleratorAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetInstanceAcceleratorRequest actualRequest = + ((SetInstanceAcceleratorRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getType(), actualRequest.getType()); + Assert.assertEquals(request.getCoreCount(), actualRequest.getCoreCount()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setInstanceAcceleratorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + SetInstanceAcceleratorRequest request = + SetInstanceAcceleratorRequest.newBuilder() + .setName("name3373707") + .setCoreCount(-1963855761) + .build(); + client.setInstanceAcceleratorAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void setInstanceMachineTypeTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("setInstanceMachineTypeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + SetInstanceMachineTypeRequest request = + SetInstanceMachineTypeRequest.newBuilder() + .setName("name3373707") + .setMachineType("machineType-218117087") + .build(); + + Instance actualResponse = client.setInstanceMachineTypeAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetInstanceMachineTypeRequest actualRequest = + ((SetInstanceMachineTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getMachineType(), actualRequest.getMachineType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setInstanceMachineTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + SetInstanceMachineTypeRequest request = + SetInstanceMachineTypeRequest.newBuilder() + .setName("name3373707") + .setMachineType("machineType-218117087") + .build(); + client.setInstanceMachineTypeAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateInstanceConfigTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateInstanceConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + UpdateInstanceConfigRequest request = + UpdateInstanceConfigRequest.newBuilder() + .setName("name3373707") + .setConfig(InstanceConfig.newBuilder().build()) + .build(); + + Instance actualResponse = client.updateInstanceConfigAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateInstanceConfigRequest actualRequest = + ((UpdateInstanceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getConfig(), actualRequest.getConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateInstanceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + UpdateInstanceConfigRequest request = + UpdateInstanceConfigRequest.newBuilder() + .setName("name3373707") + .setConfig(InstanceConfig.newBuilder().build()) + .build(); + client.updateInstanceConfigAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateShieldedInstanceConfigTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateShieldedInstanceConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + UpdateShieldedInstanceConfigRequest request = + UpdateShieldedInstanceConfigRequest.newBuilder() + .setName("name3373707") + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .build(); + + Instance actualResponse = client.updateShieldedInstanceConfigAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateShieldedInstanceConfigRequest actualRequest = + ((UpdateShieldedInstanceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals( + request.getShieldedInstanceConfig(), actualRequest.getShieldedInstanceConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateShieldedInstanceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + UpdateShieldedInstanceConfigRequest request = + UpdateShieldedInstanceConfigRequest.newBuilder() + .setName("name3373707") + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .build(); + client.updateShieldedInstanceConfigAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void setInstanceLabelsTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("setInstanceLabelsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + SetInstanceLabelsRequest request = + SetInstanceLabelsRequest.newBuilder() + .setName("name3373707") + .putAllLabels(new HashMap()) + .build(); + + Instance actualResponse = client.setInstanceLabelsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetInstanceLabelsRequest actualRequest = ((SetInstanceLabelsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getLabelsMap(), actualRequest.getLabelsMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setInstanceLabelsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + SetInstanceLabelsRequest request = + SetInstanceLabelsRequest.newBuilder() + .setName("name3373707") + .putAllLabels(new HashMap()) + .build(); + client.setInstanceLabelsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteInstanceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteInstanceAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstanceRequest actualRequest = ((DeleteInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteInstanceAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void startInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + StartInstanceRequest request = StartInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.startInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartInstanceRequest actualRequest = ((StartInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + StartInstanceRequest request = + StartInstanceRequest.newBuilder().setName("name3373707").build(); + client.startInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void stopInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("stopInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.stopInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopInstanceRequest actualRequest = ((StopInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build(); + client.stopInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void resetInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("resetInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + ResetInstanceRequest request = ResetInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.resetInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResetInstanceRequest actualRequest = ((ResetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resetInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ResetInstanceRequest request = + ResetInstanceRequest.newBuilder().setName("name3373707").build(); + client.resetInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void reportInstanceInfoTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("reportInstanceInfoTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + ReportInstanceInfoRequest request = + ReportInstanceInfoRequest.newBuilder() + .setName("name3373707") + .setVmId("vmId3622450") + .putAllMetadata(new HashMap()) + .build(); + + Instance actualResponse = client.reportInstanceInfoAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReportInstanceInfoRequest actualRequest = ((ReportInstanceInfoRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getVmId(), actualRequest.getVmId()); + Assert.assertEquals(request.getMetadataMap(), actualRequest.getMetadataMap()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reportInstanceInfoExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ReportInstanceInfoRequest request = + ReportInstanceInfoRequest.newBuilder() + .setName("name3373707") + .setVmId("vmId3622450") + .putAllMetadata(new HashMap()) + .build(); + client.reportInstanceInfoAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void isInstanceUpgradeableTest() throws Exception { + IsInstanceUpgradeableResponse expectedResponse = + IsInstanceUpgradeableResponse.newBuilder() + .setUpgradeable(true) + .setUpgradeVersion("upgradeVersion-392903908") + .setUpgradeInfo("upgradeInfo-1844902678") + .setUpgradeImage("upgradeImage-1357442913") + .build(); + mockNotebookService.addResponse(expectedResponse); + + IsInstanceUpgradeableRequest request = + IsInstanceUpgradeableRequest.newBuilder() + .setNotebookInstance("notebookInstance-544239728") + .build(); + + IsInstanceUpgradeableResponse actualResponse = client.isInstanceUpgradeable(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + IsInstanceUpgradeableRequest actualRequest = + ((IsInstanceUpgradeableRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getNotebookInstance(), actualRequest.getNotebookInstance()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void isInstanceUpgradeableExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + IsInstanceUpgradeableRequest request = + IsInstanceUpgradeableRequest.newBuilder() + .setNotebookInstance("notebookInstance-544239728") + .build(); + client.isInstanceUpgradeable(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceHealthTest() throws Exception { + GetInstanceHealthResponse expectedResponse = + GetInstanceHealthResponse.newBuilder() + .putAllHealthInfo(new HashMap()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); + + GetInstanceHealthResponse actualResponse = client.getInstanceHealth(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceHealthRequest actualRequest = ((GetInstanceHealthRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceHealthExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); + client.getInstanceHealth(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceHealthTest2() throws Exception { + GetInstanceHealthResponse expectedResponse = + GetInstanceHealthResponse.newBuilder() + .putAllHealthInfo(new HashMap()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + GetInstanceHealthResponse actualResponse = client.getInstanceHealth(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceHealthRequest actualRequest = ((GetInstanceHealthRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceHealthExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getInstanceHealth(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void upgradeInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("upgradeInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + UpgradeInstanceRequest request = + UpgradeInstanceRequest.newBuilder().setName("name3373707").build(); + + Instance actualResponse = client.upgradeInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpgradeInstanceRequest actualRequest = ((UpgradeInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upgradeInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + UpgradeInstanceRequest request = + UpgradeInstanceRequest.newBuilder().setName("name3373707").build(); + client.upgradeInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void rollbackInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rollbackInstanceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + RollbackInstanceRequest request = + RollbackInstanceRequest.newBuilder() + .setName("name3373707") + .setTargetSnapshot("targetSnapshot-1307211147") + .build(); + + Instance actualResponse = client.rollbackInstanceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RollbackInstanceRequest actualRequest = ((RollbackInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getTargetSnapshot(), actualRequest.getTargetSnapshot()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rollbackInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + RollbackInstanceRequest request = + RollbackInstanceRequest.newBuilder() + .setName("name3373707") + .setTargetSnapshot("targetSnapshot-1307211147") + .build(); + client.rollbackInstanceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void upgradeInstanceInternalTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + .setPostStartupScript("postStartupScript870779112") + .setProxyUri("proxyUri-985185250") + .addAllInstanceOwners(new ArrayList()) + .setServiceAccount("serviceAccount1079137720") + .addAllServiceAccountScopes(new ArrayList()) + .setMachineType("machineType-218117087") + .setAcceleratorConfig(Instance.AcceleratorConfig.newBuilder().build()) + .setInstallGpuDriver(true) + .setCustomGpuDriverPath("customGpuDriverPath509224520") + .setBootDiskSizeGb(1398920548) + .setDataDiskSizeGb(-1668379732) + .setNoRemoveDataDisk(true) + .setKmsKey("kmsKey-1127483058") + .addAllDisks(new ArrayList()) + .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build()) + .setNoPublicIp(true) + .setNoProxyAccess(true) + .setNetwork("network1843485230") + .setSubnet("subnet-891534499") + .putAllLabels(new HashMap()) + .putAllMetadata(new HashMap()) + .addAllTags(new ArrayList()) + .addAllUpgradeHistory(new ArrayList()) + .setReservationAffinity(ReservationAffinity.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("upgradeInstanceInternalTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + UpgradeInstanceInternalRequest request = + UpgradeInstanceInternalRequest.newBuilder() + .setName("name3373707") + .setVmId("vmId3622450") + .build(); + + Instance actualResponse = client.upgradeInstanceInternalAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpgradeInstanceInternalRequest actualRequest = + ((UpgradeInstanceInternalRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getVmId(), actualRequest.getVmId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upgradeInstanceInternalExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + UpgradeInstanceInternalRequest request = + UpgradeInstanceInternalRequest.newBuilder() + .setName("name3373707") + .setVmId("vmId3622450") + .build(); + client.upgradeInstanceInternalAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listEnvironmentsTest() throws Exception { + Environment responsesElement = Environment.newBuilder().build(); + ListEnvironmentsResponse expectedResponse = + ListEnvironmentsResponse.newBuilder() + .setNextPageToken("") + .addAllEnvironments(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEnvironmentsPagedResponse pagedListResponse = client.listEnvironments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEnvironmentsList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEnvironmentsRequest actualRequest = ((ListEnvironmentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEnvironmentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEnvironments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEnvironmentTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName("name3373707") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPostStartupScript("postStartupScript870779112") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + Environment actualResponse = client.getEnvironment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEnvironmentRequest actualRequest = ((GetEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getEnvironment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createEnvironmentTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName("name3373707") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setPostStartupScript("postStartupScript870779112") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEnvironmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Environment environment = Environment.newBuilder().build(); + String environmentId = "environmentId-950205810"; + + Environment actualResponse = + client.createEnvironmentAsync(parent, environment, environmentId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEnvironmentRequest actualRequest = ((CreateEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(environment, actualRequest.getEnvironment()); + Assert.assertEquals(environmentId, actualRequest.getEnvironmentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + Environment environment = Environment.newBuilder().build(); + String environmentId = "environmentId-950205810"; + client.createEnvironmentAsync(parent, environment, environmentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteEnvironmentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEnvironmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteEnvironmentAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEnvironmentRequest actualRequest = ((DeleteEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteEnvironmentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listSchedulesTest() throws Exception { + Schedule responsesElement = Schedule.newBuilder().build(); + ListSchedulesResponse expectedResponse = + ListSchedulesResponse.newBuilder() + .setNextPageToken("") + .addAllSchedules(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]"); + + ListSchedulesPagedResponse pagedListResponse = client.listSchedules(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSchedulesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSchedulesRequest actualRequest = ((ListSchedulesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSchedulesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]"); + client.listSchedules(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSchedulesTest2() throws Exception { + Schedule responsesElement = Schedule.newBuilder().build(); + ListSchedulesResponse expectedResponse = + ListSchedulesResponse.newBuilder() + .setNextPageToken("") + .addAllSchedules(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSchedulesPagedResponse pagedListResponse = client.listSchedules(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSchedulesList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSchedulesRequest actualRequest = ((ListSchedulesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSchedulesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSchedules(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getScheduleTest() throws Exception { + Schedule expectedResponse = + Schedule.newBuilder() + .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCronSchedule("cronSchedule-1022672059") + .setTimeZone("timeZone-2077180903") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .addAllRecentExecutions(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]"); + + Schedule actualResponse = client.getSchedule(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetScheduleRequest actualRequest = ((GetScheduleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getScheduleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]"); + client.getSchedule(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getScheduleTest2() throws Exception { + Schedule expectedResponse = + Schedule.newBuilder() + .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCronSchedule("cronSchedule-1022672059") + .setTimeZone("timeZone-2077180903") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .addAllRecentExecutions(new ArrayList()) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + Schedule actualResponse = client.getSchedule(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetScheduleRequest actualRequest = ((GetScheduleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getScheduleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getSchedule(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteScheduleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteScheduleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]"); + + client.deleteScheduleAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteScheduleRequest actualRequest = ((DeleteScheduleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteScheduleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]"); + client.deleteScheduleAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteScheduleTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteScheduleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteScheduleAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteScheduleRequest actualRequest = ((DeleteScheduleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteScheduleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteScheduleAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createScheduleTest() throws Exception { + Schedule expectedResponse = + Schedule.newBuilder() + .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCronSchedule("cronSchedule-1022672059") + .setTimeZone("timeZone-2077180903") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .addAllRecentExecutions(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createScheduleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]"); + Schedule schedule = Schedule.newBuilder().build(); + String scheduleId = "scheduleId-687058414"; + + Schedule actualResponse = client.createScheduleAsync(parent, schedule, scheduleId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateScheduleRequest actualRequest = ((CreateScheduleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(schedule, actualRequest.getSchedule()); + Assert.assertEquals(scheduleId, actualRequest.getScheduleId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createScheduleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]"); + Schedule schedule = Schedule.newBuilder().build(); + String scheduleId = "scheduleId-687058414"; + client.createScheduleAsync(parent, schedule, scheduleId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createScheduleTest2() throws Exception { + Schedule expectedResponse = + Schedule.newBuilder() + .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCronSchedule("cronSchedule-1022672059") + .setTimeZone("timeZone-2077180903") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .addAllRecentExecutions(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createScheduleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Schedule schedule = Schedule.newBuilder().build(); + String scheduleId = "scheduleId-687058414"; + + Schedule actualResponse = client.createScheduleAsync(parent, schedule, scheduleId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateScheduleRequest actualRequest = ((CreateScheduleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(schedule, actualRequest.getSchedule()); + Assert.assertEquals(scheduleId, actualRequest.getScheduleId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createScheduleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + Schedule schedule = Schedule.newBuilder().build(); + String scheduleId = "scheduleId-687058414"; + client.createScheduleAsync(parent, schedule, scheduleId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void triggerScheduleTest() throws Exception { + Schedule expectedResponse = + Schedule.newBuilder() + .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCronSchedule("cronSchedule-1022672059") + .setTimeZone("timeZone-2077180903") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .addAllRecentExecutions(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("triggerScheduleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + TriggerScheduleRequest request = + TriggerScheduleRequest.newBuilder() + .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString()) + .build(); + + Schedule actualResponse = client.triggerScheduleAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TriggerScheduleRequest actualRequest = ((TriggerScheduleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void triggerScheduleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + TriggerScheduleRequest request = + TriggerScheduleRequest.newBuilder() + .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString()) + .build(); + client.triggerScheduleAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listExecutionsTest() throws Exception { + Execution responsesElement = Execution.newBuilder().build(); + ListExecutionsResponse expectedResponse = + ListExecutionsResponse.newBuilder() + .setNextPageToken("") + .addAllExecutions(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]"); + + ListExecutionsPagedResponse pagedListResponse = client.listExecutions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExecutionsList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExecutionsRequest actualRequest = ((ListExecutionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExecutionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]"); + client.listExecutions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExecutionsTest2() throws Exception { + Execution responsesElement = Execution.newBuilder().build(); + ListExecutionsResponse expectedResponse = + ListExecutionsResponse.newBuilder() + .setNextPageToken("") + .addAllExecutions(Arrays.asList(responsesElement)) + .build(); + mockNotebookService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListExecutionsPagedResponse pagedListResponse = client.listExecutions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExecutionsList().get(0), resources.get(0)); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExecutionsRequest actualRequest = ((ListExecutionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExecutionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listExecutions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExecutionTest() throws Exception { + Execution expectedResponse = + Execution.newBuilder() + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOutputNotebookFile("outputNotebookFile2076023192") + .setJobUri("jobUri-1154761617") + .build(); + mockNotebookService.addResponse(expectedResponse); + + ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]"); + + Execution actualResponse = client.getExecution(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExecutionRequest actualRequest = ((GetExecutionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExecutionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]"); + client.getExecution(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExecutionTest2() throws Exception { + Execution expectedResponse = + Execution.newBuilder() + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOutputNotebookFile("outputNotebookFile2076023192") + .setJobUri("jobUri-1154761617") + .build(); + mockNotebookService.addResponse(expectedResponse); + + String name = "name3373707"; + + Execution actualResponse = client.getExecution(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExecutionRequest actualRequest = ((GetExecutionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExecutionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.getExecution(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExecutionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteExecutionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]"); + + client.deleteExecutionAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExecutionRequest actualRequest = ((DeleteExecutionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExecutionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]"); + client.deleteExecutionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteExecutionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteExecutionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteExecutionAsync(name).get(); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExecutionRequest actualRequest = ((DeleteExecutionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExecutionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String name = "name3373707"; + client.deleteExecutionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createExecutionTest() throws Exception { + Execution expectedResponse = + Execution.newBuilder() + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOutputNotebookFile("outputNotebookFile2076023192") + .setJobUri("jobUri-1154761617") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createExecutionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]"); + Execution execution = Execution.newBuilder().build(); + String executionId = "executionId-454906285"; + + Execution actualResponse = client.createExecutionAsync(parent, execution, executionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExecutionRequest actualRequest = ((CreateExecutionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(execution, actualRequest.getExecution()); + Assert.assertEquals(executionId, actualRequest.getExecutionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExecutionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]"); + Execution execution = Execution.newBuilder().build(); + String executionId = "executionId-454906285"; + client.createExecutionAsync(parent, execution, executionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createExecutionTest2() throws Exception { + Execution expectedResponse = + Execution.newBuilder() + .setExecutionTemplate(ExecutionTemplate.newBuilder().build()) + .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOutputNotebookFile("outputNotebookFile2076023192") + .setJobUri("jobUri-1154761617") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createExecutionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNotebookService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Execution execution = Execution.newBuilder().build(); + String executionId = "executionId-454906285"; + + Execution actualResponse = client.createExecutionAsync(parent, execution, executionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNotebookService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExecutionRequest actualRequest = ((CreateExecutionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(execution, actualRequest.getExecution()); + Assert.assertEquals(executionId, actualRequest.getExecutionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExecutionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNotebookService.addException(exception); + + try { + String parent = "parent-995424086"; + Execution execution = Execution.newBuilder().build(); + String executionId = "executionId-454906285"; + client.createExecutionAsync(parent, execution, executionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/grpc-google-cloud-notebooks-v1/pom.xml b/grpc-google-cloud-notebooks-v1/pom.xml new file mode 100644 index 00000000..c22a58f6 --- /dev/null +++ b/grpc-google-cloud-notebooks-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-notebooks-v1 + 0.5.1-SNAPSHOT + grpc-google-cloud-notebooks-v1 + GRPC library for google-cloud-notebooks + + com.google.cloud + google-cloud-notebooks-parent + 0.5.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-notebooks-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationsGrpc.java b/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationsGrpc.java new file mode 100644 index 00000000..16f28b5c --- /dev/null +++ b/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationsGrpc.java @@ -0,0 +1,476 @@ +/* + * 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.location; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * An abstract interface that provides location-related information for
+ * a service. Service-specific metadata is provided through the
+ * [Location.metadata][google.cloud.location.Location.metadata] field.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/location/locations.proto") +public final class LocationsGrpc { + + private LocationsGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.location.Locations"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.location.ListLocationsRequest, + com.google.cloud.location.ListLocationsResponse> + getListLocationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLocations", + requestType = com.google.cloud.location.ListLocationsRequest.class, + responseType = com.google.cloud.location.ListLocationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.location.ListLocationsRequest, + com.google.cloud.location.ListLocationsResponse> + getListLocationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.location.ListLocationsRequest, + com.google.cloud.location.ListLocationsResponse> + getListLocationsMethod; + if ((getListLocationsMethod = LocationsGrpc.getListLocationsMethod) == null) { + synchronized (LocationsGrpc.class) { + if ((getListLocationsMethod = LocationsGrpc.getListLocationsMethod) == null) { + LocationsGrpc.getListLocationsMethod = + getListLocationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLocations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.location.ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.location.ListLocationsResponse.getDefaultInstance())) + .setSchemaDescriptor(new LocationsMethodDescriptorSupplier("ListLocations")) + .build(); + } + } + } + return getListLocationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.location.GetLocationRequest, com.google.cloud.location.Location> + getGetLocationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLocation", + requestType = com.google.cloud.location.GetLocationRequest.class, + responseType = com.google.cloud.location.Location.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.location.GetLocationRequest, com.google.cloud.location.Location> + getGetLocationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.location.GetLocationRequest, com.google.cloud.location.Location> + getGetLocationMethod; + if ((getGetLocationMethod = LocationsGrpc.getGetLocationMethod) == null) { + synchronized (LocationsGrpc.class) { + if ((getGetLocationMethod = LocationsGrpc.getGetLocationMethod) == null) { + LocationsGrpc.getGetLocationMethod = + getGetLocationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLocation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.location.GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.location.Location.getDefaultInstance())) + .setSchemaDescriptor(new LocationsMethodDescriptorSupplier("GetLocation")) + .build(); + } + } + } + return getGetLocationMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static LocationsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LocationsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LocationsStub(channel, callOptions); + } + }; + return LocationsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static LocationsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LocationsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LocationsBlockingStub(channel, callOptions); + } + }; + return LocationsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static LocationsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LocationsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LocationsFutureStub(channel, callOptions); + } + }; + return LocationsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * An abstract interface that provides location-related information for
+   * a service. Service-specific metadata is provided through the
+   * [Location.metadata][google.cloud.location.Location.metadata] field.
+   * 
+ */ + public abstract static class LocationsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists information about the supported locations for this service.
+     * 
+ */ + public void listLocations( + com.google.cloud.location.ListLocationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListLocationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets information about a location.
+     * 
+ */ + public void getLocation( + com.google.cloud.location.GetLocationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetLocationMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListLocationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.location.ListLocationsRequest, + com.google.cloud.location.ListLocationsResponse>( + this, METHODID_LIST_LOCATIONS))) + .addMethod( + getGetLocationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.location.GetLocationRequest, + com.google.cloud.location.Location>(this, METHODID_GET_LOCATION))) + .build(); + } + } + + /** + * + * + *
+   * An abstract interface that provides location-related information for
+   * a service. Service-specific metadata is provided through the
+   * [Location.metadata][google.cloud.location.Location.metadata] field.
+   * 
+ */ + public static final class LocationsStub extends io.grpc.stub.AbstractAsyncStub { + private LocationsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LocationsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LocationsStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists information about the supported locations for this service.
+     * 
+ */ + public void listLocations( + com.google.cloud.location.ListLocationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLocationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets information about a location.
+     * 
+ */ + public void getLocation( + com.google.cloud.location.GetLocationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLocationMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * An abstract interface that provides location-related information for
+   * a service. Service-specific metadata is provided through the
+   * [Location.metadata][google.cloud.location.Location.metadata] field.
+   * 
+ */ + public static final class LocationsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private LocationsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LocationsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LocationsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists information about the supported locations for this service.
+     * 
+ */ + public com.google.cloud.location.ListLocationsResponse listLocations( + com.google.cloud.location.ListLocationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLocationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets information about a location.
+     * 
+ */ + public com.google.cloud.location.Location getLocation( + com.google.cloud.location.GetLocationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLocationMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * An abstract interface that provides location-related information for
+   * a service. Service-specific metadata is provided through the
+   * [Location.metadata][google.cloud.location.Location.metadata] field.
+   * 
+ */ + public static final class LocationsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private LocationsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LocationsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LocationsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists information about the supported locations for this service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.location.ListLocationsResponse> + listLocations(com.google.cloud.location.ListLocationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLocationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets information about a location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getLocation(com.google.cloud.location.GetLocationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLocationMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_LOCATIONS = 0; + private static final int METHODID_GET_LOCATION = 1; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final LocationsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(LocationsImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_LOCATIONS: + serviceImpl.listLocations( + (com.google.cloud.location.ListLocationsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_LOCATION: + serviceImpl.getLocation( + (com.google.cloud.location.GetLocationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class LocationsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + LocationsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.location.LocationsProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Locations"); + } + } + + private static final class LocationsFileDescriptorSupplier + extends LocationsBaseDescriptorSupplier { + LocationsFileDescriptorSupplier() {} + } + + private static final class LocationsMethodDescriptorSupplier + extends LocationsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + LocationsMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (LocationsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new LocationsFileDescriptorSupplier()) + .addMethod(getListLocationsMethod()) + .addMethod(getGetLocationMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceGrpc.java b/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceGrpc.java new file mode 100644 index 00000000..88f3db3a --- /dev/null +++ b/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebookServiceGrpc.java @@ -0,0 +1,1297 @@ +/* + * 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.notebooks.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * API v1 service for Managed Notebooks.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/notebooks/v1/managed_service.proto") +public final class ManagedNotebookServiceGrpc { + + private ManagedNotebookServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.notebooks.v1.ManagedNotebookService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListRuntimesRequest, + com.google.cloud.notebooks.v1.ListRuntimesResponse> + getListRuntimesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRuntimes", + requestType = com.google.cloud.notebooks.v1.ListRuntimesRequest.class, + responseType = com.google.cloud.notebooks.v1.ListRuntimesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListRuntimesRequest, + com.google.cloud.notebooks.v1.ListRuntimesResponse> + getListRuntimesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListRuntimesRequest, + com.google.cloud.notebooks.v1.ListRuntimesResponse> + getListRuntimesMethod; + if ((getListRuntimesMethod = ManagedNotebookServiceGrpc.getListRuntimesMethod) == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getListRuntimesMethod = ManagedNotebookServiceGrpc.getListRuntimesMethod) == null) { + ManagedNotebookServiceGrpc.getListRuntimesMethod = + getListRuntimesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRuntimes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListRuntimesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListRuntimesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("ListRuntimes")) + .build(); + } + } + } + return getListRuntimesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetRuntimeRequest, com.google.cloud.notebooks.v1.Runtime> + getGetRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRuntime", + requestType = com.google.cloud.notebooks.v1.GetRuntimeRequest.class, + responseType = com.google.cloud.notebooks.v1.Runtime.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetRuntimeRequest, com.google.cloud.notebooks.v1.Runtime> + getGetRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetRuntimeRequest, com.google.cloud.notebooks.v1.Runtime> + getGetRuntimeMethod; + if ((getGetRuntimeMethod = ManagedNotebookServiceGrpc.getGetRuntimeMethod) == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getGetRuntimeMethod = ManagedNotebookServiceGrpc.getGetRuntimeMethod) == null) { + ManagedNotebookServiceGrpc.getGetRuntimeMethod = + getGetRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.GetRuntimeRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.Runtime.getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("GetRuntime")) + .build(); + } + } + } + return getGetRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateRuntimeRequest, com.google.longrunning.Operation> + getCreateRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateRuntime", + requestType = com.google.cloud.notebooks.v1.CreateRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateRuntimeRequest, com.google.longrunning.Operation> + getCreateRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateRuntimeRequest, com.google.longrunning.Operation> + getCreateRuntimeMethod; + if ((getCreateRuntimeMethod = ManagedNotebookServiceGrpc.getCreateRuntimeMethod) == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getCreateRuntimeMethod = ManagedNotebookServiceGrpc.getCreateRuntimeMethod) == null) { + ManagedNotebookServiceGrpc.getCreateRuntimeMethod = + getCreateRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.CreateRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("CreateRuntime")) + .build(); + } + } + } + return getCreateRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteRuntimeRequest, com.google.longrunning.Operation> + getDeleteRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteRuntime", + requestType = com.google.cloud.notebooks.v1.DeleteRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteRuntimeRequest, com.google.longrunning.Operation> + getDeleteRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteRuntimeRequest, com.google.longrunning.Operation> + getDeleteRuntimeMethod; + if ((getDeleteRuntimeMethod = ManagedNotebookServiceGrpc.getDeleteRuntimeMethod) == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getDeleteRuntimeMethod = ManagedNotebookServiceGrpc.getDeleteRuntimeMethod) == null) { + ManagedNotebookServiceGrpc.getDeleteRuntimeMethod = + getDeleteRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.DeleteRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("DeleteRuntime")) + .build(); + } + } + } + return getDeleteRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StartRuntimeRequest, com.google.longrunning.Operation> + getStartRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartRuntime", + requestType = com.google.cloud.notebooks.v1.StartRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StartRuntimeRequest, com.google.longrunning.Operation> + getStartRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StartRuntimeRequest, com.google.longrunning.Operation> + getStartRuntimeMethod; + if ((getStartRuntimeMethod = ManagedNotebookServiceGrpc.getStartRuntimeMethod) == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getStartRuntimeMethod = ManagedNotebookServiceGrpc.getStartRuntimeMethod) == null) { + ManagedNotebookServiceGrpc.getStartRuntimeMethod = + getStartRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.StartRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("StartRuntime")) + .build(); + } + } + } + return getStartRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StopRuntimeRequest, com.google.longrunning.Operation> + getStopRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopRuntime", + requestType = com.google.cloud.notebooks.v1.StopRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StopRuntimeRequest, com.google.longrunning.Operation> + getStopRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StopRuntimeRequest, com.google.longrunning.Operation> + getStopRuntimeMethod; + if ((getStopRuntimeMethod = ManagedNotebookServiceGrpc.getStopRuntimeMethod) == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getStopRuntimeMethod = ManagedNotebookServiceGrpc.getStopRuntimeMethod) == null) { + ManagedNotebookServiceGrpc.getStopRuntimeMethod = + getStopRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.StopRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("StopRuntime")) + .build(); + } + } + } + return getStopRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SwitchRuntimeRequest, com.google.longrunning.Operation> + getSwitchRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SwitchRuntime", + requestType = com.google.cloud.notebooks.v1.SwitchRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SwitchRuntimeRequest, com.google.longrunning.Operation> + getSwitchRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SwitchRuntimeRequest, com.google.longrunning.Operation> + getSwitchRuntimeMethod; + if ((getSwitchRuntimeMethod = ManagedNotebookServiceGrpc.getSwitchRuntimeMethod) == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getSwitchRuntimeMethod = ManagedNotebookServiceGrpc.getSwitchRuntimeMethod) == null) { + ManagedNotebookServiceGrpc.getSwitchRuntimeMethod = + getSwitchRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SwitchRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.SwitchRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("SwitchRuntime")) + .build(); + } + } + } + return getSwitchRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ResetRuntimeRequest, com.google.longrunning.Operation> + getResetRuntimeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResetRuntime", + requestType = com.google.cloud.notebooks.v1.ResetRuntimeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ResetRuntimeRequest, com.google.longrunning.Operation> + getResetRuntimeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ResetRuntimeRequest, com.google.longrunning.Operation> + getResetRuntimeMethod; + if ((getResetRuntimeMethod = ManagedNotebookServiceGrpc.getResetRuntimeMethod) == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getResetRuntimeMethod = ManagedNotebookServiceGrpc.getResetRuntimeMethod) == null) { + ManagedNotebookServiceGrpc.getResetRuntimeMethod = + getResetRuntimeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResetRuntime")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ResetRuntimeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("ResetRuntime")) + .build(); + } + } + } + return getResetRuntimeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest, com.google.longrunning.Operation> + getReportRuntimeEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReportRuntimeEvent", + requestType = com.google.cloud.notebooks.v1.ReportRuntimeEventRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest, com.google.longrunning.Operation> + getReportRuntimeEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest, + com.google.longrunning.Operation> + getReportRuntimeEventMethod; + if ((getReportRuntimeEventMethod = ManagedNotebookServiceGrpc.getReportRuntimeEventMethod) + == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + if ((getReportRuntimeEventMethod = ManagedNotebookServiceGrpc.getReportRuntimeEventMethod) + == null) { + ManagedNotebookServiceGrpc.getReportRuntimeEventMethod = + getReportRuntimeEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReportRuntimeEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ManagedNotebookServiceMethodDescriptorSupplier("ReportRuntimeEvent")) + .build(); + } + } + } + return getReportRuntimeEventMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ManagedNotebookServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ManagedNotebookServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ManagedNotebookServiceStub(channel, callOptions); + } + }; + return ManagedNotebookServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ManagedNotebookServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ManagedNotebookServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ManagedNotebookServiceBlockingStub(channel, callOptions); + } + }; + return ManagedNotebookServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ManagedNotebookServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ManagedNotebookServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ManagedNotebookServiceFutureStub(channel, callOptions); + } + }; + return ManagedNotebookServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * API v1 service for Managed Notebooks.
+   * 
+ */ + public abstract static class ManagedNotebookServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists Runtimes in a given project and location.
+     * 
+ */ + public void listRuntimes( + com.google.cloud.notebooks.v1.ListRuntimesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRuntimesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Runtime. The location must be a regional endpoint
+     * rather than zonal.
+     * 
+ */ + public void getRuntime( + com.google.cloud.notebooks.v1.GetRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Runtime in a given project and location.
+     * 
+ */ + public void createRuntime( + com.google.cloud.notebooks.v1.CreateRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Runtime.
+     * 
+ */ + public void deleteRuntime( + com.google.cloud.notebooks.v1.DeleteRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Starts a Managed Notebook Runtime.
+     * Perform "Start" on GPU instances; "Resume" on CPU instances
+     * See:
+     * https://cloud.google.com/compute/docs/instances/stop-start-instance
+     * https://cloud.google.com/compute/docs/instances/suspend-resume-instance
+     * 
+ */ + public void startRuntime( + com.google.cloud.notebooks.v1.StartRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStartRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops a Managed Notebook Runtime.
+     * Perform "Stop" on GPU instances; "Suspend" on CPU instances
+     * See:
+     * https://cloud.google.com/compute/docs/instances/stop-start-instance
+     * https://cloud.google.com/compute/docs/instances/suspend-resume-instance
+     * 
+ */ + public void stopRuntime( + com.google.cloud.notebooks.v1.StopRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStopRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Switch a Managed Notebook Runtime.
+     * 
+ */ + public void switchRuntime( + com.google.cloud.notebooks.v1.SwitchRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSwitchRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Resets a Managed Notebook Runtime.
+     * 
+ */ + public void resetRuntime( + com.google.cloud.notebooks.v1.ResetRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResetRuntimeMethod(), responseObserver); + } + + /** + * + * + *
+     * Report and process a runtime event.
+     * 
+ */ + public void reportRuntimeEvent( + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReportRuntimeEventMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListRuntimesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ListRuntimesRequest, + com.google.cloud.notebooks.v1.ListRuntimesResponse>( + this, METHODID_LIST_RUNTIMES))) + .addMethod( + getGetRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.GetRuntimeRequest, + com.google.cloud.notebooks.v1.Runtime>(this, METHODID_GET_RUNTIME))) + .addMethod( + getCreateRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.CreateRuntimeRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_RUNTIME))) + .addMethod( + getDeleteRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.DeleteRuntimeRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_RUNTIME))) + .addMethod( + getStartRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.StartRuntimeRequest, + com.google.longrunning.Operation>(this, METHODID_START_RUNTIME))) + .addMethod( + getStopRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.StopRuntimeRequest, + com.google.longrunning.Operation>(this, METHODID_STOP_RUNTIME))) + .addMethod( + getSwitchRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.SwitchRuntimeRequest, + com.google.longrunning.Operation>(this, METHODID_SWITCH_RUNTIME))) + .addMethod( + getResetRuntimeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ResetRuntimeRequest, + com.google.longrunning.Operation>(this, METHODID_RESET_RUNTIME))) + .addMethod( + getReportRuntimeEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest, + com.google.longrunning.Operation>(this, METHODID_REPORT_RUNTIME_EVENT))) + .build(); + } + } + + /** + * + * + *
+   * API v1 service for Managed Notebooks.
+   * 
+ */ + public static final class ManagedNotebookServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ManagedNotebookServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ManagedNotebookServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ManagedNotebookServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Runtimes in a given project and location.
+     * 
+ */ + public void listRuntimes( + com.google.cloud.notebooks.v1.ListRuntimesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRuntimesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Runtime. The location must be a regional endpoint
+     * rather than zonal.
+     * 
+ */ + public void getRuntime( + com.google.cloud.notebooks.v1.GetRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRuntimeMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Runtime in a given project and location.
+     * 
+ */ + public void createRuntime( + com.google.cloud.notebooks.v1.CreateRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Runtime.
+     * 
+ */ + public void deleteRuntime( + com.google.cloud.notebooks.v1.DeleteRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts a Managed Notebook Runtime.
+     * Perform "Start" on GPU instances; "Resume" on CPU instances
+     * See:
+     * https://cloud.google.com/compute/docs/instances/stop-start-instance
+     * https://cloud.google.com/compute/docs/instances/suspend-resume-instance
+     * 
+ */ + public void startRuntime( + com.google.cloud.notebooks.v1.StartRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops a Managed Notebook Runtime.
+     * Perform "Stop" on GPU instances; "Suspend" on CPU instances
+     * See:
+     * https://cloud.google.com/compute/docs/instances/stop-start-instance
+     * https://cloud.google.com/compute/docs/instances/suspend-resume-instance
+     * 
+ */ + public void stopRuntime( + com.google.cloud.notebooks.v1.StopRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Switch a Managed Notebook Runtime.
+     * 
+ */ + public void switchRuntime( + com.google.cloud.notebooks.v1.SwitchRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSwitchRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Resets a Managed Notebook Runtime.
+     * 
+ */ + public void resetRuntime( + com.google.cloud.notebooks.v1.ResetRuntimeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResetRuntimeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Report and process a runtime event.
+     * 
+ */ + public void reportRuntimeEvent( + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReportRuntimeEventMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * API v1 service for Managed Notebooks.
+   * 
+ */ + public static final class ManagedNotebookServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ManagedNotebookServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ManagedNotebookServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ManagedNotebookServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Runtimes in a given project and location.
+     * 
+ */ + public com.google.cloud.notebooks.v1.ListRuntimesResponse listRuntimes( + com.google.cloud.notebooks.v1.ListRuntimesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRuntimesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Runtime. The location must be a regional endpoint
+     * rather than zonal.
+     * 
+ */ + public com.google.cloud.notebooks.v1.Runtime getRuntime( + com.google.cloud.notebooks.v1.GetRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Runtime in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createRuntime( + com.google.cloud.notebooks.v1.CreateRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Runtime.
+     * 
+ */ + public com.google.longrunning.Operation deleteRuntime( + com.google.cloud.notebooks.v1.DeleteRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a Managed Notebook Runtime.
+     * Perform "Start" on GPU instances; "Resume" on CPU instances
+     * See:
+     * https://cloud.google.com/compute/docs/instances/stop-start-instance
+     * https://cloud.google.com/compute/docs/instances/suspend-resume-instance
+     * 
+ */ + public com.google.longrunning.Operation startRuntime( + com.google.cloud.notebooks.v1.StartRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops a Managed Notebook Runtime.
+     * Perform "Stop" on GPU instances; "Suspend" on CPU instances
+     * See:
+     * https://cloud.google.com/compute/docs/instances/stop-start-instance
+     * https://cloud.google.com/compute/docs/instances/suspend-resume-instance
+     * 
+ */ + public com.google.longrunning.Operation stopRuntime( + com.google.cloud.notebooks.v1.StopRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Switch a Managed Notebook Runtime.
+     * 
+ */ + public com.google.longrunning.Operation switchRuntime( + com.google.cloud.notebooks.v1.SwitchRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSwitchRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resets a Managed Notebook Runtime.
+     * 
+ */ + public com.google.longrunning.Operation resetRuntime( + com.google.cloud.notebooks.v1.ResetRuntimeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResetRuntimeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Report and process a runtime event.
+     * 
+ */ + public com.google.longrunning.Operation reportRuntimeEvent( + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReportRuntimeEventMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * API v1 service for Managed Notebooks.
+   * 
+ */ + public static final class ManagedNotebookServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ManagedNotebookServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ManagedNotebookServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ManagedNotebookServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Runtimes in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.ListRuntimesResponse> + listRuntimes(com.google.cloud.notebooks.v1.ListRuntimesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRuntimesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Runtime. The location must be a regional endpoint
+     * rather than zonal.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getRuntime(com.google.cloud.notebooks.v1.GetRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Runtime in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createRuntime(com.google.cloud.notebooks.v1.CreateRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Runtime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteRuntime(com.google.cloud.notebooks.v1.DeleteRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts a Managed Notebook Runtime.
+     * Perform "Start" on GPU instances; "Resume" on CPU instances
+     * See:
+     * https://cloud.google.com/compute/docs/instances/stop-start-instance
+     * https://cloud.google.com/compute/docs/instances/suspend-resume-instance
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + startRuntime(com.google.cloud.notebooks.v1.StartRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops a Managed Notebook Runtime.
+     * Perform "Stop" on GPU instances; "Suspend" on CPU instances
+     * See:
+     * https://cloud.google.com/compute/docs/instances/stop-start-instance
+     * https://cloud.google.com/compute/docs/instances/suspend-resume-instance
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + stopRuntime(com.google.cloud.notebooks.v1.StopRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Switch a Managed Notebook Runtime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + switchRuntime(com.google.cloud.notebooks.v1.SwitchRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSwitchRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Resets a Managed Notebook Runtime.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + resetRuntime(com.google.cloud.notebooks.v1.ResetRuntimeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResetRuntimeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Report and process a runtime event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + reportRuntimeEvent(com.google.cloud.notebooks.v1.ReportRuntimeEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReportRuntimeEventMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_RUNTIMES = 0; + private static final int METHODID_GET_RUNTIME = 1; + private static final int METHODID_CREATE_RUNTIME = 2; + private static final int METHODID_DELETE_RUNTIME = 3; + private static final int METHODID_START_RUNTIME = 4; + private static final int METHODID_STOP_RUNTIME = 5; + private static final int METHODID_SWITCH_RUNTIME = 6; + private static final int METHODID_RESET_RUNTIME = 7; + private static final int METHODID_REPORT_RUNTIME_EVENT = 8; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ManagedNotebookServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ManagedNotebookServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_RUNTIMES: + serviceImpl.listRuntimes( + (com.google.cloud.notebooks.v1.ListRuntimesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_RUNTIME: + serviceImpl.getRuntime( + (com.google.cloud.notebooks.v1.GetRuntimeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_RUNTIME: + serviceImpl.createRuntime( + (com.google.cloud.notebooks.v1.CreateRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_RUNTIME: + serviceImpl.deleteRuntime( + (com.google.cloud.notebooks.v1.DeleteRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_RUNTIME: + serviceImpl.startRuntime( + (com.google.cloud.notebooks.v1.StartRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_STOP_RUNTIME: + serviceImpl.stopRuntime( + (com.google.cloud.notebooks.v1.StopRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SWITCH_RUNTIME: + serviceImpl.switchRuntime( + (com.google.cloud.notebooks.v1.SwitchRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESET_RUNTIME: + serviceImpl.resetRuntime( + (com.google.cloud.notebooks.v1.ResetRuntimeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REPORT_RUNTIME_EVENT: + serviceImpl.reportRuntimeEvent( + (com.google.cloud.notebooks.v1.ReportRuntimeEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class ManagedNotebookServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ManagedNotebookServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ManagedNotebookService"); + } + } + + private static final class ManagedNotebookServiceFileDescriptorSupplier + extends ManagedNotebookServiceBaseDescriptorSupplier { + ManagedNotebookServiceFileDescriptorSupplier() {} + } + + private static final class ManagedNotebookServiceMethodDescriptorSupplier + extends ManagedNotebookServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ManagedNotebookServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ManagedNotebookServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ManagedNotebookServiceFileDescriptorSupplier()) + .addMethod(getListRuntimesMethod()) + .addMethod(getGetRuntimeMethod()) + .addMethod(getCreateRuntimeMethod()) + .addMethod(getDeleteRuntimeMethod()) + .addMethod(getStartRuntimeMethod()) + .addMethod(getStopRuntimeMethod()) + .addMethod(getSwitchRuntimeMethod()) + .addMethod(getResetRuntimeMethod()) + .addMethod(getReportRuntimeEventMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceGrpc.java b/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceGrpc.java new file mode 100644 index 00000000..15c975b3 --- /dev/null +++ b/grpc-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceGrpc.java @@ -0,0 +1,3971 @@ +/* + * 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.notebooks.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * API v1 service for Cloud AI Platform Notebooks.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/notebooks/v1/service.proto") +public final class NotebookServiceGrpc { + + private NotebookServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.notebooks.v1.NotebookService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListInstancesRequest, + com.google.cloud.notebooks.v1.ListInstancesResponse> + getListInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstances", + requestType = com.google.cloud.notebooks.v1.ListInstancesRequest.class, + responseType = com.google.cloud.notebooks.v1.ListInstancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListInstancesRequest, + com.google.cloud.notebooks.v1.ListInstancesResponse> + getListInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListInstancesRequest, + com.google.cloud.notebooks.v1.ListInstancesResponse> + getListInstancesMethod; + if ((getListInstancesMethod = NotebookServiceGrpc.getListInstancesMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getListInstancesMethod = NotebookServiceGrpc.getListInstancesMethod) == null) { + NotebookServiceGrpc.getListInstancesMethod = + getListInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListInstancesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListInstancesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("ListInstances")) + .build(); + } + } + } + return getListInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetInstanceRequest, com.google.cloud.notebooks.v1.Instance> + getGetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstance", + requestType = com.google.cloud.notebooks.v1.GetInstanceRequest.class, + responseType = com.google.cloud.notebooks.v1.Instance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetInstanceRequest, com.google.cloud.notebooks.v1.Instance> + getGetInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetInstanceRequest, + com.google.cloud.notebooks.v1.Instance> + getGetInstanceMethod; + if ((getGetInstanceMethod = NotebookServiceGrpc.getGetInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetInstanceMethod = NotebookServiceGrpc.getGetInstanceMethod) == null) { + NotebookServiceGrpc.getGetInstanceMethod = + getGetInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.GetInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.Instance.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetInstance")) + .build(); + } + } + } + return getGetInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInstance", + requestType = com.google.cloud.notebooks.v1.CreateInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateInstanceRequest, com.google.longrunning.Operation> + getCreateInstanceMethod; + if ((getCreateInstanceMethod = NotebookServiceGrpc.getCreateInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getCreateInstanceMethod = NotebookServiceGrpc.getCreateInstanceMethod) == null) { + NotebookServiceGrpc.getCreateInstanceMethod = + getCreateInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.CreateInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("CreateInstance")) + .build(); + } + } + } + return getCreateInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.RegisterInstanceRequest, com.google.longrunning.Operation> + getRegisterInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RegisterInstance", + requestType = com.google.cloud.notebooks.v1.RegisterInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.RegisterInstanceRequest, com.google.longrunning.Operation> + getRegisterInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.RegisterInstanceRequest, com.google.longrunning.Operation> + getRegisterInstanceMethod; + if ((getRegisterInstanceMethod = NotebookServiceGrpc.getRegisterInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getRegisterInstanceMethod = NotebookServiceGrpc.getRegisterInstanceMethod) == null) { + NotebookServiceGrpc.getRegisterInstanceMethod = + getRegisterInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RegisterInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.RegisterInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("RegisterInstance")) + .build(); + } + } + } + return getRegisterInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest, + com.google.longrunning.Operation> + getSetInstanceAcceleratorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetInstanceAccelerator", + requestType = com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest, + com.google.longrunning.Operation> + getSetInstanceAcceleratorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest, + com.google.longrunning.Operation> + getSetInstanceAcceleratorMethod; + if ((getSetInstanceAcceleratorMethod = NotebookServiceGrpc.getSetInstanceAcceleratorMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getSetInstanceAcceleratorMethod = NotebookServiceGrpc.getSetInstanceAcceleratorMethod) + == null) { + NotebookServiceGrpc.getSetInstanceAcceleratorMethod = + getSetInstanceAcceleratorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SetInstanceAccelerator")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("SetInstanceAccelerator")) + .build(); + } + } + } + return getSetInstanceAcceleratorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest, + com.google.longrunning.Operation> + getSetInstanceMachineTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetInstanceMachineType", + requestType = com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest, + com.google.longrunning.Operation> + getSetInstanceMachineTypeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest, + com.google.longrunning.Operation> + getSetInstanceMachineTypeMethod; + if ((getSetInstanceMachineTypeMethod = NotebookServiceGrpc.getSetInstanceMachineTypeMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getSetInstanceMachineTypeMethod = NotebookServiceGrpc.getSetInstanceMachineTypeMethod) + == null) { + NotebookServiceGrpc.getSetInstanceMachineTypeMethod = + getSetInstanceMachineTypeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SetInstanceMachineType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("SetInstanceMachineType")) + .build(); + } + } + } + return getSetInstanceMachineTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest, + com.google.longrunning.Operation> + getUpdateInstanceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateInstanceConfig", + requestType = com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest, + com.google.longrunning.Operation> + getUpdateInstanceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest, + com.google.longrunning.Operation> + getUpdateInstanceConfigMethod; + if ((getUpdateInstanceConfigMethod = NotebookServiceGrpc.getUpdateInstanceConfigMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getUpdateInstanceConfigMethod = NotebookServiceGrpc.getUpdateInstanceConfigMethod) + == null) { + NotebookServiceGrpc.getUpdateInstanceConfigMethod = + getUpdateInstanceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateInstanceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("UpdateInstanceConfig")) + .build(); + } + } + } + return getUpdateInstanceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest, + com.google.longrunning.Operation> + getUpdateShieldedInstanceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateShieldedInstanceConfig", + requestType = com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest, + com.google.longrunning.Operation> + getUpdateShieldedInstanceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest, + com.google.longrunning.Operation> + getUpdateShieldedInstanceConfigMethod; + if ((getUpdateShieldedInstanceConfigMethod = + NotebookServiceGrpc.getUpdateShieldedInstanceConfigMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getUpdateShieldedInstanceConfigMethod = + NotebookServiceGrpc.getUpdateShieldedInstanceConfigMethod) + == null) { + NotebookServiceGrpc.getUpdateShieldedInstanceConfigMethod = + getUpdateShieldedInstanceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateShieldedInstanceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier( + "UpdateShieldedInstanceConfig")) + .build(); + } + } + } + return getUpdateShieldedInstanceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest, com.google.longrunning.Operation> + getSetInstanceLabelsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetInstanceLabels", + requestType = com.google.cloud.notebooks.v1.SetInstanceLabelsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest, com.google.longrunning.Operation> + getSetInstanceLabelsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest, + com.google.longrunning.Operation> + getSetInstanceLabelsMethod; + if ((getSetInstanceLabelsMethod = NotebookServiceGrpc.getSetInstanceLabelsMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getSetInstanceLabelsMethod = NotebookServiceGrpc.getSetInstanceLabelsMethod) == null) { + NotebookServiceGrpc.getSetInstanceLabelsMethod = + getSetInstanceLabelsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetInstanceLabels")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("SetInstanceLabels")) + .build(); + } + } + } + return getSetInstanceLabelsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", + requestType = com.google.cloud.notebooks.v1.DeleteInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteInstanceRequest, com.google.longrunning.Operation> + getDeleteInstanceMethod; + if ((getDeleteInstanceMethod = NotebookServiceGrpc.getDeleteInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getDeleteInstanceMethod = NotebookServiceGrpc.getDeleteInstanceMethod) == null) { + NotebookServiceGrpc.getDeleteInstanceMethod = + getDeleteInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.DeleteInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("DeleteInstance")) + .build(); + } + } + } + return getDeleteInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StartInstanceRequest, com.google.longrunning.Operation> + getStartInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartInstance", + requestType = com.google.cloud.notebooks.v1.StartInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StartInstanceRequest, com.google.longrunning.Operation> + getStartInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StartInstanceRequest, com.google.longrunning.Operation> + getStartInstanceMethod; + if ((getStartInstanceMethod = NotebookServiceGrpc.getStartInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getStartInstanceMethod = NotebookServiceGrpc.getStartInstanceMethod) == null) { + NotebookServiceGrpc.getStartInstanceMethod = + getStartInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.StartInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("StartInstance")) + .build(); + } + } + } + return getStartInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StopInstanceRequest, com.google.longrunning.Operation> + getStopInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopInstance", + requestType = com.google.cloud.notebooks.v1.StopInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StopInstanceRequest, com.google.longrunning.Operation> + getStopInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.StopInstanceRequest, com.google.longrunning.Operation> + getStopInstanceMethod; + if ((getStopInstanceMethod = NotebookServiceGrpc.getStopInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getStopInstanceMethod = NotebookServiceGrpc.getStopInstanceMethod) == null) { + NotebookServiceGrpc.getStopInstanceMethod = + getStopInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.StopInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("StopInstance")) + .build(); + } + } + } + return getStopInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ResetInstanceRequest, com.google.longrunning.Operation> + getResetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResetInstance", + requestType = com.google.cloud.notebooks.v1.ResetInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ResetInstanceRequest, com.google.longrunning.Operation> + getResetInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ResetInstanceRequest, com.google.longrunning.Operation> + getResetInstanceMethod; + if ((getResetInstanceMethod = NotebookServiceGrpc.getResetInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getResetInstanceMethod = NotebookServiceGrpc.getResetInstanceMethod) == null) { + NotebookServiceGrpc.getResetInstanceMethod = + getResetInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ResetInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("ResetInstance")) + .build(); + } + } + } + return getResetInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest, com.google.longrunning.Operation> + getReportInstanceInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReportInstanceInfo", + requestType = com.google.cloud.notebooks.v1.ReportInstanceInfoRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest, com.google.longrunning.Operation> + getReportInstanceInfoMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest, + com.google.longrunning.Operation> + getReportInstanceInfoMethod; + if ((getReportInstanceInfoMethod = NotebookServiceGrpc.getReportInstanceInfoMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getReportInstanceInfoMethod = NotebookServiceGrpc.getReportInstanceInfoMethod) + == null) { + NotebookServiceGrpc.getReportInstanceInfoMethod = + getReportInstanceInfoMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReportInstanceInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("ReportInstanceInfo")) + .build(); + } + } + } + return getReportInstanceInfoMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest, + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse> + getIsInstanceUpgradeableMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "IsInstanceUpgradeable", + requestType = com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest.class, + responseType = com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest, + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse> + getIsInstanceUpgradeableMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest, + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse> + getIsInstanceUpgradeableMethod; + if ((getIsInstanceUpgradeableMethod = NotebookServiceGrpc.getIsInstanceUpgradeableMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getIsInstanceUpgradeableMethod = NotebookServiceGrpc.getIsInstanceUpgradeableMethod) + == null) { + NotebookServiceGrpc.getIsInstanceUpgradeableMethod = + getIsInstanceUpgradeableMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "IsInstanceUpgradeable")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("IsInstanceUpgradeable")) + .build(); + } + } + } + return getIsInstanceUpgradeableMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetInstanceHealthRequest, + com.google.cloud.notebooks.v1.GetInstanceHealthResponse> + getGetInstanceHealthMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstanceHealth", + requestType = com.google.cloud.notebooks.v1.GetInstanceHealthRequest.class, + responseType = com.google.cloud.notebooks.v1.GetInstanceHealthResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetInstanceHealthRequest, + com.google.cloud.notebooks.v1.GetInstanceHealthResponse> + getGetInstanceHealthMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetInstanceHealthRequest, + com.google.cloud.notebooks.v1.GetInstanceHealthResponse> + getGetInstanceHealthMethod; + if ((getGetInstanceHealthMethod = NotebookServiceGrpc.getGetInstanceHealthMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetInstanceHealthMethod = NotebookServiceGrpc.getGetInstanceHealthMethod) == null) { + NotebookServiceGrpc.getGetInstanceHealthMethod = + getGetInstanceHealthMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstanceHealth")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.GetInstanceHealthRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.GetInstanceHealthResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetInstanceHealth")) + .build(); + } + } + } + return getGetInstanceHealthMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpgradeInstanceRequest, com.google.longrunning.Operation> + getUpgradeInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpgradeInstance", + requestType = com.google.cloud.notebooks.v1.UpgradeInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpgradeInstanceRequest, com.google.longrunning.Operation> + getUpgradeInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpgradeInstanceRequest, com.google.longrunning.Operation> + getUpgradeInstanceMethod; + if ((getUpgradeInstanceMethod = NotebookServiceGrpc.getUpgradeInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getUpgradeInstanceMethod = NotebookServiceGrpc.getUpgradeInstanceMethod) == null) { + NotebookServiceGrpc.getUpgradeInstanceMethod = + getUpgradeInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpgradeInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.UpgradeInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("UpgradeInstance")) + .build(); + } + } + } + return getUpgradeInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.RollbackInstanceRequest, com.google.longrunning.Operation> + getRollbackInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RollbackInstance", + requestType = com.google.cloud.notebooks.v1.RollbackInstanceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.RollbackInstanceRequest, com.google.longrunning.Operation> + getRollbackInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.RollbackInstanceRequest, com.google.longrunning.Operation> + getRollbackInstanceMethod; + if ((getRollbackInstanceMethod = NotebookServiceGrpc.getRollbackInstanceMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getRollbackInstanceMethod = NotebookServiceGrpc.getRollbackInstanceMethod) == null) { + NotebookServiceGrpc.getRollbackInstanceMethod = + getRollbackInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RollbackInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.RollbackInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("RollbackInstance")) + .build(); + } + } + } + return getRollbackInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest, + com.google.longrunning.Operation> + getUpgradeInstanceInternalMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpgradeInstanceInternal", + requestType = com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest, + com.google.longrunning.Operation> + getUpgradeInstanceInternalMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest, + com.google.longrunning.Operation> + getUpgradeInstanceInternalMethod; + if ((getUpgradeInstanceInternalMethod = NotebookServiceGrpc.getUpgradeInstanceInternalMethod) + == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getUpgradeInstanceInternalMethod = + NotebookServiceGrpc.getUpgradeInstanceInternalMethod) + == null) { + NotebookServiceGrpc.getUpgradeInstanceInternalMethod = + getUpgradeInstanceInternalMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpgradeInstanceInternal")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("UpgradeInstanceInternal")) + .build(); + } + } + } + return getUpgradeInstanceInternalMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListEnvironmentsRequest, + com.google.cloud.notebooks.v1.ListEnvironmentsResponse> + getListEnvironmentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEnvironments", + requestType = com.google.cloud.notebooks.v1.ListEnvironmentsRequest.class, + responseType = com.google.cloud.notebooks.v1.ListEnvironmentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListEnvironmentsRequest, + com.google.cloud.notebooks.v1.ListEnvironmentsResponse> + getListEnvironmentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListEnvironmentsRequest, + com.google.cloud.notebooks.v1.ListEnvironmentsResponse> + getListEnvironmentsMethod; + if ((getListEnvironmentsMethod = NotebookServiceGrpc.getListEnvironmentsMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getListEnvironmentsMethod = NotebookServiceGrpc.getListEnvironmentsMethod) == null) { + NotebookServiceGrpc.getListEnvironmentsMethod = + getListEnvironmentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEnvironments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListEnvironmentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListEnvironmentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("ListEnvironments")) + .build(); + } + } + } + return getListEnvironmentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetEnvironmentRequest, + com.google.cloud.notebooks.v1.Environment> + getGetEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEnvironment", + requestType = com.google.cloud.notebooks.v1.GetEnvironmentRequest.class, + responseType = com.google.cloud.notebooks.v1.Environment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetEnvironmentRequest, + com.google.cloud.notebooks.v1.Environment> + getGetEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetEnvironmentRequest, + com.google.cloud.notebooks.v1.Environment> + getGetEnvironmentMethod; + if ((getGetEnvironmentMethod = NotebookServiceGrpc.getGetEnvironmentMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetEnvironmentMethod = NotebookServiceGrpc.getGetEnvironmentMethod) == null) { + NotebookServiceGrpc.getGetEnvironmentMethod = + getGetEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.GetEnvironmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.Environment.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetEnvironment")) + .build(); + } + } + } + return getGetEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateEnvironmentRequest, com.google.longrunning.Operation> + getCreateEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEnvironment", + requestType = com.google.cloud.notebooks.v1.CreateEnvironmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateEnvironmentRequest, com.google.longrunning.Operation> + getCreateEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateEnvironmentRequest, + com.google.longrunning.Operation> + getCreateEnvironmentMethod; + if ((getCreateEnvironmentMethod = NotebookServiceGrpc.getCreateEnvironmentMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getCreateEnvironmentMethod = NotebookServiceGrpc.getCreateEnvironmentMethod) == null) { + NotebookServiceGrpc.getCreateEnvironmentMethod = + getCreateEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.CreateEnvironmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("CreateEnvironment")) + .build(); + } + } + } + return getCreateEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest, com.google.longrunning.Operation> + getDeleteEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteEnvironment", + requestType = com.google.cloud.notebooks.v1.DeleteEnvironmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest, com.google.longrunning.Operation> + getDeleteEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest, + com.google.longrunning.Operation> + getDeleteEnvironmentMethod; + if ((getDeleteEnvironmentMethod = NotebookServiceGrpc.getDeleteEnvironmentMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getDeleteEnvironmentMethod = NotebookServiceGrpc.getDeleteEnvironmentMethod) == null) { + NotebookServiceGrpc.getDeleteEnvironmentMethod = + getDeleteEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("DeleteEnvironment")) + .build(); + } + } + } + return getDeleteEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListSchedulesRequest, + com.google.cloud.notebooks.v1.ListSchedulesResponse> + getListSchedulesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSchedules", + requestType = com.google.cloud.notebooks.v1.ListSchedulesRequest.class, + responseType = com.google.cloud.notebooks.v1.ListSchedulesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListSchedulesRequest, + com.google.cloud.notebooks.v1.ListSchedulesResponse> + getListSchedulesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListSchedulesRequest, + com.google.cloud.notebooks.v1.ListSchedulesResponse> + getListSchedulesMethod; + if ((getListSchedulesMethod = NotebookServiceGrpc.getListSchedulesMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getListSchedulesMethod = NotebookServiceGrpc.getListSchedulesMethod) == null) { + NotebookServiceGrpc.getListSchedulesMethod = + getListSchedulesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSchedules")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListSchedulesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListSchedulesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("ListSchedules")) + .build(); + } + } + } + return getListSchedulesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetScheduleRequest, com.google.cloud.notebooks.v1.Schedule> + getGetScheduleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSchedule", + requestType = com.google.cloud.notebooks.v1.GetScheduleRequest.class, + responseType = com.google.cloud.notebooks.v1.Schedule.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetScheduleRequest, com.google.cloud.notebooks.v1.Schedule> + getGetScheduleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetScheduleRequest, + com.google.cloud.notebooks.v1.Schedule> + getGetScheduleMethod; + if ((getGetScheduleMethod = NotebookServiceGrpc.getGetScheduleMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetScheduleMethod = NotebookServiceGrpc.getGetScheduleMethod) == null) { + NotebookServiceGrpc.getGetScheduleMethod = + getGetScheduleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSchedule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.GetScheduleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.Schedule.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetSchedule")) + .build(); + } + } + } + return getGetScheduleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteScheduleRequest, com.google.longrunning.Operation> + getDeleteScheduleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSchedule", + requestType = com.google.cloud.notebooks.v1.DeleteScheduleRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteScheduleRequest, com.google.longrunning.Operation> + getDeleteScheduleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteScheduleRequest, com.google.longrunning.Operation> + getDeleteScheduleMethod; + if ((getDeleteScheduleMethod = NotebookServiceGrpc.getDeleteScheduleMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getDeleteScheduleMethod = NotebookServiceGrpc.getDeleteScheduleMethod) == null) { + NotebookServiceGrpc.getDeleteScheduleMethod = + getDeleteScheduleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSchedule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.DeleteScheduleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("DeleteSchedule")) + .build(); + } + } + } + return getDeleteScheduleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateScheduleRequest, com.google.longrunning.Operation> + getCreateScheduleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSchedule", + requestType = com.google.cloud.notebooks.v1.CreateScheduleRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateScheduleRequest, com.google.longrunning.Operation> + getCreateScheduleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateScheduleRequest, com.google.longrunning.Operation> + getCreateScheduleMethod; + if ((getCreateScheduleMethod = NotebookServiceGrpc.getCreateScheduleMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getCreateScheduleMethod = NotebookServiceGrpc.getCreateScheduleMethod) == null) { + NotebookServiceGrpc.getCreateScheduleMethod = + getCreateScheduleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSchedule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.CreateScheduleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("CreateSchedule")) + .build(); + } + } + } + return getCreateScheduleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.TriggerScheduleRequest, com.google.longrunning.Operation> + getTriggerScheduleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TriggerSchedule", + requestType = com.google.cloud.notebooks.v1.TriggerScheduleRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.TriggerScheduleRequest, com.google.longrunning.Operation> + getTriggerScheduleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.TriggerScheduleRequest, com.google.longrunning.Operation> + getTriggerScheduleMethod; + if ((getTriggerScheduleMethod = NotebookServiceGrpc.getTriggerScheduleMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getTriggerScheduleMethod = NotebookServiceGrpc.getTriggerScheduleMethod) == null) { + NotebookServiceGrpc.getTriggerScheduleMethod = + getTriggerScheduleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TriggerSchedule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.TriggerScheduleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("TriggerSchedule")) + .build(); + } + } + } + return getTriggerScheduleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListExecutionsRequest, + com.google.cloud.notebooks.v1.ListExecutionsResponse> + getListExecutionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListExecutions", + requestType = com.google.cloud.notebooks.v1.ListExecutionsRequest.class, + responseType = com.google.cloud.notebooks.v1.ListExecutionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListExecutionsRequest, + com.google.cloud.notebooks.v1.ListExecutionsResponse> + getListExecutionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.ListExecutionsRequest, + com.google.cloud.notebooks.v1.ListExecutionsResponse> + getListExecutionsMethod; + if ((getListExecutionsMethod = NotebookServiceGrpc.getListExecutionsMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getListExecutionsMethod = NotebookServiceGrpc.getListExecutionsMethod) == null) { + NotebookServiceGrpc.getListExecutionsMethod = + getListExecutionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListExecutions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListExecutionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.ListExecutionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("ListExecutions")) + .build(); + } + } + } + return getListExecutionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetExecutionRequest, + com.google.cloud.notebooks.v1.Execution> + getGetExecutionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetExecution", + requestType = com.google.cloud.notebooks.v1.GetExecutionRequest.class, + responseType = com.google.cloud.notebooks.v1.Execution.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetExecutionRequest, + com.google.cloud.notebooks.v1.Execution> + getGetExecutionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.GetExecutionRequest, + com.google.cloud.notebooks.v1.Execution> + getGetExecutionMethod; + if ((getGetExecutionMethod = NotebookServiceGrpc.getGetExecutionMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getGetExecutionMethod = NotebookServiceGrpc.getGetExecutionMethod) == null) { + NotebookServiceGrpc.getGetExecutionMethod = + getGetExecutionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExecution")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.GetExecutionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.Execution.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("GetExecution")) + .build(); + } + } + } + return getGetExecutionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteExecutionRequest, com.google.longrunning.Operation> + getDeleteExecutionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteExecution", + requestType = com.google.cloud.notebooks.v1.DeleteExecutionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteExecutionRequest, com.google.longrunning.Operation> + getDeleteExecutionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.DeleteExecutionRequest, com.google.longrunning.Operation> + getDeleteExecutionMethod; + if ((getDeleteExecutionMethod = NotebookServiceGrpc.getDeleteExecutionMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getDeleteExecutionMethod = NotebookServiceGrpc.getDeleteExecutionMethod) == null) { + NotebookServiceGrpc.getDeleteExecutionMethod = + getDeleteExecutionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteExecution")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.DeleteExecutionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("DeleteExecution")) + .build(); + } + } + } + return getDeleteExecutionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateExecutionRequest, com.google.longrunning.Operation> + getCreateExecutionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateExecution", + requestType = com.google.cloud.notebooks.v1.CreateExecutionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateExecutionRequest, com.google.longrunning.Operation> + getCreateExecutionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.notebooks.v1.CreateExecutionRequest, com.google.longrunning.Operation> + getCreateExecutionMethod; + if ((getCreateExecutionMethod = NotebookServiceGrpc.getCreateExecutionMethod) == null) { + synchronized (NotebookServiceGrpc.class) { + if ((getCreateExecutionMethod = NotebookServiceGrpc.getCreateExecutionMethod) == null) { + NotebookServiceGrpc.getCreateExecutionMethod = + getCreateExecutionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateExecution")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.notebooks.v1.CreateExecutionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NotebookServiceMethodDescriptorSupplier("CreateExecution")) + .build(); + } + } + } + return getCreateExecutionMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static NotebookServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceStub(channel, callOptions); + } + }; + return NotebookServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static NotebookServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceBlockingStub(channel, callOptions); + } + }; + return NotebookServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static NotebookServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NotebookServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceFutureStub(channel, callOptions); + } + }; + return NotebookServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * API v1 service for Cloud AI Platform Notebooks.
+   * 
+ */ + public abstract static class NotebookServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists instances in a given project and location.
+     * 
+ */ + public void listInstances( + com.google.cloud.notebooks.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public void getInstance( + com.google.cloud.notebooks.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Instance in a given project and location.
+     * 
+ */ + public void createInstance( + com.google.cloud.notebooks.v1.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Registers an existing legacy notebook instance to the Notebooks API server.
+     * Legacy instances are instances created with the legacy Compute Engine
+     * calls. They are not manageable by the Notebooks API out of the box. This
+     * call makes these instances manageable by the Notebooks API.
+     * 
+ */ + public void registerInstance( + com.google.cloud.notebooks.v1.RegisterInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRegisterInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the guest accelerators of a single Instance.
+     * 
+ */ + public void setInstanceAccelerator( + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetInstanceAcceleratorMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the machine type of a single Instance.
+     * 
+ */ + public void setInstanceMachineType( + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetInstanceMachineTypeMethod(), responseObserver); + } + + /** + * + * + *
+     * Update Notebook Instance configurations.
+     * 
+ */ + public void updateInstanceConfig( + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateInstanceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the Shielded instance configuration of a single Instance.
+     * 
+ */ + public void updateShieldedInstanceConfig( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateShieldedInstanceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Replaces all the labels of an Instance.
+     * 
+ */ + public void setInstanceLabels( + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetInstanceLabelsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Instance.
+     * 
+ */ + public void deleteInstance( + com.google.cloud.notebooks.v1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Starts a notebook instance.
+     * 
+ */ + public void startInstance( + com.google.cloud.notebooks.v1.StartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStartInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops a notebook instance.
+     * 
+ */ + public void stopInstance( + com.google.cloud.notebooks.v1.StopInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStopInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Resets a notebook instance.
+     * 
+ */ + public void resetInstance( + com.google.cloud.notebooks.v1.ResetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResetInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Allows notebook instances to
+     * report their latest instance information to the Notebooks
+     * API server. The server will merge the reported information to
+     * the instance metadata store. Do not use this method directly.
+     * 
+ */ + public void reportInstanceInfo( + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReportInstanceInfoMethod(), responseObserver); + } + + /** + * + * + *
+     * Check if a notebook instance is upgradable.
+     * 
+ */ + public void isInstanceUpgradeable( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getIsInstanceUpgradeableMethod(), responseObserver); + } + + /** + * + * + *
+     * Check if a notebook instance is healthy.
+     * 
+ */ + public void getInstanceHealth( + com.google.cloud.notebooks.v1.GetInstanceHealthRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceHealthMethod(), responseObserver); + } + + /** + * + * + *
+     * Upgrades a notebook instance to the latest version.
+     * 
+ */ + public void upgradeInstance( + com.google.cloud.notebooks.v1.UpgradeInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpgradeInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Rollbacks a notebook instance to the previous version.
+     * 
+ */ + public void rollbackInstance( + com.google.cloud.notebooks.v1.RollbackInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRollbackInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Allows notebook instances to
+     * call this endpoint to upgrade themselves. Do not use this method directly.
+     * 
+ */ + public void upgradeInstanceInternal( + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpgradeInstanceInternalMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists environments in a project.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.notebooks.v1.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEnvironmentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Environment.
+     * 
+ */ + public void getEnvironment( + com.google.cloud.notebooks.v1.GetEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Environment.
+     * 
+ */ + public void createEnvironment( + com.google.cloud.notebooks.v1.CreateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Environment.
+     * 
+ */ + public void deleteEnvironment( + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists schedules in a given project and location.
+     * 
+ */ + public void listSchedules( + com.google.cloud.notebooks.v1.ListSchedulesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSchedulesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of schedule
+     * 
+ */ + public void getSchedule( + com.google.cloud.notebooks.v1.GetScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetScheduleMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes schedule and all underlying jobs
+     * 
+ */ + public void deleteSchedule( + com.google.cloud.notebooks.v1.DeleteScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteScheduleMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Scheduled Notebook in a given project and location.
+     * 
+ */ + public void createSchedule( + com.google.cloud.notebooks.v1.CreateScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateScheduleMethod(), responseObserver); + } + + /** + * + * + *
+     * Triggers execution of an existing schedule.
+     * 
+ */ + public void triggerSchedule( + com.google.cloud.notebooks.v1.TriggerScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getTriggerScheduleMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists executions in a given project and location
+     * 
+ */ + public void listExecutions( + com.google.cloud.notebooks.v1.ListExecutionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListExecutionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of executions
+     * 
+ */ + public void getExecution( + com.google.cloud.notebooks.v1.GetExecutionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetExecutionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes execution
+     * 
+ */ + public void deleteExecution( + com.google.cloud.notebooks.v1.DeleteExecutionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteExecutionMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Scheduled Notebook in a given project and location.
+     * 
+ */ + public void createExecution( + com.google.cloud.notebooks.v1.CreateExecutionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateExecutionMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ListInstancesRequest, + com.google.cloud.notebooks.v1.ListInstancesResponse>( + this, METHODID_LIST_INSTANCES))) + .addMethod( + getGetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.GetInstanceRequest, + com.google.cloud.notebooks.v1.Instance>(this, METHODID_GET_INSTANCE))) + .addMethod( + getCreateInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.CreateInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_INSTANCE))) + .addMethod( + getRegisterInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.RegisterInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_REGISTER_INSTANCE))) + .addMethod( + getSetInstanceAcceleratorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest, + com.google.longrunning.Operation>(this, METHODID_SET_INSTANCE_ACCELERATOR))) + .addMethod( + getSetInstanceMachineTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest, + com.google.longrunning.Operation>(this, METHODID_SET_INSTANCE_MACHINE_TYPE))) + .addMethod( + getUpdateInstanceConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_INSTANCE_CONFIG))) + .addMethod( + getUpdateShieldedInstanceConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest, + com.google.longrunning.Operation>( + this, METHODID_UPDATE_SHIELDED_INSTANCE_CONFIG))) + .addMethod( + getSetInstanceLabelsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest, + com.google.longrunning.Operation>(this, METHODID_SET_INSTANCE_LABELS))) + .addMethod( + getDeleteInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.DeleteInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_INSTANCE))) + .addMethod( + getStartInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.StartInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_START_INSTANCE))) + .addMethod( + getStopInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.StopInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_STOP_INSTANCE))) + .addMethod( + getResetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ResetInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_RESET_INSTANCE))) + .addMethod( + getReportInstanceInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest, + com.google.longrunning.Operation>(this, METHODID_REPORT_INSTANCE_INFO))) + .addMethod( + getIsInstanceUpgradeableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest, + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse>( + this, METHODID_IS_INSTANCE_UPGRADEABLE))) + .addMethod( + getGetInstanceHealthMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.GetInstanceHealthRequest, + com.google.cloud.notebooks.v1.GetInstanceHealthResponse>( + this, METHODID_GET_INSTANCE_HEALTH))) + .addMethod( + getUpgradeInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.UpgradeInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_UPGRADE_INSTANCE))) + .addMethod( + getRollbackInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.RollbackInstanceRequest, + com.google.longrunning.Operation>(this, METHODID_ROLLBACK_INSTANCE))) + .addMethod( + getUpgradeInstanceInternalMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest, + com.google.longrunning.Operation>(this, METHODID_UPGRADE_INSTANCE_INTERNAL))) + .addMethod( + getListEnvironmentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ListEnvironmentsRequest, + com.google.cloud.notebooks.v1.ListEnvironmentsResponse>( + this, METHODID_LIST_ENVIRONMENTS))) + .addMethod( + getGetEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.GetEnvironmentRequest, + com.google.cloud.notebooks.v1.Environment>(this, METHODID_GET_ENVIRONMENT))) + .addMethod( + getCreateEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.CreateEnvironmentRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_ENVIRONMENT))) + .addMethod( + getDeleteEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_ENVIRONMENT))) + .addMethod( + getListSchedulesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ListSchedulesRequest, + com.google.cloud.notebooks.v1.ListSchedulesResponse>( + this, METHODID_LIST_SCHEDULES))) + .addMethod( + getGetScheduleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.GetScheduleRequest, + com.google.cloud.notebooks.v1.Schedule>(this, METHODID_GET_SCHEDULE))) + .addMethod( + getDeleteScheduleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.DeleteScheduleRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_SCHEDULE))) + .addMethod( + getCreateScheduleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.CreateScheduleRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_SCHEDULE))) + .addMethod( + getTriggerScheduleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.TriggerScheduleRequest, + com.google.longrunning.Operation>(this, METHODID_TRIGGER_SCHEDULE))) + .addMethod( + getListExecutionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.ListExecutionsRequest, + com.google.cloud.notebooks.v1.ListExecutionsResponse>( + this, METHODID_LIST_EXECUTIONS))) + .addMethod( + getGetExecutionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.GetExecutionRequest, + com.google.cloud.notebooks.v1.Execution>(this, METHODID_GET_EXECUTION))) + .addMethod( + getDeleteExecutionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.DeleteExecutionRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_EXECUTION))) + .addMethod( + getCreateExecutionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.notebooks.v1.CreateExecutionRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_EXECUTION))) + .build(); + } + } + + /** + * + * + *
+   * API v1 service for Cloud AI Platform Notebooks.
+   * 
+ */ + public static final class NotebookServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private NotebookServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists instances in a given project and location.
+     * 
+ */ + public void listInstances( + com.google.cloud.notebooks.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public void getInstance( + com.google.cloud.notebooks.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Instance in a given project and location.
+     * 
+ */ + public void createInstance( + com.google.cloud.notebooks.v1.CreateInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Registers an existing legacy notebook instance to the Notebooks API server.
+     * Legacy instances are instances created with the legacy Compute Engine
+     * calls. They are not manageable by the Notebooks API out of the box. This
+     * call makes these instances manageable by the Notebooks API.
+     * 
+ */ + public void registerInstance( + com.google.cloud.notebooks.v1.RegisterInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRegisterInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the guest accelerators of a single Instance.
+     * 
+ */ + public void setInstanceAccelerator( + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetInstanceAcceleratorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the machine type of a single Instance.
+     * 
+ */ + public void setInstanceMachineType( + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetInstanceMachineTypeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update Notebook Instance configurations.
+     * 
+ */ + public void updateInstanceConfig( + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateInstanceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the Shielded instance configuration of a single Instance.
+     * 
+ */ + public void updateShieldedInstanceConfig( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateShieldedInstanceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Replaces all the labels of an Instance.
+     * 
+ */ + public void setInstanceLabels( + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetInstanceLabelsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Instance.
+     * 
+ */ + public void deleteInstance( + com.google.cloud.notebooks.v1.DeleteInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts a notebook instance.
+     * 
+ */ + public void startInstance( + com.google.cloud.notebooks.v1.StartInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStartInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops a notebook instance.
+     * 
+ */ + public void stopInstance( + com.google.cloud.notebooks.v1.StopInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Resets a notebook instance.
+     * 
+ */ + public void resetInstance( + com.google.cloud.notebooks.v1.ResetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResetInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Allows notebook instances to
+     * report their latest instance information to the Notebooks
+     * API server. The server will merge the reported information to
+     * the instance metadata store. Do not use this method directly.
+     * 
+ */ + public void reportInstanceInfo( + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReportInstanceInfoMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Check if a notebook instance is upgradable.
+     * 
+ */ + public void isInstanceUpgradeable( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getIsInstanceUpgradeableMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Check if a notebook instance is healthy.
+     * 
+ */ + public void getInstanceHealth( + com.google.cloud.notebooks.v1.GetInstanceHealthRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceHealthMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Upgrades a notebook instance to the latest version.
+     * 
+ */ + public void upgradeInstance( + com.google.cloud.notebooks.v1.UpgradeInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpgradeInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Rollbacks a notebook instance to the previous version.
+     * 
+ */ + public void rollbackInstance( + com.google.cloud.notebooks.v1.RollbackInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRollbackInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Allows notebook instances to
+     * call this endpoint to upgrade themselves. Do not use this method directly.
+     * 
+ */ + public void upgradeInstanceInternal( + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpgradeInstanceInternalMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists environments in a project.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.notebooks.v1.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Environment.
+     * 
+ */ + public void getEnvironment( + com.google.cloud.notebooks.v1.GetEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Environment.
+     * 
+ */ + public void createEnvironment( + com.google.cloud.notebooks.v1.CreateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Environment.
+     * 
+ */ + public void deleteEnvironment( + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists schedules in a given project and location.
+     * 
+ */ + public void listSchedules( + com.google.cloud.notebooks.v1.ListSchedulesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSchedulesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of schedule
+     * 
+ */ + public void getSchedule( + com.google.cloud.notebooks.v1.GetScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetScheduleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes schedule and all underlying jobs
+     * 
+ */ + public void deleteSchedule( + com.google.cloud.notebooks.v1.DeleteScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteScheduleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Scheduled Notebook in a given project and location.
+     * 
+ */ + public void createSchedule( + com.google.cloud.notebooks.v1.CreateScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateScheduleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Triggers execution of an existing schedule.
+     * 
+ */ + public void triggerSchedule( + com.google.cloud.notebooks.v1.TriggerScheduleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTriggerScheduleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists executions in a given project and location
+     * 
+ */ + public void listExecutions( + com.google.cloud.notebooks.v1.ListExecutionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListExecutionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of executions
+     * 
+ */ + public void getExecution( + com.google.cloud.notebooks.v1.GetExecutionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetExecutionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes execution
+     * 
+ */ + public void deleteExecution( + com.google.cloud.notebooks.v1.DeleteExecutionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteExecutionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Scheduled Notebook in a given project and location.
+     * 
+ */ + public void createExecution( + com.google.cloud.notebooks.v1.CreateExecutionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateExecutionMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * API v1 service for Cloud AI Platform Notebooks.
+   * 
+ */ + public static final class NotebookServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private NotebookServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists instances in a given project and location.
+     * 
+ */ + public com.google.cloud.notebooks.v1.ListInstancesResponse listInstances( + com.google.cloud.notebooks.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.cloud.notebooks.v1.Instance getInstance( + com.google.cloud.notebooks.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Instance in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createInstance( + com.google.cloud.notebooks.v1.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Registers an existing legacy notebook instance to the Notebooks API server.
+     * Legacy instances are instances created with the legacy Compute Engine
+     * calls. They are not manageable by the Notebooks API out of the box. This
+     * call makes these instances manageable by the Notebooks API.
+     * 
+ */ + public com.google.longrunning.Operation registerInstance( + com.google.cloud.notebooks.v1.RegisterInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRegisterInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the guest accelerators of a single Instance.
+     * 
+ */ + public com.google.longrunning.Operation setInstanceAccelerator( + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetInstanceAcceleratorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the machine type of a single Instance.
+     * 
+ */ + public com.google.longrunning.Operation setInstanceMachineType( + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetInstanceMachineTypeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update Notebook Instance configurations.
+     * 
+ */ + public com.google.longrunning.Operation updateInstanceConfig( + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateInstanceConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the Shielded instance configuration of a single Instance.
+     * 
+ */ + public com.google.longrunning.Operation updateShieldedInstanceConfig( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateShieldedInstanceConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Replaces all the labels of an Instance.
+     * 
+ */ + public com.google.longrunning.Operation setInstanceLabels( + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetInstanceLabelsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Instance.
+     * 
+ */ + public com.google.longrunning.Operation deleteInstance( + com.google.cloud.notebooks.v1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a notebook instance.
+     * 
+ */ + public com.google.longrunning.Operation startInstance( + com.google.cloud.notebooks.v1.StartInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStartInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops a notebook instance.
+     * 
+ */ + public com.google.longrunning.Operation stopInstance( + com.google.cloud.notebooks.v1.StopInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resets a notebook instance.
+     * 
+ */ + public com.google.longrunning.Operation resetInstance( + com.google.cloud.notebooks.v1.ResetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Allows notebook instances to
+     * report their latest instance information to the Notebooks
+     * API server. The server will merge the reported information to
+     * the instance metadata store. Do not use this method directly.
+     * 
+ */ + public com.google.longrunning.Operation reportInstanceInfo( + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReportInstanceInfoMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Check if a notebook instance is upgradable.
+     * 
+ */ + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse isInstanceUpgradeable( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getIsInstanceUpgradeableMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Check if a notebook instance is healthy.
+     * 
+ */ + public com.google.cloud.notebooks.v1.GetInstanceHealthResponse getInstanceHealth( + com.google.cloud.notebooks.v1.GetInstanceHealthRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceHealthMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Upgrades a notebook instance to the latest version.
+     * 
+ */ + public com.google.longrunning.Operation upgradeInstance( + com.google.cloud.notebooks.v1.UpgradeInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpgradeInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Rollbacks a notebook instance to the previous version.
+     * 
+ */ + public com.google.longrunning.Operation rollbackInstance( + com.google.cloud.notebooks.v1.RollbackInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRollbackInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Allows notebook instances to
+     * call this endpoint to upgrade themselves. Do not use this method directly.
+     * 
+ */ + public com.google.longrunning.Operation upgradeInstanceInternal( + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpgradeInstanceInternalMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists environments in a project.
+     * 
+ */ + public com.google.cloud.notebooks.v1.ListEnvironmentsResponse listEnvironments( + com.google.cloud.notebooks.v1.ListEnvironmentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEnvironmentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Environment.
+     * 
+ */ + public com.google.cloud.notebooks.v1.Environment getEnvironment( + com.google.cloud.notebooks.v1.GetEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Environment.
+     * 
+ */ + public com.google.longrunning.Operation createEnvironment( + com.google.cloud.notebooks.v1.CreateEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Environment.
+     * 
+ */ + public com.google.longrunning.Operation deleteEnvironment( + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists schedules in a given project and location.
+     * 
+ */ + public com.google.cloud.notebooks.v1.ListSchedulesResponse listSchedules( + com.google.cloud.notebooks.v1.ListSchedulesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSchedulesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of schedule
+     * 
+ */ + public com.google.cloud.notebooks.v1.Schedule getSchedule( + com.google.cloud.notebooks.v1.GetScheduleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetScheduleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes schedule and all underlying jobs
+     * 
+ */ + public com.google.longrunning.Operation deleteSchedule( + com.google.cloud.notebooks.v1.DeleteScheduleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteScheduleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Scheduled Notebook in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createSchedule( + com.google.cloud.notebooks.v1.CreateScheduleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateScheduleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Triggers execution of an existing schedule.
+     * 
+ */ + public com.google.longrunning.Operation triggerSchedule( + com.google.cloud.notebooks.v1.TriggerScheduleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTriggerScheduleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists executions in a given project and location
+     * 
+ */ + public com.google.cloud.notebooks.v1.ListExecutionsResponse listExecutions( + com.google.cloud.notebooks.v1.ListExecutionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListExecutionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of executions
+     * 
+ */ + public com.google.cloud.notebooks.v1.Execution getExecution( + com.google.cloud.notebooks.v1.GetExecutionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetExecutionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes execution
+     * 
+ */ + public com.google.longrunning.Operation deleteExecution( + com.google.cloud.notebooks.v1.DeleteExecutionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteExecutionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Scheduled Notebook in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createExecution( + com.google.cloud.notebooks.v1.CreateExecutionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateExecutionMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * API v1 service for Cloud AI Platform Notebooks.
+   * 
+ */ + public static final class NotebookServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private NotebookServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NotebookServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NotebookServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists instances in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.ListInstancesResponse> + listInstances(com.google.cloud.notebooks.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.Instance> + getInstance(com.google.cloud.notebooks.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Instance in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createInstance(com.google.cloud.notebooks.v1.CreateInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Registers an existing legacy notebook instance to the Notebooks API server.
+     * Legacy instances are instances created with the legacy Compute Engine
+     * calls. They are not manageable by the Notebooks API out of the box. This
+     * call makes these instances manageable by the Notebooks API.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + registerInstance(com.google.cloud.notebooks.v1.RegisterInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRegisterInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the guest accelerators of a single Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + setInstanceAccelerator( + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetInstanceAcceleratorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the machine type of a single Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + setInstanceMachineType( + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetInstanceMachineTypeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update Notebook Instance configurations.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateInstanceConfig(com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateInstanceConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the Shielded instance configuration of a single Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateShieldedInstanceConfig( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateShieldedInstanceConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Replaces all the labels of an Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + setInstanceLabels(com.google.cloud.notebooks.v1.SetInstanceLabelsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetInstanceLabelsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInstance(com.google.cloud.notebooks.v1.DeleteInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts a notebook instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + startInstance(com.google.cloud.notebooks.v1.StartInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStartInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops a notebook instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + stopInstance(com.google.cloud.notebooks.v1.StopInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Resets a notebook instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + resetInstance(com.google.cloud.notebooks.v1.ResetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResetInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Allows notebook instances to
+     * report their latest instance information to the Notebooks
+     * API server. The server will merge the reported information to
+     * the instance metadata store. Do not use this method directly.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + reportInstanceInfo(com.google.cloud.notebooks.v1.ReportInstanceInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReportInstanceInfoMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Check if a notebook instance is upgradable.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse> + isInstanceUpgradeable(com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getIsInstanceUpgradeableMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Check if a notebook instance is healthy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.GetInstanceHealthResponse> + getInstanceHealth(com.google.cloud.notebooks.v1.GetInstanceHealthRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceHealthMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Upgrades a notebook instance to the latest version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + upgradeInstance(com.google.cloud.notebooks.v1.UpgradeInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpgradeInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Rollbacks a notebook instance to the previous version.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + rollbackInstance(com.google.cloud.notebooks.v1.RollbackInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRollbackInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Allows notebook instances to
+     * call this endpoint to upgrade themselves. Do not use this method directly.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + upgradeInstanceInternal( + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpgradeInstanceInternalMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists environments in a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.ListEnvironmentsResponse> + listEnvironments(com.google.cloud.notebooks.v1.ListEnvironmentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.Environment> + getEnvironment(com.google.cloud.notebooks.v1.GetEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createEnvironment(com.google.cloud.notebooks.v1.CreateEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteEnvironment(com.google.cloud.notebooks.v1.DeleteEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists schedules in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.ListSchedulesResponse> + listSchedules(com.google.cloud.notebooks.v1.ListSchedulesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSchedulesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of schedule
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.Schedule> + getSchedule(com.google.cloud.notebooks.v1.GetScheduleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetScheduleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes schedule and all underlying jobs
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSchedule(com.google.cloud.notebooks.v1.DeleteScheduleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteScheduleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Scheduled Notebook in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createSchedule(com.google.cloud.notebooks.v1.CreateScheduleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateScheduleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Triggers execution of an existing schedule.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + triggerSchedule(com.google.cloud.notebooks.v1.TriggerScheduleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTriggerScheduleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists executions in a given project and location
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.ListExecutionsResponse> + listExecutions(com.google.cloud.notebooks.v1.ListExecutionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListExecutionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of executions
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.notebooks.v1.Execution> + getExecution(com.google.cloud.notebooks.v1.GetExecutionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetExecutionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes execution
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteExecution(com.google.cloud.notebooks.v1.DeleteExecutionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteExecutionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Scheduled Notebook in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createExecution(com.google.cloud.notebooks.v1.CreateExecutionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateExecutionMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_INSTANCES = 0; + private static final int METHODID_GET_INSTANCE = 1; + private static final int METHODID_CREATE_INSTANCE = 2; + private static final int METHODID_REGISTER_INSTANCE = 3; + private static final int METHODID_SET_INSTANCE_ACCELERATOR = 4; + private static final int METHODID_SET_INSTANCE_MACHINE_TYPE = 5; + private static final int METHODID_UPDATE_INSTANCE_CONFIG = 6; + private static final int METHODID_UPDATE_SHIELDED_INSTANCE_CONFIG = 7; + private static final int METHODID_SET_INSTANCE_LABELS = 8; + private static final int METHODID_DELETE_INSTANCE = 9; + private static final int METHODID_START_INSTANCE = 10; + private static final int METHODID_STOP_INSTANCE = 11; + private static final int METHODID_RESET_INSTANCE = 12; + private static final int METHODID_REPORT_INSTANCE_INFO = 13; + private static final int METHODID_IS_INSTANCE_UPGRADEABLE = 14; + private static final int METHODID_GET_INSTANCE_HEALTH = 15; + private static final int METHODID_UPGRADE_INSTANCE = 16; + private static final int METHODID_ROLLBACK_INSTANCE = 17; + private static final int METHODID_UPGRADE_INSTANCE_INTERNAL = 18; + private static final int METHODID_LIST_ENVIRONMENTS = 19; + private static final int METHODID_GET_ENVIRONMENT = 20; + private static final int METHODID_CREATE_ENVIRONMENT = 21; + private static final int METHODID_DELETE_ENVIRONMENT = 22; + private static final int METHODID_LIST_SCHEDULES = 23; + private static final int METHODID_GET_SCHEDULE = 24; + private static final int METHODID_DELETE_SCHEDULE = 25; + private static final int METHODID_CREATE_SCHEDULE = 26; + private static final int METHODID_TRIGGER_SCHEDULE = 27; + private static final int METHODID_LIST_EXECUTIONS = 28; + private static final int METHODID_GET_EXECUTION = 29; + private static final int METHODID_DELETE_EXECUTION = 30; + private static final int METHODID_CREATE_EXECUTION = 31; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final NotebookServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(NotebookServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_INSTANCES: + serviceImpl.listInstances( + (com.google.cloud.notebooks.v1.ListInstancesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_INSTANCE: + serviceImpl.getInstance( + (com.google.cloud.notebooks.v1.GetInstanceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_INSTANCE: + serviceImpl.createInstance( + (com.google.cloud.notebooks.v1.CreateInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REGISTER_INSTANCE: + serviceImpl.registerInstance( + (com.google.cloud.notebooks.v1.RegisterInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_INSTANCE_ACCELERATOR: + serviceImpl.setInstanceAccelerator( + (com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_INSTANCE_MACHINE_TYPE: + serviceImpl.setInstanceMachineType( + (com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_INSTANCE_CONFIG: + serviceImpl.updateInstanceConfig( + (com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SHIELDED_INSTANCE_CONFIG: + serviceImpl.updateShieldedInstanceConfig( + (com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_INSTANCE_LABELS: + serviceImpl.setInstanceLabels( + (com.google.cloud.notebooks.v1.SetInstanceLabelsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSTANCE: + serviceImpl.deleteInstance( + (com.google.cloud.notebooks.v1.DeleteInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_INSTANCE: + serviceImpl.startInstance( + (com.google.cloud.notebooks.v1.StartInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_STOP_INSTANCE: + serviceImpl.stopInstance( + (com.google.cloud.notebooks.v1.StopInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESET_INSTANCE: + serviceImpl.resetInstance( + (com.google.cloud.notebooks.v1.ResetInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REPORT_INSTANCE_INFO: + serviceImpl.reportInstanceInfo( + (com.google.cloud.notebooks.v1.ReportInstanceInfoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IS_INSTANCE_UPGRADEABLE: + serviceImpl.isInstanceUpgradeable( + (com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse>) + responseObserver); + break; + case METHODID_GET_INSTANCE_HEALTH: + serviceImpl.getInstanceHealth( + (com.google.cloud.notebooks.v1.GetInstanceHealthRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPGRADE_INSTANCE: + serviceImpl.upgradeInstance( + (com.google.cloud.notebooks.v1.UpgradeInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ROLLBACK_INSTANCE: + serviceImpl.rollbackInstance( + (com.google.cloud.notebooks.v1.RollbackInstanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPGRADE_INSTANCE_INTERNAL: + serviceImpl.upgradeInstanceInternal( + (com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ENVIRONMENTS: + serviceImpl.listEnvironments( + (com.google.cloud.notebooks.v1.ListEnvironmentsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ENVIRONMENT: + serviceImpl.getEnvironment( + (com.google.cloud.notebooks.v1.GetEnvironmentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ENVIRONMENT: + serviceImpl.createEnvironment( + (com.google.cloud.notebooks.v1.CreateEnvironmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ENVIRONMENT: + serviceImpl.deleteEnvironment( + (com.google.cloud.notebooks.v1.DeleteEnvironmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SCHEDULES: + serviceImpl.listSchedules( + (com.google.cloud.notebooks.v1.ListSchedulesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SCHEDULE: + serviceImpl.getSchedule( + (com.google.cloud.notebooks.v1.GetScheduleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_SCHEDULE: + serviceImpl.deleteSchedule( + (com.google.cloud.notebooks.v1.DeleteScheduleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SCHEDULE: + serviceImpl.createSchedule( + (com.google.cloud.notebooks.v1.CreateScheduleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TRIGGER_SCHEDULE: + serviceImpl.triggerSchedule( + (com.google.cloud.notebooks.v1.TriggerScheduleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_EXECUTIONS: + serviceImpl.listExecutions( + (com.google.cloud.notebooks.v1.ListExecutionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_EXECUTION: + serviceImpl.getExecution( + (com.google.cloud.notebooks.v1.GetExecutionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_EXECUTION: + serviceImpl.deleteExecution( + (com.google.cloud.notebooks.v1.DeleteExecutionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_EXECUTION: + serviceImpl.createExecution( + (com.google.cloud.notebooks.v1.CreateExecutionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class NotebookServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + NotebookServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("NotebookService"); + } + } + + private static final class NotebookServiceFileDescriptorSupplier + extends NotebookServiceBaseDescriptorSupplier { + NotebookServiceFileDescriptorSupplier() {} + } + + private static final class NotebookServiceMethodDescriptorSupplier + extends NotebookServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + NotebookServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (NotebookServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new NotebookServiceFileDescriptorSupplier()) + .addMethod(getListInstancesMethod()) + .addMethod(getGetInstanceMethod()) + .addMethod(getCreateInstanceMethod()) + .addMethod(getRegisterInstanceMethod()) + .addMethod(getSetInstanceAcceleratorMethod()) + .addMethod(getSetInstanceMachineTypeMethod()) + .addMethod(getUpdateInstanceConfigMethod()) + .addMethod(getUpdateShieldedInstanceConfigMethod()) + .addMethod(getSetInstanceLabelsMethod()) + .addMethod(getDeleteInstanceMethod()) + .addMethod(getStartInstanceMethod()) + .addMethod(getStopInstanceMethod()) + .addMethod(getResetInstanceMethod()) + .addMethod(getReportInstanceInfoMethod()) + .addMethod(getIsInstanceUpgradeableMethod()) + .addMethod(getGetInstanceHealthMethod()) + .addMethod(getUpgradeInstanceMethod()) + .addMethod(getRollbackInstanceMethod()) + .addMethod(getUpgradeInstanceInternalMethod()) + .addMethod(getListEnvironmentsMethod()) + .addMethod(getGetEnvironmentMethod()) + .addMethod(getCreateEnvironmentMethod()) + .addMethod(getDeleteEnvironmentMethod()) + .addMethod(getListSchedulesMethod()) + .addMethod(getGetScheduleMethod()) + .addMethod(getDeleteScheduleMethod()) + .addMethod(getCreateScheduleMethod()) + .addMethod(getTriggerScheduleMethod()) + .addMethod(getListExecutionsMethod()) + .addMethod(getGetExecutionMethod()) + .addMethod(getDeleteExecutionMethod()) + .addMethod(getCreateExecutionMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/pom.xml b/pom.xml index 1c79f8b5..644afa1e 100644 --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,16 @@ google-cloud-notebooks 0.5.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-notebooks-v1 + 0.5.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-notebooks-v1 + 0.5.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-notebooks-v1beta1 @@ -111,7 +121,9 @@ google-cloud-notebooks grpc-google-cloud-notebooks-v1beta1 + grpc-google-cloud-notebooks-v1 proto-google-cloud-notebooks-v1beta1 + proto-google-cloud-notebooks-v1 google-cloud-notebooks-bom diff --git a/proto-google-cloud-notebooks-v1/clirr-ignored-differences.xml b/proto-google-cloud-notebooks-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..45196096 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/clirr-ignored-differences.xml @@ -0,0 +1,33 @@ + + + + + 7012 + com/google/cloud/location/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/location/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/location/*OrBuilder + boolean has*(*) + + 7012 + com/google/cloud/notebooks/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/notebooks/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/notebooks/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-notebooks-v1/pom.xml b/proto-google-cloud-notebooks-v1/pom.xml new file mode 100644 index 00000000..ba2ed47e --- /dev/null +++ b/proto-google-cloud-notebooks-v1/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-notebooks-v1 + 0.5.1-SNAPSHOT + proto-google-cloud-notebooks-v1 + Proto library for google-cloud-notebooks + + com.google.cloud + google-cloud-notebooks-parent + 0.5.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/GetLocationRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/GetLocationRequest.java new file mode 100644 index 00000000..6b7c7e0a --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/GetLocationRequest.java @@ -0,0 +1,634 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +/** + * + * + *
+ * The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
+ * 
+ * + * Protobuf type {@code google.cloud.location.GetLocationRequest} + */ +public final class GetLocationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.location.GetLocationRequest) + GetLocationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetLocationRequest.newBuilder() to construct. + private GetLocationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetLocationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetLocationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetLocationRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_GetLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.location.GetLocationRequest.class, + com.google.cloud.location.GetLocationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name for the location.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name for the location.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.location.GetLocationRequest)) { + return super.equals(obj); + } + com.google.cloud.location.GetLocationRequest other = + (com.google.cloud.location.GetLocationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.location.GetLocationRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.location.GetLocationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.location.GetLocationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.location.GetLocationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.location.GetLocationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
+   * 
+ * + * Protobuf type {@code google.cloud.location.GetLocationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.location.GetLocationRequest) + com.google.cloud.location.GetLocationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_GetLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.location.GetLocationRequest.class, + com.google.cloud.location.GetLocationRequest.Builder.class); + } + + // Construct using com.google.cloud.location.GetLocationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_GetLocationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.location.GetLocationRequest getDefaultInstanceForType() { + return com.google.cloud.location.GetLocationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.location.GetLocationRequest build() { + com.google.cloud.location.GetLocationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.location.GetLocationRequest buildPartial() { + com.google.cloud.location.GetLocationRequest result = + new com.google.cloud.location.GetLocationRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.location.GetLocationRequest) { + return mergeFrom((com.google.cloud.location.GetLocationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.location.GetLocationRequest other) { + if (other == com.google.cloud.location.GetLocationRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.location.GetLocationRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.location.GetLocationRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name for the location.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name for the location.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name for the location.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for the location.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for the location.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.location.GetLocationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.location.GetLocationRequest) + private static final com.google.cloud.location.GetLocationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.location.GetLocationRequest(); + } + + public static com.google.cloud.location.GetLocationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLocationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetLocationRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.location.GetLocationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java new file mode 100644 index 00000000..a8f3d0f9 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/GetLocationRequestOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +public interface GetLocationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.location.GetLocationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name for the location.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name for the location.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsRequest.java new file mode 100644 index 00000000..e1b3af7f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsRequest.java @@ -0,0 +1,1082 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +/** + * + * + *
+ * The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+ * 
+ * + * Protobuf type {@code google.cloud.location.ListLocationsRequest} + */ +public final class ListLocationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.location.ListLocationsRequest) + ListLocationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListLocationsRequest.newBuilder() to construct. + private ListLocationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListLocationsRequest() { + name_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListLocationsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListLocationsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.location.ListLocationsRequest.class, + com.google.cloud.location.ListLocationsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource that owns the locations collection, if applicable.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource that owns the locations collection, if applicable.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.location.ListLocationsRequest)) { + return super.equals(obj); + } + com.google.cloud.location.ListLocationsRequest other = + (com.google.cloud.location.ListLocationsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.location.ListLocationsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.location.ListLocationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.location.ListLocationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+   * 
+ * + * Protobuf type {@code google.cloud.location.ListLocationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.location.ListLocationsRequest) + com.google.cloud.location.ListLocationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.location.ListLocationsRequest.class, + com.google.cloud.location.ListLocationsRequest.Builder.class); + } + + // Construct using com.google.cloud.location.ListLocationsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.location.ListLocationsRequest getDefaultInstanceForType() { + return com.google.cloud.location.ListLocationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.location.ListLocationsRequest build() { + com.google.cloud.location.ListLocationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.location.ListLocationsRequest buildPartial() { + com.google.cloud.location.ListLocationsRequest result = + new com.google.cloud.location.ListLocationsRequest(this); + result.name_ = name_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.location.ListLocationsRequest) { + return mergeFrom((com.google.cloud.location.ListLocationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.location.ListLocationsRequest other) { + if (other == com.google.cloud.location.ListLocationsRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.location.ListLocationsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.location.ListLocationsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource that owns the locations collection, if applicable.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource that owns the locations collection, if applicable.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource that owns the locations collection, if applicable.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource that owns the locations collection, if applicable.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource that owns the locations collection, if applicable.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * 
+ * + * string filter = 2; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.location.ListLocationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.location.ListLocationsRequest) + private static final com.google.cloud.location.ListLocationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.location.ListLocationsRequest(); + } + + public static com.google.cloud.location.ListLocationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLocationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListLocationsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.location.ListLocationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java new file mode 100644 index 00000000..3a3f39a7 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +public interface ListLocationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.location.ListLocationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource that owns the locations collection, if applicable.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource that owns the locations collection, if applicable.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsResponse.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsResponse.java new file mode 100644 index 00000000..8e7553c0 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsResponse.java @@ -0,0 +1,1126 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +/** + * + * + *
+ * The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+ * 
+ * + * Protobuf type {@code google.cloud.location.ListLocationsResponse} + */ +public final class ListLocationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.location.ListLocationsResponse) + ListLocationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListLocationsResponse.newBuilder() to construct. + private ListLocationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListLocationsResponse() { + locations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListLocationsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListLocationsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + locations_.add( + input.readMessage( + com.google.cloud.location.Location.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.location.ListLocationsResponse.class, + com.google.cloud.location.ListLocationsResponse.Builder.class); + } + + public static final int LOCATIONS_FIELD_NUMBER = 1; + private java.util.List locations_; + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + @java.lang.Override + public java.util.List getLocationsList() { + return locations_; + } + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + @java.lang.Override + public java.util.List + getLocationsOrBuilderList() { + return locations_; + } + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + @java.lang.Override + public int getLocationsCount() { + return locations_.size(); + } + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + @java.lang.Override + public com.google.cloud.location.Location getLocations(int index) { + return locations_.get(index); + } + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + @java.lang.Override + public com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index) { + return locations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < locations_.size(); i++) { + output.writeMessage(1, locations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < locations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, locations_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.location.ListLocationsResponse)) { + return super.equals(obj); + } + com.google.cloud.location.ListLocationsResponse other = + (com.google.cloud.location.ListLocationsResponse) obj; + + if (!getLocationsList().equals(other.getLocationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.location.ListLocationsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.location.ListLocationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.location.ListLocationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
+   * 
+ * + * Protobuf type {@code google.cloud.location.ListLocationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.location.ListLocationsResponse) + com.google.cloud.location.ListLocationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.location.ListLocationsResponse.class, + com.google.cloud.location.ListLocationsResponse.Builder.class); + } + + // Construct using com.google.cloud.location.ListLocationsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLocationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + locationsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_ListLocationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.location.ListLocationsResponse getDefaultInstanceForType() { + return com.google.cloud.location.ListLocationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.location.ListLocationsResponse build() { + com.google.cloud.location.ListLocationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.location.ListLocationsResponse buildPartial() { + com.google.cloud.location.ListLocationsResponse result = + new com.google.cloud.location.ListLocationsResponse(this); + int from_bitField0_ = bitField0_; + if (locationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.locations_ = locations_; + } else { + result.locations_ = locationsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.location.ListLocationsResponse) { + return mergeFrom((com.google.cloud.location.ListLocationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.location.ListLocationsResponse other) { + if (other == com.google.cloud.location.ListLocationsResponse.getDefaultInstance()) + return this; + if (locationsBuilder_ == null) { + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } + } else { + if (!other.locations_.isEmpty()) { + if (locationsBuilder_.isEmpty()) { + locationsBuilder_.dispose(); + locationsBuilder_ = null; + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000001); + locationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLocationsFieldBuilder() + : null; + } else { + locationsBuilder_.addAllMessages(other.locations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.location.ListLocationsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.location.ListLocationsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List locations_ = + java.util.Collections.emptyList(); + + private void ensureLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + locations_ = new java.util.ArrayList(locations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.location.Location, + com.google.cloud.location.Location.Builder, + com.google.cloud.location.LocationOrBuilder> + locationsBuilder_; + + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public java.util.List getLocationsList() { + if (locationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(locations_); + } else { + return locationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public int getLocationsCount() { + if (locationsBuilder_ == null) { + return locations_.size(); + } else { + return locationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public com.google.cloud.location.Location getLocations(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder setLocations(int index, com.google.cloud.location.Location value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + onChanged(); + } else { + locationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder setLocations( + int index, com.google.cloud.location.Location.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.set(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder addLocations(com.google.cloud.location.Location value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + onChanged(); + } else { + locationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder addLocations(int index, com.google.cloud.location.Location value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(index, value); + onChanged(); + } else { + locationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder addLocations(com.google.cloud.location.Location.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder addLocations( + int index, com.google.cloud.location.Location.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(index, builderForValue.build()); + onChanged(); + } else { + locationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder addAllLocations( + java.lang.Iterable values) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); + onChanged(); + } else { + locationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder clearLocations() { + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + locationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public Builder removeLocations(int index) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.remove(index); + onChanged(); + } else { + locationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public com.google.cloud.location.Location.Builder getLocationsBuilder(int index) { + return getLocationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public java.util.List + getLocationsOrBuilderList() { + if (locationsBuilder_ != null) { + return locationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(locations_); + } + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public com.google.cloud.location.Location.Builder addLocationsBuilder() { + return getLocationsFieldBuilder() + .addBuilder(com.google.cloud.location.Location.getDefaultInstance()); + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public com.google.cloud.location.Location.Builder addLocationsBuilder(int index) { + return getLocationsFieldBuilder() + .addBuilder(index, com.google.cloud.location.Location.getDefaultInstance()); + } + /** + * + * + *
+     * A list of locations that matches the specified filter in the request.
+     * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + public java.util.List getLocationsBuilderList() { + return getLocationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.location.Location, + com.google.cloud.location.Location.Builder, + com.google.cloud.location.LocationOrBuilder> + getLocationsFieldBuilder() { + if (locationsBuilder_ == null) { + locationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.location.Location, + com.google.cloud.location.Location.Builder, + com.google.cloud.location.LocationOrBuilder>( + locations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + locations_ = null; + } + return locationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.location.ListLocationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.location.ListLocationsResponse) + private static final com.google.cloud.location.ListLocationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.location.ListLocationsResponse(); + } + + public static com.google.cloud.location.ListLocationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLocationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListLocationsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.location.ListLocationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java new file mode 100644 index 00000000..704771cc --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/ListLocationsResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +public interface ListLocationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.location.ListLocationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + java.util.List getLocationsList(); + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + com.google.cloud.location.Location getLocations(int index); + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + int getLocationsCount(); + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + java.util.List getLocationsOrBuilderList(); + /** + * + * + *
+   * A list of locations that matches the specified filter in the request.
+   * 
+ * + * repeated .google.cloud.location.Location locations = 1; + */ + com.google.cloud.location.LocationOrBuilder getLocationsOrBuilder(int index); + + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/Location.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/Location.java new file mode 100644 index 00000000..7b7bfc86 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/Location.java @@ -0,0 +1,1615 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +/** + * + * + *
+ * A resource that represents Google Cloud Platform location.
+ * 
+ * + * Protobuf type {@code google.cloud.location.Location} + */ +public final class Location extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.location.Location) + LocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Location() { + name_ = ""; + locationId_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Location(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Location( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 26: + { + com.google.protobuf.Any.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_Location_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.location.Location.class, + com.google.cloud.location.Location.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name for the location, which may vary between implementations.
+   * For example: `"projects/example-project/locations/us-east1"`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name for the location, which may vary between implementations.
+   * For example: `"projects/example-project/locations/us-east1"`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object locationId_; + /** + * + * + *
+   * The canonical id for this location. For example: `"us-east1"`.
+   * 
+ * + * string location_id = 4; + * + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + * + * + *
+   * The canonical id for this location. For example: `"us-east1"`.
+   * 
+ * + * string location_id = 4; + * + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The friendly name for this location, typically a nearby city name.
+   * For example, "Tokyo".
+   * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The friendly name for this location, typically a nearby city name.
+   * For example, "Tokyo".
+   * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 2; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_Location_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int METADATA_FIELD_NUMBER = 3; + private com.google.protobuf.Any metadata_; + /** + * + * + *
+   * Service-specific metadata. For example the available capacity at the given
+   * location.
+   * 
+ * + * .google.protobuf.Any metadata = 3; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Service-specific metadata. For example the available capacity at the given
+   * location.
+   * 
+ * + * .google.protobuf.Any metadata = 3; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.protobuf.Any getMetadata() { + return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; + } + /** + * + * + *
+   * Service-specific metadata. For example the available capacity at the given
+   * location.
+   * 
+ * + * .google.protobuf.Any metadata = 3; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); + if (metadata_ != null) { + output.writeMessage(3, getMetadata()); + } + if (!getLocationIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels__); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); + } + if (!getLocationIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.location.Location)) { + return super.equals(obj); + } + com.google.cloud.location.Location other = (com.google.cloud.location.Location) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLocationId().equals(other.getLocationId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.location.Location parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.Location parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.Location parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.Location parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.Location parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.location.Location parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.location.Location parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.location.Location parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.location.Location parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.location.Location parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.location.Location parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.location.Location parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.location.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A resource that represents Google Cloud Platform location.
+   * 
+ * + * Protobuf type {@code google.cloud.location.Location} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.location.Location) + com.google.cloud.location.LocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_Location_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.location.Location.class, + com.google.cloud.location.Location.Builder.class); + } + + // Construct using com.google.cloud.location.Location.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + locationId_ = ""; + + displayName_ = ""; + + internalGetMutableLabels().clear(); + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.location.LocationsProto + .internal_static_google_cloud_location_Location_descriptor; + } + + @java.lang.Override + public com.google.cloud.location.Location getDefaultInstanceForType() { + return com.google.cloud.location.Location.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.location.Location build() { + com.google.cloud.location.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.location.Location buildPartial() { + com.google.cloud.location.Location result = new com.google.cloud.location.Location(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.locationId_ = locationId_; + result.displayName_ = displayName_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.location.Location) { + return mergeFrom((com.google.cloud.location.Location) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.location.Location other) { + if (other == com.google.cloud.location.Location.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.location.Location parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.location.Location) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name for the location, which may vary between implementations.
+     * For example: `"projects/example-project/locations/us-east1"`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name for the location, which may vary between implementations.
+     * For example: `"projects/example-project/locations/us-east1"`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name for the location, which may vary between implementations.
+     * For example: `"projects/example-project/locations/us-east1"`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for the location, which may vary between implementations.
+     * For example: `"projects/example-project/locations/us-east1"`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for the location, which may vary between implementations.
+     * For example: `"projects/example-project/locations/us-east1"`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + * + * + *
+     * The canonical id for this location. For example: `"us-east1"`.
+     * 
+ * + * string location_id = 4; + * + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The canonical id for this location. For example: `"us-east1"`.
+     * 
+ * + * string location_id = 4; + * + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The canonical id for this location. For example: `"us-east1"`.
+     * 
+ * + * string location_id = 4; + * + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The canonical id for this location. For example: `"us-east1"`.
+     * 
+ * + * string location_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The canonical id for this location. For example: `"us-east1"`.
+     * 
+ * + * string location_id = 4; + * + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The friendly name for this location, typically a nearby city name.
+     * For example, "Tokyo".
+     * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The friendly name for this location, typically a nearby city name.
+     * For example, "Tokyo".
+     * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The friendly name for this location, typically a nearby city name.
+     * For example, "Tokyo".
+     * 
+ * + * string display_name = 5; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The friendly name for this location, typically a nearby city name.
+     * For example, "Tokyo".
+     * 
+ * + * string display_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The friendly name for this location, typically a nearby city name.
+     * For example, "Tokyo".
+     * 
+ * + * string display_name = 5; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Cross-service attributes for the location. For example
+     *     {"cloud.googleapis.com/region": "us-east1"}
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Cross-service attributes for the location. For example
+     *     {"cloud.googleapis.com/region": "us-east1"}
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Cross-service attributes for the location. For example
+     *     {"cloud.googleapis.com/region": "us-east1"}
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Cross-service attributes for the location. For example
+     *     {"cloud.googleapis.com/region": "us-east1"}
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Cross-service attributes for the location. For example
+     *     {"cloud.googleapis.com/region": "us-east1"}
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Cross-service attributes for the location. For example
+     *     {"cloud.googleapis.com/region": "us-east1"}
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Cross-service attributes for the location. For example
+     *     {"cloud.googleapis.com/region": "us-east1"}
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Any metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + * + * @return The metadata. + */ + public com.google.protobuf.Any getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + */ + public Builder setMetadata(com.google.protobuf.Any value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + */ + public Builder setMetadata(com.google.protobuf.Any.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + */ + public Builder mergeMetadata(com.google.protobuf.Any value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = com.google.protobuf.Any.newBuilder(metadata_).mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + */ + public com.google.protobuf.Any.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + */ + public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; + } + } + /** + * + * + *
+     * Service-specific metadata. For example the available capacity at the given
+     * location.
+     * 
+ * + * .google.protobuf.Any metadata = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder>(getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.location.Location) + } + + // @@protoc_insertion_point(class_scope:google.cloud.location.Location) + private static final com.google.cloud.location.Location DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.location.Location(); + } + + public static com.google.cloud.location.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Location(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.location.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationOrBuilder.java new file mode 100644 index 00000000..98ab25de --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationOrBuilder.java @@ -0,0 +1,201 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +public interface LocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.location.Location) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name for the location, which may vary between implementations.
+   * For example: `"projects/example-project/locations/us-east1"`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name for the location, which may vary between implementations.
+   * For example: `"projects/example-project/locations/us-east1"`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The canonical id for this location. For example: `"us-east1"`.
+   * 
+ * + * string location_id = 4; + * + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + * + * + *
+   * The canonical id for this location. For example: `"us-east1"`.
+   * 
+ * + * string location_id = 4; + * + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString getLocationIdBytes(); + + /** + * + * + *
+   * The friendly name for this location, typically a nearby city name.
+   * For example, "Tokyo".
+   * 
+ * + * string display_name = 5; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The friendly name for this location, typically a nearby city name.
+   * For example, "Tokyo".
+   * 
+ * + * string display_name = 5; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Cross-service attributes for the location. For example
+   *     {"cloud.googleapis.com/region": "us-east1"}
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Service-specific metadata. For example the available capacity at the given
+   * location.
+   * 
+ * + * .google.protobuf.Any metadata = 3; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Service-specific metadata. For example the available capacity at the given
+   * location.
+   * 
+ * + * .google.protobuf.Any metadata = 3; + * + * @return The metadata. + */ + com.google.protobuf.Any getMetadata(); + /** + * + * + *
+   * Service-specific metadata. For example the available capacity at the given
+   * location.
+   * 
+ * + * .google.protobuf.Any metadata = 3; + */ + com.google.protobuf.AnyOrBuilder getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationsProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationsProto.java new file mode 100644 index 00000000..d2b6da30 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/location/LocationsProto.java @@ -0,0 +1,150 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/location/locations.proto + +package com.google.cloud.location; + +public final class LocationsProto { + private LocationsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_location_ListLocationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_location_ListLocationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_location_GetLocationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_location_Location_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_location_Location_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_location_Location_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_location_Location_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n%google/cloud/location/locations.proto\022" + + "\025google.cloud.location\032\034google/api/annot" + + "ations.proto\032\031google/protobuf/any.proto\032" + + "\027google/api/client.proto\"[\n\024ListLocation" + + "sRequest\022\014\n\004name\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021" + + "\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"d\n" + + "\025ListLocationsResponse\0222\n\tlocations\030\001 \003(" + + "\0132\037.google.cloud.location.Location\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\"\"\n\022GetLocationReques" + + "t\022\014\n\004name\030\001 \001(\t\"\327\001\n\010Location\022\014\n\004name\030\001 \001" + + "(\t\022\023\n\013location_id\030\004 \001(\t\022\024\n\014display_name\030" + + "\005 \001(\t\022;\n\006labels\030\002 \003(\0132+.google.cloud.loc" + + "ation.Location.LabelsEntry\022&\n\010metadata\030\003" + + " \001(\0132\024.google.protobuf.Any\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\0012\244\003\n\tLo" + + "cations\022\253\001\n\rListLocations\022+.google.cloud" + + ".location.ListLocationsRequest\032,.google." + + "cloud.location.ListLocationsResponse\"?\202\323" + + "\344\223\0029\022\024/v1/{name=locations}Z!\022\037/v1/{name=" + + "projects/*}/locations\022\236\001\n\013GetLocation\022)." + + "google.cloud.location.GetLocationRequest" + + "\032\037.google.cloud.location.Location\"C\202\323\344\223\002" + + "=\022\026/v1/{name=locations/*}Z#\022!/v1/{name=p" + + "rojects/*/locations/*}\032H\312A\024cloud.googlea" + + "pis.com\322A.https://www.googleapis.com/aut" + + "h/cloud-platformBo\n\031com.google.cloud.loc" + + "ationB\016LocationsProtoP\001Z=google.golang.o" + + "rg/genproto/googleapis/cloud/location;lo" + + "cation\370\001\001b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + }); + internal_static_google_cloud_location_ListLocationsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_location_ListLocationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_location_ListLocationsRequest_descriptor, + new java.lang.String[] { + "Name", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_location_ListLocationsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_location_ListLocationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_location_ListLocationsResponse_descriptor, + new java.lang.String[] { + "Locations", "NextPageToken", + }); + internal_static_google_cloud_location_GetLocationRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_location_GetLocationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_location_GetLocationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_location_Location_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_location_Location_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_location_Location_descriptor, + new java.lang.String[] { + "Name", "LocationId", "DisplayName", "Labels", "Metadata", + }); + internal_static_google_cloud_location_Location_LabelsEntry_descriptor = + internal_static_google_cloud_location_Location_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_location_Location_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_location_Location_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ContainerImage.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ContainerImage.java new file mode 100644 index 00000000..69434695 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ContainerImage.java @@ -0,0 +1,829 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/environment.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Definition of a container image for starting a notebook instance with the
+ * environment installed in a container.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ContainerImage} + */ +public final class ContainerImage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ContainerImage) + ContainerImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContainerImage.newBuilder() to construct. + private ContainerImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContainerImage() { + repository_ = ""; + tag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContainerImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContainerImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + repository_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + tag_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_ContainerImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_ContainerImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ContainerImage.class, + com.google.cloud.notebooks.v1.ContainerImage.Builder.class); + } + + public static final int REPOSITORY_FIELD_NUMBER = 1; + private volatile java.lang.Object repository_; + /** + * + * + *
+   * Required. The path to the container image repository. For example:
+   * `gcr.io/{project_id}/{image_name}`
+   * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The repository. + */ + @java.lang.Override + public java.lang.String getRepository() { + java.lang.Object ref = repository_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repository_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The path to the container image repository. For example:
+   * `gcr.io/{project_id}/{image_name}`
+   * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for repository. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = repository_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object tag_; + /** + * + * + *
+   * The tag of the container image. If not specified, this defaults
+   * to the latest tag.
+   * 
+ * + * string tag = 2; + * + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } + } + /** + * + * + *
+   * The tag of the container image. If not specified, this defaults
+   * to the latest tag.
+   * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getRepositoryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, repository_); + } + if (!getTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getRepositoryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, repository_); + } + if (!getTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ContainerImage)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ContainerImage other = + (com.google.cloud.notebooks.v1.ContainerImage) obj; + + if (!getRepository().equals(other.getRepository())) return false; + if (!getTag().equals(other.getTag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getRepository().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ContainerImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ContainerImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Definition of a container image for starting a notebook instance with the
+   * environment installed in a container.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ContainerImage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ContainerImage) + com.google.cloud.notebooks.v1.ContainerImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_ContainerImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_ContainerImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ContainerImage.class, + com.google.cloud.notebooks.v1.ContainerImage.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ContainerImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + repository_ = ""; + + tag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_ContainerImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage build() { + com.google.cloud.notebooks.v1.ContainerImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage buildPartial() { + com.google.cloud.notebooks.v1.ContainerImage result = + new com.google.cloud.notebooks.v1.ContainerImage(this); + result.repository_ = repository_; + result.tag_ = tag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ContainerImage) { + return mergeFrom((com.google.cloud.notebooks.v1.ContainerImage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ContainerImage other) { + if (other == com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance()) return this; + if (!other.getRepository().isEmpty()) { + repository_ = other.repository_; + onChanged(); + } + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ContainerImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.ContainerImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object repository_ = ""; + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The repository. + */ + public java.lang.String getRepository() { + java.lang.Object ref = repository_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + repository_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for repository. + */ + public com.google.protobuf.ByteString getRepositoryBytes() { + java.lang.Object ref = repository_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + repository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The repository to set. + * @return This builder for chaining. + */ + public Builder setRepository(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + repository_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRepository() { + + repository_ = getDefaultInstance().getRepository(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The path to the container image repository. For example:
+     * `gcr.io/{project_id}/{image_name}`
+     * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for repository to set. + * @return This builder for chaining. + */ + public Builder setRepositoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + repository_ = value; + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @return This builder for chaining. + */ + public Builder clearTag() { + + tag_ = getDefaultInstance().getTag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The tag of the container image. If not specified, this defaults
+     * to the latest tag.
+     * 
+ * + * string tag = 2; + * + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ContainerImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ContainerImage) + private static final com.google.cloud.notebooks.v1.ContainerImage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ContainerImage(); + } + + public static com.google.cloud.notebooks.v1.ContainerImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContainerImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContainerImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ContainerImageOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ContainerImageOrBuilder.java new file mode 100644 index 00000000..0605a800 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ContainerImageOrBuilder.java @@ -0,0 +1,79 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/environment.proto + +package com.google.cloud.notebooks.v1; + +public interface ContainerImageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ContainerImage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The path to the container image repository. For example:
+   * `gcr.io/{project_id}/{image_name}`
+   * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The repository. + */ + java.lang.String getRepository(); + /** + * + * + *
+   * Required. The path to the container image repository. For example:
+   * `gcr.io/{project_id}/{image_name}`
+   * 
+ * + * string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for repository. + */ + com.google.protobuf.ByteString getRepositoryBytes(); + + /** + * + * + *
+   * The tag of the container image. If not specified, this defaults
+   * to the latest tag.
+   * 
+ * + * string tag = 2; + * + * @return The tag. + */ + java.lang.String getTag(); + /** + * + * + *
+   * The tag of the container image. If not specified, this defaults
+   * to the latest tag.
+   * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + com.google.protobuf.ByteString getTagBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateEnvironmentRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateEnvironmentRequest.java new file mode 100644 index 00000000..f7170573 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateEnvironmentRequest.java @@ -0,0 +1,1139 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for creating a notebook environment.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateEnvironmentRequest} + */ +public final class CreateEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.CreateEnvironmentRequest) + CreateEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEnvironmentRequest.newBuilder() to construct. + private CreateEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEnvironmentRequest() { + parent_ = ""; + environmentId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEnvironmentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + environmentId_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.Environment.Builder subBuilder = null; + if (environment_ != null) { + subBuilder = environment_.toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.notebooks.v1.Environment.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(environment_); + environment_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateEnvironmentRequest.class, + com.google.cloud.notebooks.v1.CreateEnvironmentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format: `projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format: `projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object environmentId_; + /** + * + * + *
+   * Required. User-defined unique ID of this environment. The `environment_id` must
+   * be 1 to 63 characters long and contain only lowercase letters,
+   * numeric characters, and dashes. The first character must be a lowercase
+   * letter and the last character cannot be a dash.
+   * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The environmentId. + */ + @java.lang.Override + public java.lang.String getEnvironmentId() { + java.lang.Object ref = environmentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environmentId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User-defined unique ID of this environment. The `environment_id` must
+   * be 1 to 63 characters long and contain only lowercase letters,
+   * numeric characters, and dashes. The first character must be a lowercase
+   * letter and the last character cannot be a dash.
+   * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for environmentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentIdBytes() { + java.lang.Object ref = environmentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environmentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.Environment environment_; + /** + * + * + *
+   * Required. The environment to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + * + * + *
+   * Required. The environment to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The environment. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Environment getEnvironment() { + return environment_ == null + ? com.google.cloud.notebooks.v1.Environment.getDefaultInstance() + : environment_; + } + /** + * + * + *
+   * Required. The environment to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.EnvironmentOrBuilder getEnvironmentOrBuilder() { + return getEnvironment(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getEnvironmentIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, environmentId_); + } + if (environment_ != null) { + output.writeMessage(3, getEnvironment()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getEnvironmentIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, environmentId_); + } + if (environment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEnvironment()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.CreateEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.CreateEnvironmentRequest other = + (com.google.cloud.notebooks.v1.CreateEnvironmentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEnvironmentId().equals(other.getEnvironmentId())) return false; + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment().equals(other.getEnvironment())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + ENVIRONMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentId().hashCode(); + if (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.CreateEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for creating a notebook environment.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.CreateEnvironmentRequest) + com.google.cloud.notebooks.v1.CreateEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateEnvironmentRequest.class, + com.google.cloud.notebooks.v1.CreateEnvironmentRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.CreateEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + environmentId_ = ""; + + if (environmentBuilder_ == null) { + environment_ = null; + } else { + environment_ = null; + environmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateEnvironmentRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.CreateEnvironmentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateEnvironmentRequest build() { + com.google.cloud.notebooks.v1.CreateEnvironmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateEnvironmentRequest buildPartial() { + com.google.cloud.notebooks.v1.CreateEnvironmentRequest result = + new com.google.cloud.notebooks.v1.CreateEnvironmentRequest(this); + result.parent_ = parent_; + result.environmentId_ = environmentId_; + if (environmentBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.CreateEnvironmentRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.CreateEnvironmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.CreateEnvironmentRequest other) { + if (other == com.google.cloud.notebooks.v1.CreateEnvironmentRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getEnvironmentId().isEmpty()) { + environmentId_ = other.environmentId_; + onChanged(); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.CreateEnvironmentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.CreateEnvironmentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object environmentId_ = ""; + /** + * + * + *
+     * Required. User-defined unique ID of this environment. The `environment_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The environmentId. + */ + public java.lang.String getEnvironmentId() { + java.lang.Object ref = environmentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environmentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this environment. The `environment_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for environmentId. + */ + public com.google.protobuf.ByteString getEnvironmentIdBytes() { + java.lang.Object ref = environmentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environmentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this environment. The `environment_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The environmentId to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environmentId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this environment. The `environment_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEnvironmentId() { + + environmentId_ = getDefaultInstance().getEnvironmentId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this environment. The `environment_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for environmentId to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environmentId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.Environment environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Environment, + com.google.cloud.notebooks.v1.Environment.Builder, + com.google.cloud.notebooks.v1.EnvironmentOrBuilder> + environmentBuilder_; + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return environmentBuilder_ != null || environment_ != null; + } + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The environment. + */ + public com.google.cloud.notebooks.v1.Environment getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null + ? com.google.cloud.notebooks.v1.Environment.getDefaultInstance() + : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEnvironment(com.google.cloud.notebooks.v1.Environment value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + environmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEnvironment( + com.google.cloud.notebooks.v1.Environment.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEnvironment(com.google.cloud.notebooks.v1.Environment value) { + if (environmentBuilder_ == null) { + if (environment_ != null) { + environment_ = + com.google.cloud.notebooks.v1.Environment.newBuilder(environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + environmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = null; + onChanged(); + } else { + environment_ = null; + environmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.Environment.Builder getEnvironmentBuilder() { + + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.EnvironmentOrBuilder getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null + ? com.google.cloud.notebooks.v1.Environment.getDefaultInstance() + : environment_; + } + } + /** + * + * + *
+     * Required. The environment to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Environment, + com.google.cloud.notebooks.v1.Environment.Builder, + com.google.cloud.notebooks.v1.EnvironmentOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Environment, + com.google.cloud.notebooks.v1.Environment.Builder, + com.google.cloud.notebooks.v1.EnvironmentOrBuilder>( + getEnvironment(), getParentForChildren(), isClean()); + environment_ = null; + } + return environmentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.CreateEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.CreateEnvironmentRequest) + private static final com.google.cloud.notebooks.v1.CreateEnvironmentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.CreateEnvironmentRequest(); + } + + public static com.google.cloud.notebooks.v1.CreateEnvironmentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateEnvironmentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateEnvironmentRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..d07631bf --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateEnvironmentRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface CreateEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.CreateEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: `projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format: `projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User-defined unique ID of this environment. The `environment_id` must
+   * be 1 to 63 characters long and contain only lowercase letters,
+   * numeric characters, and dashes. The first character must be a lowercase
+   * letter and the last character cannot be a dash.
+   * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The environmentId. + */ + java.lang.String getEnvironmentId(); + /** + * + * + *
+   * Required. User-defined unique ID of this environment. The `environment_id` must
+   * be 1 to 63 characters long and contain only lowercase letters,
+   * numeric characters, and dashes. The first character must be a lowercase
+   * letter and the last character cannot be a dash.
+   * 
+ * + * string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for environmentId. + */ + com.google.protobuf.ByteString getEnvironmentIdBytes(); + + /** + * + * + *
+   * Required. The environment to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * + * + *
+   * Required. The environment to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The environment. + */ + com.google.cloud.notebooks.v1.Environment getEnvironment(); + /** + * + * + *
+   * Required. The environment to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.notebooks.v1.EnvironmentOrBuilder getEnvironmentOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateExecutionRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateExecutionRequest.java new file mode 100644 index 00000000..b0e6ea01 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateExecutionRequest.java @@ -0,0 +1,1137 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request to create notebook execution
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateExecutionRequest} + */ +public final class CreateExecutionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.CreateExecutionRequest) + CreateExecutionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateExecutionRequest.newBuilder() to construct. + private CreateExecutionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateExecutionRequest() { + parent_ = ""; + executionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateExecutionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateExecutionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + executionId_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.Execution.Builder subBuilder = null; + if (execution_ != null) { + subBuilder = execution_.toBuilder(); + } + execution_ = + input.readMessage( + com.google.cloud.notebooks.v1.Execution.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(execution_); + execution_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateExecutionRequest.class, + com.google.cloud.notebooks.v1.CreateExecutionRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object executionId_; + /** + * + * + *
+   * Required. User-defined unique ID of this execution.
+   * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The executionId. + */ + @java.lang.Override + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User-defined unique ID of this execution.
+   * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for executionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.Execution execution_; + /** + * + * + *
+   * Required. The execution to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the execution field is set. + */ + @java.lang.Override + public boolean hasExecution() { + return execution_ != null; + } + /** + * + * + *
+   * Required. The execution to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The execution. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution getExecution() { + return execution_ == null + ? com.google.cloud.notebooks.v1.Execution.getDefaultInstance() + : execution_; + } + /** + * + * + *
+   * Required. The execution to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionOrBuilder getExecutionOrBuilder() { + return getExecution(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getExecutionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, executionId_); + } + if (execution_ != null) { + output.writeMessage(3, getExecution()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getExecutionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, executionId_); + } + if (execution_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExecution()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.CreateExecutionRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.CreateExecutionRequest other = + (com.google.cloud.notebooks.v1.CreateExecutionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getExecutionId().equals(other.getExecutionId())) return false; + if (hasExecution() != other.hasExecution()) return false; + if (hasExecution()) { + if (!getExecution().equals(other.getExecution())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + EXECUTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getExecutionId().hashCode(); + if (hasExecution()) { + hash = (37 * hash) + EXECUTION_FIELD_NUMBER; + hash = (53 * hash) + getExecution().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.CreateExecutionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to create notebook execution
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateExecutionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.CreateExecutionRequest) + com.google.cloud.notebooks.v1.CreateExecutionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateExecutionRequest.class, + com.google.cloud.notebooks.v1.CreateExecutionRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.CreateExecutionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + executionId_ = ""; + + if (executionBuilder_ == null) { + execution_ = null; + } else { + execution_ = null; + executionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateExecutionRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.CreateExecutionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateExecutionRequest build() { + com.google.cloud.notebooks.v1.CreateExecutionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateExecutionRequest buildPartial() { + com.google.cloud.notebooks.v1.CreateExecutionRequest result = + new com.google.cloud.notebooks.v1.CreateExecutionRequest(this); + result.parent_ = parent_; + result.executionId_ = executionId_; + if (executionBuilder_ == null) { + result.execution_ = execution_; + } else { + result.execution_ = executionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.CreateExecutionRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.CreateExecutionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.CreateExecutionRequest other) { + if (other == com.google.cloud.notebooks.v1.CreateExecutionRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getExecutionId().isEmpty()) { + executionId_ = other.executionId_; + onChanged(); + } + if (other.hasExecution()) { + mergeExecution(other.getExecution()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.CreateExecutionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.CreateExecutionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object executionId_ = ""; + /** + * + * + *
+     * Required. User-defined unique ID of this execution.
+     * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The executionId. + */ + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this execution.
+     * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for executionId. + */ + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this execution.
+     * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + executionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this execution.
+     * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearExecutionId() { + + executionId_ = getDefaultInstance().getExecutionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this execution.
+     * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + executionId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.Execution execution_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder> + executionBuilder_; + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the execution field is set. + */ + public boolean hasExecution() { + return executionBuilder_ != null || execution_ != null; + } + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The execution. + */ + public com.google.cloud.notebooks.v1.Execution getExecution() { + if (executionBuilder_ == null) { + return execution_ == null + ? com.google.cloud.notebooks.v1.Execution.getDefaultInstance() + : execution_; + } else { + return executionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExecution(com.google.cloud.notebooks.v1.Execution value) { + if (executionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + execution_ = value; + onChanged(); + } else { + executionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExecution(com.google.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (executionBuilder_ == null) { + execution_ = builderForValue.build(); + onChanged(); + } else { + executionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExecution(com.google.cloud.notebooks.v1.Execution value) { + if (executionBuilder_ == null) { + if (execution_ != null) { + execution_ = + com.google.cloud.notebooks.v1.Execution.newBuilder(execution_) + .mergeFrom(value) + .buildPartial(); + } else { + execution_ = value; + } + onChanged(); + } else { + executionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExecution() { + if (executionBuilder_ == null) { + execution_ = null; + onChanged(); + } else { + execution_ = null; + executionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.Execution.Builder getExecutionBuilder() { + + onChanged(); + return getExecutionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.ExecutionOrBuilder getExecutionOrBuilder() { + if (executionBuilder_ != null) { + return executionBuilder_.getMessageOrBuilder(); + } else { + return execution_ == null + ? com.google.cloud.notebooks.v1.Execution.getDefaultInstance() + : execution_; + } + } + /** + * + * + *
+     * Required. The execution to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder> + getExecutionFieldBuilder() { + if (executionBuilder_ == null) { + executionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder>( + getExecution(), getParentForChildren(), isClean()); + execution_ = null; + } + return executionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.CreateExecutionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.CreateExecutionRequest) + private static final com.google.cloud.notebooks.v1.CreateExecutionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.CreateExecutionRequest(); + } + + public static com.google.cloud.notebooks.v1.CreateExecutionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateExecutionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateExecutionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateExecutionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateExecutionRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateExecutionRequestOrBuilder.java new file mode 100644 index 00000000..b68151af --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateExecutionRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface CreateExecutionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.CreateExecutionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User-defined unique ID of this execution.
+   * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The executionId. + */ + java.lang.String getExecutionId(); + /** + * + * + *
+   * Required. User-defined unique ID of this execution.
+   * 
+ * + * string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for executionId. + */ + com.google.protobuf.ByteString getExecutionIdBytes(); + + /** + * + * + *
+   * Required. The execution to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the execution field is set. + */ + boolean hasExecution(); + /** + * + * + *
+   * Required. The execution to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The execution. + */ + com.google.cloud.notebooks.v1.Execution getExecution(); + /** + * + * + *
+   * Required. The execution to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.notebooks.v1.ExecutionOrBuilder getExecutionOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateInstanceRequest.java new file mode 100644 index 00000000..da6101cf --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateInstanceRequest.java @@ -0,0 +1,1123 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for creating a notebook instance.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateInstanceRequest} + */ +public final class CreateInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.CreateInstanceRequest) + CreateInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateInstanceRequest.newBuilder() to construct. + private CreateInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInstanceRequest() { + parent_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceId_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = + input.readMessage( + com.google.cloud.notebooks.v1.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateInstanceRequest.class, + com.google.cloud.notebooks.v1.CreateInstanceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceId_; + /** + * + * + *
+   * Required. User-defined unique ID of this instance.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User-defined unique ID of this instance.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.Instance instance_; + /** + * + * + *
+   * Required. The instance to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return instance_ != null; + } + /** + * + * + *
+   * Required. The instance to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance getInstance() { + return instance_ == null + ? com.google.cloud.notebooks.v1.Instance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * Required. The instance to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getInstanceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (instance_ != null) { + output.writeMessage(3, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getInstanceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.CreateInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.CreateInstanceRequest other = + (com.google.cloud.notebooks.v1.CreateInstanceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.CreateInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for creating a notebook instance.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.CreateInstanceRequest) + com.google.cloud.notebooks.v1.CreateInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateInstanceRequest.class, + com.google.cloud.notebooks.v1.CreateInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.CreateInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + instanceId_ = ""; + + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.CreateInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateInstanceRequest build() { + com.google.cloud.notebooks.v1.CreateInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.CreateInstanceRequest result = + new com.google.cloud.notebooks.v1.CreateInstanceRequest(this); + result.parent_ = parent_; + result.instanceId_ = instanceId_; + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.CreateInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.CreateInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.CreateInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.CreateInstanceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + onChanged(); + } + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.CreateInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.CreateInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Required. User-defined unique ID of this instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + + instanceId_ = getDefaultInstance().getInstanceId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance, + com.google.cloud.notebooks.v1.Instance.Builder, + com.google.cloud.notebooks.v1.InstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + public com.google.cloud.notebooks.v1.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.notebooks.v1.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstance(com.google.cloud.notebooks.v1.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstance(com.google.cloud.notebooks.v1.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstance(com.google.cloud.notebooks.v1.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + com.google.cloud.notebooks.v1.Instance.newBuilder(instance_) + .mergeFrom(value) + .buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.notebooks.v1.Instance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * Required. The instance to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance, + com.google.cloud.notebooks.v1.Instance.Builder, + com.google.cloud.notebooks.v1.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance, + com.google.cloud.notebooks.v1.Instance.Builder, + com.google.cloud.notebooks.v1.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.CreateInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.CreateInstanceRequest) + private static final com.google.cloud.notebooks.v1.CreateInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.CreateInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.CreateInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateInstanceRequestOrBuilder.java new file mode 100644 index 00000000..5b68b9d6 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateInstanceRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface CreateInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.CreateInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User-defined unique ID of this instance.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Required. User-defined unique ID of this instance.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Required. The instance to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * Required. The instance to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + com.google.cloud.notebooks.v1.Instance getInstance(); + /** + * + * + *
+   * Required. The instance to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.notebooks.v1.InstanceOrBuilder getInstanceOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateRuntimeRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateRuntimeRequest.java new file mode 100644 index 00000000..bdf6d50b --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateRuntimeRequest.java @@ -0,0 +1,1132 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for creating a Managed Notebook Runtime.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateRuntimeRequest} + */ +public final class CreateRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.CreateRuntimeRequest) + CreateRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateRuntimeRequest.newBuilder() to construct. + private CreateRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateRuntimeRequest() { + parent_ = ""; + runtimeId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateRuntimeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateRuntimeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + runtimeId_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.Runtime.Builder subBuilder = null; + if (runtime_ != null) { + subBuilder = runtime_.toBuilder(); + } + runtime_ = + input.readMessage( + com.google.cloud.notebooks.v1.Runtime.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(runtime_); + runtime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateRuntimeRequest.class, + com.google.cloud.notebooks.v1.CreateRuntimeRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object runtimeId_; + /** + * + * + *
+   * Required. User-defined unique ID of this Runtime.
+   * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeId. + */ + @java.lang.Override + public java.lang.String getRuntimeId() { + java.lang.Object ref = runtimeId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User-defined unique ID of this Runtime.
+   * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeIdBytes() { + java.lang.Object ref = runtimeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RUNTIME_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.Runtime runtime_; + /** + * + * + *
+   * Required. The Runtime to be created.
+   * 
+ * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the runtime field is set. + */ + @java.lang.Override + public boolean hasRuntime() { + return runtime_ != null; + } + /** + * + * + *
+   * Required. The Runtime to be created.
+   * 
+ * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The runtime. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime getRuntime() { + return runtime_ == null ? com.google.cloud.notebooks.v1.Runtime.getDefaultInstance() : runtime_; + } + /** + * + * + *
+   * Required. The Runtime to be created.
+   * 
+ * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeOrBuilder getRuntimeOrBuilder() { + return getRuntime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getRuntimeIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtimeId_); + } + if (runtime_ != null) { + output.writeMessage(3, getRuntime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getRuntimeIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtimeId_); + } + if (runtime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRuntime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.CreateRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.CreateRuntimeRequest other = + (com.google.cloud.notebooks.v1.CreateRuntimeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRuntimeId().equals(other.getRuntimeId())) return false; + if (hasRuntime() != other.hasRuntime()) return false; + if (hasRuntime()) { + if (!getRuntime().equals(other.getRuntime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + RUNTIME_ID_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeId().hashCode(); + if (hasRuntime()) { + hash = (37 * hash) + RUNTIME_FIELD_NUMBER; + hash = (53 * hash) + getRuntime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.CreateRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for creating a Managed Notebook Runtime.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.CreateRuntimeRequest) + com.google.cloud.notebooks.v1.CreateRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateRuntimeRequest.class, + com.google.cloud.notebooks.v1.CreateRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.CreateRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + runtimeId_ = ""; + + if (runtimeBuilder_ == null) { + runtime_ = null; + } else { + runtime_ = null; + runtimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.CreateRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateRuntimeRequest build() { + com.google.cloud.notebooks.v1.CreateRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateRuntimeRequest buildPartial() { + com.google.cloud.notebooks.v1.CreateRuntimeRequest result = + new com.google.cloud.notebooks.v1.CreateRuntimeRequest(this); + result.parent_ = parent_; + result.runtimeId_ = runtimeId_; + if (runtimeBuilder_ == null) { + result.runtime_ = runtime_; + } else { + result.runtime_ = runtimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.CreateRuntimeRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.CreateRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.CreateRuntimeRequest other) { + if (other == com.google.cloud.notebooks.v1.CreateRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getRuntimeId().isEmpty()) { + runtimeId_ = other.runtimeId_; + onChanged(); + } + if (other.hasRuntime()) { + mergeRuntime(other.getRuntime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.CreateRuntimeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.CreateRuntimeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object runtimeId_ = ""; + /** + * + * + *
+     * Required. User-defined unique ID of this Runtime.
+     * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeId. + */ + public java.lang.String getRuntimeId() { + java.lang.Object ref = runtimeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this Runtime.
+     * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeId. + */ + public com.google.protobuf.ByteString getRuntimeIdBytes() { + java.lang.Object ref = runtimeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this Runtime.
+     * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The runtimeId to set. + * @return This builder for chaining. + */ + public Builder setRuntimeId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + runtimeId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this Runtime.
+     * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRuntimeId() { + + runtimeId_ = getDefaultInstance().getRuntimeId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this Runtime.
+     * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for runtimeId to set. + * @return This builder for chaining. + */ + public Builder setRuntimeIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + runtimeId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.Runtime runtime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Runtime, + com.google.cloud.notebooks.v1.Runtime.Builder, + com.google.cloud.notebooks.v1.RuntimeOrBuilder> + runtimeBuilder_; + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the runtime field is set. + */ + public boolean hasRuntime() { + return runtimeBuilder_ != null || runtime_ != null; + } + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The runtime. + */ + public com.google.cloud.notebooks.v1.Runtime getRuntime() { + if (runtimeBuilder_ == null) { + return runtime_ == null + ? com.google.cloud.notebooks.v1.Runtime.getDefaultInstance() + : runtime_; + } else { + return runtimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRuntime(com.google.cloud.notebooks.v1.Runtime value) { + if (runtimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runtime_ = value; + onChanged(); + } else { + runtimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRuntime(com.google.cloud.notebooks.v1.Runtime.Builder builderForValue) { + if (runtimeBuilder_ == null) { + runtime_ = builderForValue.build(); + onChanged(); + } else { + runtimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRuntime(com.google.cloud.notebooks.v1.Runtime value) { + if (runtimeBuilder_ == null) { + if (runtime_ != null) { + runtime_ = + com.google.cloud.notebooks.v1.Runtime.newBuilder(runtime_) + .mergeFrom(value) + .buildPartial(); + } else { + runtime_ = value; + } + onChanged(); + } else { + runtimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRuntime() { + if (runtimeBuilder_ == null) { + runtime_ = null; + onChanged(); + } else { + runtime_ = null; + runtimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.Runtime.Builder getRuntimeBuilder() { + + onChanged(); + return getRuntimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.RuntimeOrBuilder getRuntimeOrBuilder() { + if (runtimeBuilder_ != null) { + return runtimeBuilder_.getMessageOrBuilder(); + } else { + return runtime_ == null + ? com.google.cloud.notebooks.v1.Runtime.getDefaultInstance() + : runtime_; + } + } + /** + * + * + *
+     * Required. The Runtime to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Runtime, + com.google.cloud.notebooks.v1.Runtime.Builder, + com.google.cloud.notebooks.v1.RuntimeOrBuilder> + getRuntimeFieldBuilder() { + if (runtimeBuilder_ == null) { + runtimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Runtime, + com.google.cloud.notebooks.v1.Runtime.Builder, + com.google.cloud.notebooks.v1.RuntimeOrBuilder>( + getRuntime(), getParentForChildren(), isClean()); + runtime_ = null; + } + return runtimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.CreateRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.CreateRuntimeRequest) + private static final com.google.cloud.notebooks.v1.CreateRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.CreateRuntimeRequest(); + } + + public static com.google.cloud.notebooks.v1.CreateRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateRuntimeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateRuntimeRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateRuntimeRequestOrBuilder.java new file mode 100644 index 00000000..b4533ed6 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateRuntimeRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface CreateRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.CreateRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User-defined unique ID of this Runtime.
+   * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runtimeId. + */ + java.lang.String getRuntimeId(); + /** + * + * + *
+   * Required. User-defined unique ID of this Runtime.
+   * 
+ * + * string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for runtimeId. + */ + com.google.protobuf.ByteString getRuntimeIdBytes(); + + /** + * + * + *
+   * Required. The Runtime to be created.
+   * 
+ * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the runtime field is set. + */ + boolean hasRuntime(); + /** + * + * + *
+   * Required. The Runtime to be created.
+   * 
+ * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The runtime. + */ + com.google.cloud.notebooks.v1.Runtime getRuntime(); + /** + * + * + *
+   * Required. The Runtime to be created.
+   * 
+ * + * .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.notebooks.v1.RuntimeOrBuilder getRuntimeOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateScheduleRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateScheduleRequest.java new file mode 100644 index 00000000..b673bb80 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateScheduleRequest.java @@ -0,0 +1,1137 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for created scheduled notebooks
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateScheduleRequest} + */ +public final class CreateScheduleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.CreateScheduleRequest) + CreateScheduleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateScheduleRequest.newBuilder() to construct. + private CreateScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateScheduleRequest() { + parent_ = ""; + scheduleId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateScheduleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateScheduleRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + scheduleId_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.Schedule.Builder subBuilder = null; + if (schedule_ != null) { + subBuilder = schedule_.toBuilder(); + } + schedule_ = + input.readMessage( + com.google.cloud.notebooks.v1.Schedule.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(schedule_); + schedule_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateScheduleRequest.class, + com.google.cloud.notebooks.v1.CreateScheduleRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEDULE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object scheduleId_; + /** + * + * + *
+   * Required. User-defined unique ID of this schedule.
+   * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The scheduleId. + */ + @java.lang.Override + public java.lang.String getScheduleId() { + java.lang.Object ref = scheduleId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scheduleId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User-defined unique ID of this schedule.
+   * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for scheduleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScheduleIdBytes() { + java.lang.Object ref = scheduleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scheduleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEDULE_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.Schedule schedule_; + /** + * + * + *
+   * Required. The schedule to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return schedule_ != null; + } + /** + * + * + *
+   * Required. The schedule to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schedule. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Schedule getSchedule() { + return schedule_ == null + ? com.google.cloud.notebooks.v1.Schedule.getDefaultInstance() + : schedule_; + } + /** + * + * + *
+   * Required. The schedule to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ScheduleOrBuilder getScheduleOrBuilder() { + return getSchedule(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getScheduleIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scheduleId_); + } + if (schedule_ != null) { + output.writeMessage(3, getSchedule()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getScheduleIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, scheduleId_); + } + if (schedule_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSchedule()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.CreateScheduleRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.CreateScheduleRequest other = + (com.google.cloud.notebooks.v1.CreateScheduleRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getScheduleId().equals(other.getScheduleId())) return false; + if (hasSchedule() != other.hasSchedule()) return false; + if (hasSchedule()) { + if (!getSchedule().equals(other.getSchedule())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SCHEDULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getScheduleId().hashCode(); + if (hasSchedule()) { + hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getSchedule().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.CreateScheduleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for created scheduled notebooks
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.CreateScheduleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.CreateScheduleRequest) + com.google.cloud.notebooks.v1.CreateScheduleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.CreateScheduleRequest.class, + com.google.cloud.notebooks.v1.CreateScheduleRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.CreateScheduleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + scheduleId_ = ""; + + if (scheduleBuilder_ == null) { + schedule_ = null; + } else { + schedule_ = null; + scheduleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateScheduleRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.CreateScheduleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateScheduleRequest build() { + com.google.cloud.notebooks.v1.CreateScheduleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateScheduleRequest buildPartial() { + com.google.cloud.notebooks.v1.CreateScheduleRequest result = + new com.google.cloud.notebooks.v1.CreateScheduleRequest(this); + result.parent_ = parent_; + result.scheduleId_ = scheduleId_; + if (scheduleBuilder_ == null) { + result.schedule_ = schedule_; + } else { + result.schedule_ = scheduleBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.CreateScheduleRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.CreateScheduleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.CreateScheduleRequest other) { + if (other == com.google.cloud.notebooks.v1.CreateScheduleRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getScheduleId().isEmpty()) { + scheduleId_ = other.scheduleId_; + onChanged(); + } + if (other.hasSchedule()) { + mergeSchedule(other.getSchedule()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.CreateScheduleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.CreateScheduleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object scheduleId_ = ""; + /** + * + * + *
+     * Required. User-defined unique ID of this schedule.
+     * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The scheduleId. + */ + public java.lang.String getScheduleId() { + java.lang.Object ref = scheduleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scheduleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this schedule.
+     * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for scheduleId. + */ + public com.google.protobuf.ByteString getScheduleIdBytes() { + java.lang.Object ref = scheduleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scheduleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User-defined unique ID of this schedule.
+     * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The scheduleId to set. + * @return This builder for chaining. + */ + public Builder setScheduleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scheduleId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this schedule.
+     * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearScheduleId() { + + scheduleId_ = getDefaultInstance().getScheduleId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User-defined unique ID of this schedule.
+     * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for scheduleId to set. + * @return This builder for chaining. + */ + public Builder setScheduleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scheduleId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.Schedule schedule_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Schedule, + com.google.cloud.notebooks.v1.Schedule.Builder, + com.google.cloud.notebooks.v1.ScheduleOrBuilder> + scheduleBuilder_; + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schedule field is set. + */ + public boolean hasSchedule() { + return scheduleBuilder_ != null || schedule_ != null; + } + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schedule. + */ + public com.google.cloud.notebooks.v1.Schedule getSchedule() { + if (scheduleBuilder_ == null) { + return schedule_ == null + ? com.google.cloud.notebooks.v1.Schedule.getDefaultInstance() + : schedule_; + } else { + return scheduleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchedule(com.google.cloud.notebooks.v1.Schedule value) { + if (scheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schedule_ = value; + onChanged(); + } else { + scheduleBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSchedule(com.google.cloud.notebooks.v1.Schedule.Builder builderForValue) { + if (scheduleBuilder_ == null) { + schedule_ = builderForValue.build(); + onChanged(); + } else { + scheduleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSchedule(com.google.cloud.notebooks.v1.Schedule value) { + if (scheduleBuilder_ == null) { + if (schedule_ != null) { + schedule_ = + com.google.cloud.notebooks.v1.Schedule.newBuilder(schedule_) + .mergeFrom(value) + .buildPartial(); + } else { + schedule_ = value; + } + onChanged(); + } else { + scheduleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSchedule() { + if (scheduleBuilder_ == null) { + schedule_ = null; + onChanged(); + } else { + schedule_ = null; + scheduleBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.Schedule.Builder getScheduleBuilder() { + + onChanged(); + return getScheduleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.ScheduleOrBuilder getScheduleOrBuilder() { + if (scheduleBuilder_ != null) { + return scheduleBuilder_.getMessageOrBuilder(); + } else { + return schedule_ == null + ? com.google.cloud.notebooks.v1.Schedule.getDefaultInstance() + : schedule_; + } + } + /** + * + * + *
+     * Required. The schedule to be created.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Schedule, + com.google.cloud.notebooks.v1.Schedule.Builder, + com.google.cloud.notebooks.v1.ScheduleOrBuilder> + getScheduleFieldBuilder() { + if (scheduleBuilder_ == null) { + scheduleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Schedule, + com.google.cloud.notebooks.v1.Schedule.Builder, + com.google.cloud.notebooks.v1.ScheduleOrBuilder>( + getSchedule(), getParentForChildren(), isClean()); + schedule_ = null; + } + return scheduleBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.CreateScheduleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.CreateScheduleRequest) + private static final com.google.cloud.notebooks.v1.CreateScheduleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.CreateScheduleRequest(); + } + + public static com.google.cloud.notebooks.v1.CreateScheduleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateScheduleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateScheduleRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.CreateScheduleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateScheduleRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateScheduleRequestOrBuilder.java new file mode 100644 index 00000000..4f791b9f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/CreateScheduleRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface CreateScheduleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.CreateScheduleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User-defined unique ID of this schedule.
+   * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The scheduleId. + */ + java.lang.String getScheduleId(); + /** + * + * + *
+   * Required. User-defined unique ID of this schedule.
+   * 
+ * + * string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for scheduleId. + */ + com.google.protobuf.ByteString getScheduleIdBytes(); + + /** + * + * + *
+   * Required. The schedule to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the schedule field is set. + */ + boolean hasSchedule(); + /** + * + * + *
+   * Required. The schedule to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The schedule. + */ + com.google.cloud.notebooks.v1.Schedule getSchedule(); + /** + * + * + *
+   * Required. The schedule to be created.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.notebooks.v1.ScheduleOrBuilder getScheduleOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteEnvironmentRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteEnvironmentRequest.java new file mode 100644 index 00000000..c2ec7898 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteEnvironmentRequest.java @@ -0,0 +1,644 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for deleting a notebook environment.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteEnvironmentRequest} + */ +public final class DeleteEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.DeleteEnvironmentRequest) + DeleteEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteEnvironmentRequest.newBuilder() to construct. + private DeleteEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteEnvironmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteEnvironmentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest.class, + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.DeleteEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest other = + (com.google.cloud.notebooks.v1.DeleteEnvironmentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for deleting a notebook environment.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.DeleteEnvironmentRequest) + com.google.cloud.notebooks.v1.DeleteEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest.class, + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.DeleteEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteEnvironmentRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.DeleteEnvironmentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteEnvironmentRequest build() { + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteEnvironmentRequest buildPartial() { + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest result = + new com.google.cloud.notebooks.v1.DeleteEnvironmentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.DeleteEnvironmentRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.DeleteEnvironmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.DeleteEnvironmentRequest other) { + if (other == com.google.cloud.notebooks.v1.DeleteEnvironmentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.DeleteEnvironmentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.DeleteEnvironmentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.DeleteEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.DeleteEnvironmentRequest) + private static final com.google.cloud.notebooks.v1.DeleteEnvironmentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.DeleteEnvironmentRequest(); + } + + public static com.google.cloud.notebooks.v1.DeleteEnvironmentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteEnvironmentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteEnvironmentRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..b026fdb3 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteEnvironmentRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface DeleteEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.DeleteEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteExecutionRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteExecutionRequest.java new file mode 100644 index 00000000..4de3e3e8 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteExecutionRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for deleting a scheduled notebook execution
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteExecutionRequest} + */ +public final class DeleteExecutionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.DeleteExecutionRequest) + DeleteExecutionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteExecutionRequest.newBuilder() to construct. + private DeleteExecutionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteExecutionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteExecutionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteExecutionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteExecutionRequest.class, + com.google.cloud.notebooks.v1.DeleteExecutionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.DeleteExecutionRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.DeleteExecutionRequest other = + (com.google.cloud.notebooks.v1.DeleteExecutionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.DeleteExecutionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for deleting a scheduled notebook execution
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteExecutionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.DeleteExecutionRequest) + com.google.cloud.notebooks.v1.DeleteExecutionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteExecutionRequest.class, + com.google.cloud.notebooks.v1.DeleteExecutionRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.DeleteExecutionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteExecutionRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.DeleteExecutionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteExecutionRequest build() { + com.google.cloud.notebooks.v1.DeleteExecutionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteExecutionRequest buildPartial() { + com.google.cloud.notebooks.v1.DeleteExecutionRequest result = + new com.google.cloud.notebooks.v1.DeleteExecutionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.DeleteExecutionRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.DeleteExecutionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.DeleteExecutionRequest other) { + if (other == com.google.cloud.notebooks.v1.DeleteExecutionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.DeleteExecutionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.DeleteExecutionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.DeleteExecutionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.DeleteExecutionRequest) + private static final com.google.cloud.notebooks.v1.DeleteExecutionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.DeleteExecutionRequest(); + } + + public static com.google.cloud.notebooks.v1.DeleteExecutionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteExecutionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteExecutionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteExecutionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteExecutionRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteExecutionRequestOrBuilder.java new file mode 100644 index 00000000..7349282e --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteExecutionRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface DeleteExecutionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.DeleteExecutionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteInstanceRequest.java new file mode 100644 index 00000000..49fc1cf3 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteInstanceRequest.java @@ -0,0 +1,643 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for deleting a notebook instance.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteInstanceRequest} + */ +public final class DeleteInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.DeleteInstanceRequest) + DeleteInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteInstanceRequest.newBuilder() to construct. + private DeleteInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteInstanceRequest.class, + com.google.cloud.notebooks.v1.DeleteInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.DeleteInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.DeleteInstanceRequest other = + (com.google.cloud.notebooks.v1.DeleteInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.DeleteInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for deleting a notebook instance.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.DeleteInstanceRequest) + com.google.cloud.notebooks.v1.DeleteInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteInstanceRequest.class, + com.google.cloud.notebooks.v1.DeleteInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.DeleteInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.DeleteInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteInstanceRequest build() { + com.google.cloud.notebooks.v1.DeleteInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.DeleteInstanceRequest result = + new com.google.cloud.notebooks.v1.DeleteInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.DeleteInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.DeleteInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.DeleteInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.DeleteInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.DeleteInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.DeleteInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.DeleteInstanceRequest) + private static final com.google.cloud.notebooks.v1.DeleteInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.DeleteInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.DeleteInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteInstanceRequestOrBuilder.java new file mode 100644 index 00000000..33a0d4b8 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface DeleteInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.DeleteInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteRuntimeRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteRuntimeRequest.java new file mode 100644 index 00000000..8bec7ca6 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteRuntimeRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for deleting a Managed Notebook Runtime.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteRuntimeRequest} + */ +public final class DeleteRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.DeleteRuntimeRequest) + DeleteRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteRuntimeRequest.newBuilder() to construct. + private DeleteRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteRuntimeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteRuntimeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteRuntimeRequest.class, + com.google.cloud.notebooks.v1.DeleteRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.DeleteRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.DeleteRuntimeRequest other = + (com.google.cloud.notebooks.v1.DeleteRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.DeleteRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for deleting a Managed Notebook Runtime.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.DeleteRuntimeRequest) + com.google.cloud.notebooks.v1.DeleteRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteRuntimeRequest.class, + com.google.cloud.notebooks.v1.DeleteRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.DeleteRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.DeleteRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteRuntimeRequest build() { + com.google.cloud.notebooks.v1.DeleteRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteRuntimeRequest buildPartial() { + com.google.cloud.notebooks.v1.DeleteRuntimeRequest result = + new com.google.cloud.notebooks.v1.DeleteRuntimeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.DeleteRuntimeRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.DeleteRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.DeleteRuntimeRequest other) { + if (other == com.google.cloud.notebooks.v1.DeleteRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.DeleteRuntimeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.DeleteRuntimeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.DeleteRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.DeleteRuntimeRequest) + private static final com.google.cloud.notebooks.v1.DeleteRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.DeleteRuntimeRequest(); + } + + public static com.google.cloud.notebooks.v1.DeleteRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteRuntimeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteRuntimeRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteRuntimeRequestOrBuilder.java new file mode 100644 index 00000000..8235adc7 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteRuntimeRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface DeleteRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.DeleteRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteScheduleRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteScheduleRequest.java new file mode 100644 index 00000000..64fbd29d --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteScheduleRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for deleting an Schedule
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteScheduleRequest} + */ +public final class DeleteScheduleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.DeleteScheduleRequest) + DeleteScheduleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteScheduleRequest.newBuilder() to construct. + private DeleteScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteScheduleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteScheduleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteScheduleRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteScheduleRequest.class, + com.google.cloud.notebooks.v1.DeleteScheduleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.DeleteScheduleRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.DeleteScheduleRequest other = + (com.google.cloud.notebooks.v1.DeleteScheduleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.DeleteScheduleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for deleting an Schedule
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.DeleteScheduleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.DeleteScheduleRequest) + com.google.cloud.notebooks.v1.DeleteScheduleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.DeleteScheduleRequest.class, + com.google.cloud.notebooks.v1.DeleteScheduleRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.DeleteScheduleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteScheduleRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.DeleteScheduleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteScheduleRequest build() { + com.google.cloud.notebooks.v1.DeleteScheduleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteScheduleRequest buildPartial() { + com.google.cloud.notebooks.v1.DeleteScheduleRequest result = + new com.google.cloud.notebooks.v1.DeleteScheduleRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.DeleteScheduleRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.DeleteScheduleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.DeleteScheduleRequest other) { + if (other == com.google.cloud.notebooks.v1.DeleteScheduleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.DeleteScheduleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.DeleteScheduleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.DeleteScheduleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.DeleteScheduleRequest) + private static final com.google.cloud.notebooks.v1.DeleteScheduleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.DeleteScheduleRequest(); + } + + public static com.google.cloud.notebooks.v1.DeleteScheduleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteScheduleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteScheduleRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.DeleteScheduleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteScheduleRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteScheduleRequestOrBuilder.java new file mode 100644 index 00000000..b0be5d85 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/DeleteScheduleRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface DeleteScheduleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.DeleteScheduleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EncryptionConfig.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EncryptionConfig.java new file mode 100644 index 00000000..c2cf6ca4 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EncryptionConfig.java @@ -0,0 +1,657 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Represents a custom encryption key configuration that can be applied to
+ * a resource. This will encrypt all disks in Virtual Machine.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.EncryptionConfig} + */ +public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.EncryptionConfig) + EncryptionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use EncryptionConfig.newBuilder() to construct. + private EncryptionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EncryptionConfig() { + kmsKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EncryptionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EncryptionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKey_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.EncryptionConfig.class, + com.google.cloud.notebooks.v1.EncryptionConfig.Builder.class); + } + + public static final int KMS_KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object kmsKey_; + /** + * + * + *
+   * The Cloud KMS resource identifier of the customer-managed encryption key
+   * used to protect a resource, such as a disks. It has the following
+   * format:
+   * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+   * 
+ * + * string kms_key = 1; + * + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } + } + /** + * + * + *
+   * The Cloud KMS resource identifier of the customer-managed encryption key
+   * used to protect a resource, such as a disks. It has the following
+   * format:
+   * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+   * 
+ * + * string kms_key = 1; + * + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getKmsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKmsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKey_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.EncryptionConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.EncryptionConfig other = + (com.google.cloud.notebooks.v1.EncryptionConfig) obj; + + if (!getKmsKey().equals(other.getKmsKey())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.EncryptionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a custom encryption key configuration that can be applied to
+   * a resource. This will encrypt all disks in Virtual Machine.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.EncryptionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.EncryptionConfig) + com.google.cloud.notebooks.v1.EncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.EncryptionConfig.class, + com.google.cloud.notebooks.v1.EncryptionConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.EncryptionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + kmsKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.EncryptionConfig getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.EncryptionConfig build() { + com.google.cloud.notebooks.v1.EncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.EncryptionConfig buildPartial() { + com.google.cloud.notebooks.v1.EncryptionConfig result = + new com.google.cloud.notebooks.v1.EncryptionConfig(this); + result.kmsKey_ = kmsKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.EncryptionConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.EncryptionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.EncryptionConfig other) { + if (other == com.google.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance()) return this; + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.EncryptionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.EncryptionConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object kmsKey_ = ""; + /** + * + * + *
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+     * 
+ * + * string kms_key = 1; + * + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+     * 
+ * + * string kms_key = 1; + * + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+     * 
+ * + * string kms_key = 1; + * + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+     * 
+ * + * string kms_key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + + kmsKey_ = getDefaultInstance().getKmsKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud KMS resource identifier of the customer-managed encryption key
+     * used to protect a resource, such as a disks. It has the following
+     * format:
+     * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+     * 
+ * + * string kms_key = 1; + * + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKey_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.EncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.EncryptionConfig) + private static final com.google.cloud.notebooks.v1.EncryptionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.EncryptionConfig(); + } + + public static com.google.cloud.notebooks.v1.EncryptionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EncryptionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EncryptionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.EncryptionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EncryptionConfigOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EncryptionConfigOrBuilder.java new file mode 100644 index 00000000..bffbdeba --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EncryptionConfigOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface EncryptionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Cloud KMS resource identifier of the customer-managed encryption key
+   * used to protect a resource, such as a disks. It has the following
+   * format:
+   * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+   * 
+ * + * string kms_key = 1; + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + /** + * + * + *
+   * The Cloud KMS resource identifier of the customer-managed encryption key
+   * used to protect a resource, such as a disks. It has the following
+   * format:
+   * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`
+   * 
+ * + * string kms_key = 1; + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Environment.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Environment.java new file mode 100644 index 00000000..23dff700 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Environment.java @@ -0,0 +1,2179 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/environment.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Definition of a software environment that is used to start a notebook
+ * instance.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Environment} + */ +public final class Environment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Environment) + EnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Environment.newBuilder() to construct. + private Environment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Environment() { + name_ = ""; + displayName_ = ""; + description_ = ""; + postStartupScript_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Environment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Environment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 50: + { + com.google.cloud.notebooks.v1.VmImage.Builder subBuilder = null; + if (imageTypeCase_ == 6) { + subBuilder = ((com.google.cloud.notebooks.v1.VmImage) imageType_).toBuilder(); + } + imageType_ = + input.readMessage( + com.google.cloud.notebooks.v1.VmImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.notebooks.v1.VmImage) imageType_); + imageType_ = subBuilder.buildPartial(); + } + imageTypeCase_ = 6; + break; + } + case 58: + { + com.google.cloud.notebooks.v1.ContainerImage.Builder subBuilder = null; + if (imageTypeCase_ == 7) { + subBuilder = + ((com.google.cloud.notebooks.v1.ContainerImage) imageType_).toBuilder(); + } + imageType_ = + input.readMessage( + com.google.cloud.notebooks.v1.ContainerImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.notebooks.v1.ContainerImage) imageType_); + imageType_ = subBuilder.buildPartial(); + } + imageTypeCase_ = 7; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + postStartupScript_ = s; + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_Environment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Environment.class, + com.google.cloud.notebooks.v1.Environment.Builder.class); + } + + private int imageTypeCase_ = 0; + private java.lang.Object imageType_; + + public enum ImageTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VM_IMAGE(6), + CONTAINER_IMAGE(7), + IMAGETYPE_NOT_SET(0); + private final int value; + + private ImageTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImageTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ImageTypeCase forNumber(int value) { + switch (value) { + case 6: + return VM_IMAGE; + case 7: + return CONTAINER_IMAGE; + case 0: + return IMAGETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ImageTypeCase getImageTypeCase() { + return ImageTypeCase.forNumber(imageTypeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Name of this environment.
+   * Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of this environment.
+   * Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name of this environment for the UI.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name of this environment for the UI.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_IMAGE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return Whether the vmImage field is set. + */ + @java.lang.Override + public boolean hasVmImage() { + return imageTypeCase_ == 6; + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return The vmImage. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImage getVmImage() { + if (imageTypeCase_ == 6) { + return (com.google.cloud.notebooks.v1.VmImage) imageType_; + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() { + if (imageTypeCase_ == 6) { + return (com.google.cloud.notebooks.v1.VmImage) imageType_; + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + + public static final int CONTAINER_IMAGE_FIELD_NUMBER = 7; + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return Whether the containerImage field is set. + */ + @java.lang.Override + public boolean hasContainerImage() { + return imageTypeCase_ == 7; + } + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return The containerImage. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage getContainerImage() { + if (imageTypeCase_ == 7) { + return (com.google.cloud.notebooks.v1.ContainerImage) imageType_; + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder() { + if (imageTypeCase_ == 7) { + return (com.google.cloud.notebooks.v1.ContainerImage) imageType_; + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + + public static final int POST_STARTUP_SCRIPT_FIELD_NUMBER = 8; + private volatile java.lang.Object postStartupScript_; + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+   * 
+ * + * string post_startup_script = 8; + * + * @return The postStartupScript. + */ + @java.lang.Override + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } + } + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+   * 
+ * + * string post_startup_script = 8; + * + * @return The bytes for postStartupScript. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (imageTypeCase_ == 6) { + output.writeMessage(6, (com.google.cloud.notebooks.v1.VmImage) imageType_); + } + if (imageTypeCase_ == 7) { + output.writeMessage(7, (com.google.cloud.notebooks.v1.ContainerImage) imageType_); + } + if (!getPostStartupScriptBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, postStartupScript_); + } + if (createTime_ != null) { + output.writeMessage(9, getCreateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (imageTypeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.notebooks.v1.VmImage) imageType_); + } + if (imageTypeCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.notebooks.v1.ContainerImage) imageType_); + } + if (!getPostStartupScriptBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, postStartupScript_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Environment)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Environment other = + (com.google.cloud.notebooks.v1.Environment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getPostStartupScript().equals(other.getPostStartupScript())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getImageTypeCase().equals(other.getImageTypeCase())) return false; + switch (imageTypeCase_) { + case 6: + if (!getVmImage().equals(other.getVmImage())) return false; + break; + case 7: + if (!getContainerImage().equals(other.getContainerImage())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + POST_STARTUP_SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getPostStartupScript().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + switch (imageTypeCase_) { + case 6: + hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getVmImage().hashCode(); + break; + case 7: + hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getContainerImage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Environment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Environment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Environment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.Environment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Definition of a software environment that is used to start a notebook
+   * instance.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Environment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Environment) + com.google.cloud.notebooks.v1.EnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_Environment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Environment.class, + com.google.cloud.notebooks.v1.Environment.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Environment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + postStartupScript_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + imageTypeCase_ = 0; + imageType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_Environment_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Environment getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Environment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Environment build() { + com.google.cloud.notebooks.v1.Environment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Environment buildPartial() { + com.google.cloud.notebooks.v1.Environment result = + new com.google.cloud.notebooks.v1.Environment(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (imageTypeCase_ == 6) { + if (vmImageBuilder_ == null) { + result.imageType_ = imageType_; + } else { + result.imageType_ = vmImageBuilder_.build(); + } + } + if (imageTypeCase_ == 7) { + if (containerImageBuilder_ == null) { + result.imageType_ = imageType_; + } else { + result.imageType_ = containerImageBuilder_.build(); + } + } + result.postStartupScript_ = postStartupScript_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.imageTypeCase_ = imageTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Environment) { + return mergeFrom((com.google.cloud.notebooks.v1.Environment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Environment other) { + if (other == com.google.cloud.notebooks.v1.Environment.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getPostStartupScript().isEmpty()) { + postStartupScript_ = other.postStartupScript_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + switch (other.getImageTypeCase()) { + case VM_IMAGE: + { + mergeVmImage(other.getVmImage()); + break; + } + case CONTAINER_IMAGE: + { + mergeContainerImage(other.getContainerImage()); + break; + } + case IMAGETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Environment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.Environment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int imageTypeCase_ = 0; + private java.lang.Object imageType_; + + public ImageTypeCase getImageTypeCase() { + return ImageTypeCase.forNumber(imageTypeCase_); + } + + public Builder clearImageType() { + imageTypeCase_ = 0; + imageType_ = null; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of this environment.
+     * Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of this environment for the UI.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VmImage, + com.google.cloud.notebooks.v1.VmImage.Builder, + com.google.cloud.notebooks.v1.VmImageOrBuilder> + vmImageBuilder_; + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return Whether the vmImage field is set. + */ + @java.lang.Override + public boolean hasVmImage() { + return imageTypeCase_ == 6; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return The vmImage. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImage getVmImage() { + if (vmImageBuilder_ == null) { + if (imageTypeCase_ == 6) { + return (com.google.cloud.notebooks.v1.VmImage) imageType_; + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } else { + if (imageTypeCase_ == 6) { + return vmImageBuilder_.getMessage(); + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public Builder setVmImage(com.google.cloud.notebooks.v1.VmImage value) { + if (vmImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageType_ = value; + onChanged(); + } else { + vmImageBuilder_.setMessage(value); + } + imageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public Builder setVmImage(com.google.cloud.notebooks.v1.VmImage.Builder builderForValue) { + if (vmImageBuilder_ == null) { + imageType_ = builderForValue.build(); + onChanged(); + } else { + vmImageBuilder_.setMessage(builderForValue.build()); + } + imageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public Builder mergeVmImage(com.google.cloud.notebooks.v1.VmImage value) { + if (vmImageBuilder_ == null) { + if (imageTypeCase_ == 6 + && imageType_ != com.google.cloud.notebooks.v1.VmImage.getDefaultInstance()) { + imageType_ = + com.google.cloud.notebooks.v1.VmImage.newBuilder( + (com.google.cloud.notebooks.v1.VmImage) imageType_) + .mergeFrom(value) + .buildPartial(); + } else { + imageType_ = value; + } + onChanged(); + } else { + if (imageTypeCase_ == 6) { + vmImageBuilder_.mergeFrom(value); + } + vmImageBuilder_.setMessage(value); + } + imageTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public Builder clearVmImage() { + if (vmImageBuilder_ == null) { + if (imageTypeCase_ == 6) { + imageTypeCase_ = 0; + imageType_ = null; + onChanged(); + } + } else { + if (imageTypeCase_ == 6) { + imageTypeCase_ = 0; + imageType_ = null; + } + vmImageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + public com.google.cloud.notebooks.v1.VmImage.Builder getVmImageBuilder() { + return getVmImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() { + if ((imageTypeCase_ == 6) && (vmImageBuilder_ != null)) { + return vmImageBuilder_.getMessageOrBuilder(); + } else { + if (imageTypeCase_ == 6) { + return (com.google.cloud.notebooks.v1.VmImage) imageType_; + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VmImage, + com.google.cloud.notebooks.v1.VmImage.Builder, + com.google.cloud.notebooks.v1.VmImageOrBuilder> + getVmImageFieldBuilder() { + if (vmImageBuilder_ == null) { + if (!(imageTypeCase_ == 6)) { + imageType_ = com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + vmImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VmImage, + com.google.cloud.notebooks.v1.VmImage.Builder, + com.google.cloud.notebooks.v1.VmImageOrBuilder>( + (com.google.cloud.notebooks.v1.VmImage) imageType_, + getParentForChildren(), + isClean()); + imageType_ = null; + } + imageTypeCase_ = 6; + onChanged(); + ; + return vmImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder> + containerImageBuilder_; + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return Whether the containerImage field is set. + */ + @java.lang.Override + public boolean hasContainerImage() { + return imageTypeCase_ == 7; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return The containerImage. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage getContainerImage() { + if (containerImageBuilder_ == null) { + if (imageTypeCase_ == 7) { + return (com.google.cloud.notebooks.v1.ContainerImage) imageType_; + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } else { + if (imageTypeCase_ == 7) { + return containerImageBuilder_.getMessage(); + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public Builder setContainerImage(com.google.cloud.notebooks.v1.ContainerImage value) { + if (containerImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageType_ = value; + onChanged(); + } else { + containerImageBuilder_.setMessage(value); + } + imageTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public Builder setContainerImage( + com.google.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImageBuilder_ == null) { + imageType_ = builderForValue.build(); + onChanged(); + } else { + containerImageBuilder_.setMessage(builderForValue.build()); + } + imageTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public Builder mergeContainerImage(com.google.cloud.notebooks.v1.ContainerImage value) { + if (containerImageBuilder_ == null) { + if (imageTypeCase_ == 7 + && imageType_ != com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance()) { + imageType_ = + com.google.cloud.notebooks.v1.ContainerImage.newBuilder( + (com.google.cloud.notebooks.v1.ContainerImage) imageType_) + .mergeFrom(value) + .buildPartial(); + } else { + imageType_ = value; + } + onChanged(); + } else { + if (imageTypeCase_ == 7) { + containerImageBuilder_.mergeFrom(value); + } + containerImageBuilder_.setMessage(value); + } + imageTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public Builder clearContainerImage() { + if (containerImageBuilder_ == null) { + if (imageTypeCase_ == 7) { + imageTypeCase_ = 0; + imageType_ = null; + onChanged(); + } + } else { + if (imageTypeCase_ == 7) { + imageTypeCase_ = 0; + imageType_ = null; + } + containerImageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + public com.google.cloud.notebooks.v1.ContainerImage.Builder getContainerImageBuilder() { + return getContainerImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder() { + if ((imageTypeCase_ == 7) && (containerImageBuilder_ != null)) { + return containerImageBuilder_.getMessageOrBuilder(); + } else { + if (imageTypeCase_ == 7) { + return (com.google.cloud.notebooks.v1.ContainerImage) imageType_; + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder> + getContainerImageFieldBuilder() { + if (containerImageBuilder_ == null) { + if (!(imageTypeCase_ == 7)) { + imageType_ = com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + containerImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder>( + (com.google.cloud.notebooks.v1.ContainerImage) imageType_, + getParentForChildren(), + isClean()); + imageType_ = null; + } + imageTypeCase_ = 7; + onChanged(); + ; + return containerImageBuilder_; + } + + private java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @return The postStartupScript. + */ + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @return The bytes for postStartupScript. + */ + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @param value The postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + postStartupScript_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @return This builder for chaining. + */ + public Builder clearPostStartupScript() { + + postStartupScript_ = getDefaultInstance().getPostStartupScript(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+     * 
+ * + * string post_startup_script = 8; + * + * @param value The bytes for postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + postStartupScript_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Environment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Environment) + private static final com.google.cloud.notebooks.v1.Environment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Environment(); + } + + public static com.google.cloud.notebooks.v1.Environment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Environment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Environment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Environment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EnvironmentOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EnvironmentOrBuilder.java new file mode 100644 index 00000000..808d030a --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EnvironmentOrBuilder.java @@ -0,0 +1,243 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/environment.proto + +package com.google.cloud.notebooks.v1; + +public interface EnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Environment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of this environment.
+   * Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of this environment.
+   * Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Display name of this environment for the UI.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name of this environment for the UI.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return Whether the vmImage field is set. + */ + boolean hasVmImage(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + * + * @return The vmImage. + */ + com.google.cloud.notebooks.v1.VmImage getVmImage(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 6; + */ + com.google.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder(); + + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return Whether the containerImage field is set. + */ + boolean hasContainerImage(); + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + * + * @return The containerImage. + */ + com.google.cloud.notebooks.v1.ContainerImage getContainerImage(); + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 7; + */ + com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder(); + + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+   * 
+ * + * string post_startup_script = 8; + * + * @return The postStartupScript. + */ + java.lang.String getPostStartupScript(); + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path. Example: `"gs://path-to-file/file-name"`
+   * 
+ * + * string post_startup_script = 8; + * + * @return The bytes for postStartupScript. + */ + com.google.protobuf.ByteString getPostStartupScriptBytes(); + + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + public com.google.cloud.notebooks.v1.Environment.ImageTypeCase getImageTypeCase(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EnvironmentProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EnvironmentProto.java new file mode 100644 index 00000000..8105e395 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EnvironmentProto.java @@ -0,0 +1,126 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/environment.proto + +package com.google.cloud.notebooks.v1; + +public final class EnvironmentProto { + private EnvironmentProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Environment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Environment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_VmImage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_VmImage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ContainerImage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ContainerImage_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n+google/cloud/notebooks/v1/environment." + + "proto\022\031google.cloud.notebooks.v1\032\037google" + + "/api/field_behavior.proto\032\031google/api/re" + + "source.proto\032\037google/protobuf/timestamp." + + "proto\"\204\003\n\013Environment\022\021\n\004name\030\001 \001(\tB\003\340A\003" + + "\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003 " + + "\001(\t\0226\n\010vm_image\030\006 \001(\0132\".google.cloud.not" + + "ebooks.v1.VmImageH\000\022D\n\017container_image\030\007" + + " \001(\0132).google.cloud.notebooks.v1.Contain" + + "erImageH\000\022\033\n\023post_startup_script\030\010 \001(\t\0224" + + "\n\013create_time\030\t \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003:X\352AU\n$notebooks.googleapis." + + "com/Environment\022-projects/{project}/envi" + + "ronments/{environment}B\014\n\nimage_type\"V\n\007" + + "VmImage\022\024\n\007project\030\001 \001(\tB\003\340A\002\022\024\n\nimage_n" + + "ame\030\002 \001(\tH\000\022\026\n\014image_family\030\003 \001(\tH\000B\007\n\005i" + + "mage\"6\n\016ContainerImage\022\027\n\nrepository\030\001 \001" + + "(\tB\003\340A\002\022\013\n\003tag\030\002 \001(\tB\316\001\n\035com.google.clou" + + "d.notebooks.v1B\020EnvironmentProtoP\001ZBgoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "notebooks/v1;notebooks\252\002\031Google.Cloud.No" + + "tebooks.V1\312\002\031Google\\Cloud\\Notebooks\\V1\352\002" + + "\034Google::Cloud::Notebooks::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_notebooks_v1_Environment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_Environment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Environment_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "VmImage", + "ContainerImage", + "PostStartupScript", + "CreateTime", + "ImageType", + }); + internal_static_google_cloud_notebooks_v1_VmImage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_notebooks_v1_VmImage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_VmImage_descriptor, + new java.lang.String[] { + "Project", "ImageName", "ImageFamily", "Image", + }); + internal_static_google_cloud_notebooks_v1_ContainerImage_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_notebooks_v1_ContainerImage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ContainerImage_descriptor, + new java.lang.String[] { + "Repository", "Tag", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Event.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Event.java new file mode 100644 index 00000000..d7b75ccf --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Event.java @@ -0,0 +1,1009 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/event.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of an Event for a managed / semi-managed notebook instance.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Event} + */ +public final class Event extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Event) + EventOrBuilder { + private static final long serialVersionUID = 0L; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Event() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Event(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Event( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (reportTime_ != null) { + subBuilder = reportTime_.toBuilder(); + } + reportTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reportTime_); + reportTime_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.EventProto + .internal_static_google_cloud_notebooks_v1_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.EventProto + .internal_static_google_cloud_notebooks_v1_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Event.class, + com.google.cloud.notebooks.v1.Event.Builder.class); + } + + /** + * + * + *
+   * The definition of the even types.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Event.EventType} + */ + public enum EventType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Event is not specified.
+     * 
+ * + * EVENT_TYPE_UNSPECIFIED = 0; + */ + EVENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The instance / runtime is idle
+     * 
+ * + * IDLE = 1; + */ + IDLE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Event is not specified.
+     * 
+ * + * EVENT_TYPE_UNSPECIFIED = 0; + */ + public static final int EVENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The instance / runtime is idle
+     * 
+ * + * IDLE = 1; + */ + public static final int IDLE_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EventType forNumber(int value) { + switch (value) { + case 0: + return EVENT_TYPE_UNSPECIFIED; + case 1: + return IDLE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EventType findValueByNumber(int number) { + return EventType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Event.getDescriptor().getEnumTypes().get(0); + } + + private static final EventType[] VALUES = values(); + + public static EventType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Event.EventType) + } + + public static final int REPORT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp reportTime_; + /** + * + * + *
+   * Event report time.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 1; + * + * @return Whether the reportTime field is set. + */ + @java.lang.Override + public boolean hasReportTime() { + return reportTime_ != null; + } + /** + * + * + *
+   * Event report time.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 1; + * + * @return The reportTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReportTime() { + return reportTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : reportTime_; + } + /** + * + * + *
+   * Event report time.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReportTimeOrBuilder() { + return getReportTime(); + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+   * Event type.
+   * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Event type.
+   * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Event.EventType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Event.EventType result = + com.google.cloud.notebooks.v1.Event.EventType.valueOf(type_); + return result == null ? com.google.cloud.notebooks.v1.Event.EventType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (reportTime_ != null) { + output.writeMessage(1, getReportTime()); + } + if (type_ != com.google.cloud.notebooks.v1.Event.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (reportTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReportTime()); + } + if (type_ != com.google.cloud.notebooks.v1.Event.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Event)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Event other = (com.google.cloud.notebooks.v1.Event) obj; + + if (hasReportTime() != other.hasReportTime()) return false; + if (hasReportTime()) { + if (!getReportTime().equals(other.getReportTime())) return false; + } + if (type_ != other.type_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReportTime()) { + hash = (37 * hash) + REPORT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReportTime().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Event parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Event parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The definition of an Event for a managed / semi-managed notebook instance.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Event} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Event) + com.google.cloud.notebooks.v1.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.EventProto + .internal_static_google_cloud_notebooks_v1_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.EventProto + .internal_static_google_cloud_notebooks_v1_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Event.class, + com.google.cloud.notebooks.v1.Event.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (reportTimeBuilder_ == null) { + reportTime_ = null; + } else { + reportTime_ = null; + reportTimeBuilder_ = null; + } + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.EventProto + .internal_static_google_cloud_notebooks_v1_Event_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Event getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Event.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Event build() { + com.google.cloud.notebooks.v1.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Event buildPartial() { + com.google.cloud.notebooks.v1.Event result = new com.google.cloud.notebooks.v1.Event(this); + if (reportTimeBuilder_ == null) { + result.reportTime_ = reportTime_; + } else { + result.reportTime_ = reportTimeBuilder_.build(); + } + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Event) { + return mergeFrom((com.google.cloud.notebooks.v1.Event) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Event other) { + if (other == com.google.cloud.notebooks.v1.Event.getDefaultInstance()) return this; + if (other.hasReportTime()) { + mergeReportTime(other.getReportTime()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Event parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.Event) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp reportTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + reportTimeBuilder_; + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + * + * @return Whether the reportTime field is set. + */ + public boolean hasReportTime() { + return reportTimeBuilder_ != null || reportTime_ != null; + } + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + * + * @return The reportTime. + */ + public com.google.protobuf.Timestamp getReportTime() { + if (reportTimeBuilder_ == null) { + return reportTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : reportTime_; + } else { + return reportTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + public Builder setReportTime(com.google.protobuf.Timestamp value) { + if (reportTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reportTime_ = value; + onChanged(); + } else { + reportTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + public Builder setReportTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (reportTimeBuilder_ == null) { + reportTime_ = builderForValue.build(); + onChanged(); + } else { + reportTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + public Builder mergeReportTime(com.google.protobuf.Timestamp value) { + if (reportTimeBuilder_ == null) { + if (reportTime_ != null) { + reportTime_ = + com.google.protobuf.Timestamp.newBuilder(reportTime_).mergeFrom(value).buildPartial(); + } else { + reportTime_ = value; + } + onChanged(); + } else { + reportTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + public Builder clearReportTime() { + if (reportTimeBuilder_ == null) { + reportTime_ = null; + onChanged(); + } else { + reportTime_ = null; + reportTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getReportTimeBuilder() { + + onChanged(); + return getReportTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getReportTimeOrBuilder() { + if (reportTimeBuilder_ != null) { + return reportTimeBuilder_.getMessageOrBuilder(); + } else { + return reportTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : reportTime_; + } + } + /** + * + * + *
+     * Event report time.
+     * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getReportTimeFieldBuilder() { + if (reportTimeBuilder_ == null) { + reportTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getReportTime(), getParentForChildren(), isClean()); + reportTime_ = null; + } + return reportTimeBuilder_; + } + + private int type_ = 0; + /** + * + * + *
+     * Event type.
+     * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Event type.
+     * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Event type.
+     * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Event.EventType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Event.EventType result = + com.google.cloud.notebooks.v1.Event.EventType.valueOf(type_); + return result == null ? com.google.cloud.notebooks.v1.Event.EventType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Event type.
+     * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.notebooks.v1.Event.EventType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Event type.
+     * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Event) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Event) + private static final com.google.cloud.notebooks.v1.Event DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Event(); + } + + public static com.google.cloud.notebooks.v1.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Event(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EventOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EventOrBuilder.java new file mode 100644 index 00000000..ad0f664d --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EventOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/event.proto + +package com.google.cloud.notebooks.v1; + +public interface EventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Event) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Event report time.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 1; + * + * @return Whether the reportTime field is set. + */ + boolean hasReportTime(); + /** + * + * + *
+   * Event report time.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 1; + * + * @return The reportTime. + */ + com.google.protobuf.Timestamp getReportTime(); + /** + * + * + *
+   * Event report time.
+   * 
+ * + * .google.protobuf.Timestamp report_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getReportTimeOrBuilder(); + + /** + * + * + *
+   * Event type.
+   * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Event type.
+   * 
+ * + * .google.cloud.notebooks.v1.Event.EventType type = 2; + * + * @return The type. + */ + com.google.cloud.notebooks.v1.Event.EventType getType(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EventProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EventProto.java new file mode 100644 index 00000000..6144dea3 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/EventProto.java @@ -0,0 +1,72 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/event.proto + +package com.google.cloud.notebooks.v1; + +public final class EventProto { + private EventProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Event_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Event_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n%google/cloud/notebooks/v1/event.proto\022" + + "\031google.cloud.notebooks.v1\032\037google/proto" + + "buf/timestamp.proto\"\245\001\n\005Event\022/\n\013report_" + + "time\030\001 \001(\0132\032.google.protobuf.Timestamp\0228" + + "\n\004type\030\002 \001(\0162*.google.cloud.notebooks.v1" + + ".Event.EventType\"1\n\tEventType\022\032\n\026EVENT_T" + + "YPE_UNSPECIFIED\020\000\022\010\n\004IDLE\020\001Bq\n\035com.googl" + + "e.cloud.notebooks.v1B\nEventProtoP\001ZBgoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "notebooks/v1;notebooksb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_notebooks_v1_Event_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_Event_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Event_descriptor, + new java.lang.String[] { + "ReportTime", "Type", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Execution.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Execution.java new file mode 100644 index 00000000..08c9fe71 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Execution.java @@ -0,0 +1,2711 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/execution.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of a single executed notebook.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Execution} + */ +public final class Execution extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Execution) + ExecutionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Execution.newBuilder() to construct. + private Execution(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Execution() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + outputNotebookFile_ = ""; + jobUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Execution(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Execution( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder subBuilder = null; + if (executionTemplate_ != null) { + subBuilder = executionTemplate_.toBuilder(); + } + executionTemplate_ = + input.readMessage( + com.google.cloud.notebooks.v1.ExecutionTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(executionTemplate_); + executionTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 56: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputNotebookFile_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + jobUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_Execution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_Execution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Execution.class, + com.google.cloud.notebooks.v1.Execution.Builder.class); + } + + /** + * + * + *
+   * Enum description of the state of the underlying AIP job.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Execution.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The job state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The job has been just created and processing has not yet begun.
+     * 
+ * + * QUEUED = 1; + */ + QUEUED(1), + /** + * + * + *
+     * The service is preparing to execution the job.
+     * 
+ * + * PREPARING = 2; + */ + PREPARING(2), + /** + * + * + *
+     * The job is in progress.
+     * 
+ * + * RUNNING = 3; + */ + RUNNING(3), + /** + * + * + *
+     * The job completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + /** + * + * + *
+     * The job failed.
+     * `error_message` should contain the details of the failure.
+     * 
+ * + * FAILED = 5; + */ + FAILED(5), + /** + * + * + *
+     * The job is being cancelled.
+     * `error_message` should describe the reason for the cancellation.
+     * 
+ * + * CANCELLING = 6; + */ + CANCELLING(6), + /** + * + * + *
+     * The job has been cancelled.
+     * `error_message` should describe the reason for the cancellation.
+     * 
+ * + * CANCELLED = 7; + */ + CANCELLED(7), + /** + * + * + *
+     * The jobs has become expired (added for uCAIP jobs)
+     * https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState
+     * 
+ * + * EXPIRED = 9; + */ + EXPIRED(9), + /** + * + * + *
+     * The Execution is being created.
+     * 
+ * + * INITIALIZING = 10; + */ + INITIALIZING(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The job state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The job has been just created and processing has not yet begun.
+     * 
+ * + * QUEUED = 1; + */ + public static final int QUEUED_VALUE = 1; + /** + * + * + *
+     * The service is preparing to execution the job.
+     * 
+ * + * PREPARING = 2; + */ + public static final int PREPARING_VALUE = 2; + /** + * + * + *
+     * The job is in progress.
+     * 
+ * + * RUNNING = 3; + */ + public static final int RUNNING_VALUE = 3; + /** + * + * + *
+     * The job completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + /** + * + * + *
+     * The job failed.
+     * `error_message` should contain the details of the failure.
+     * 
+ * + * FAILED = 5; + */ + public static final int FAILED_VALUE = 5; + /** + * + * + *
+     * The job is being cancelled.
+     * `error_message` should describe the reason for the cancellation.
+     * 
+ * + * CANCELLING = 6; + */ + public static final int CANCELLING_VALUE = 6; + /** + * + * + *
+     * The job has been cancelled.
+     * `error_message` should describe the reason for the cancellation.
+     * 
+ * + * CANCELLED = 7; + */ + public static final int CANCELLED_VALUE = 7; + /** + * + * + *
+     * The jobs has become expired (added for uCAIP jobs)
+     * https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState
+     * 
+ * + * EXPIRED = 9; + */ + public static final int EXPIRED_VALUE = 9; + /** + * + * + *
+     * The Execution is being created.
+     * 
+ * + * INITIALIZING = 10; + */ + public static final int INITIALIZING_VALUE = 10; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return QUEUED; + case 2: + return PREPARING; + case 3: + return RUNNING; + case 4: + return SUCCEEDED; + case 5: + return FAILED; + case 6: + return CANCELLING; + case 7: + return CANCELLED; + case 9: + return EXPIRED; + case 10: + return INITIALIZING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Execution.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Execution.State) + } + + public static final int EXECUTION_TEMPLATE_FIELD_NUMBER = 1; + private com.google.cloud.notebooks.v1.ExecutionTemplate executionTemplate_; + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return Whether the executionTemplate field is set. + */ + @java.lang.Override + public boolean hasExecutionTemplate() { + return executionTemplate_ != null; + } + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return The executionTemplate. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate() { + return executionTemplate_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder getExecutionTemplateOrBuilder() { + return getExecutionTemplate(); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the execute. Format:
+   * `projects/{project_id}/locations/{location}/execution/{execution_id}
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the execute. Format:
+   * `projects/{project_id}/locations/{location}/execution/{execution_id}
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Output only. Name used for UI purposes.
+   * Name can only contain alphanumeric characters and underscores '_'.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name used for UI purposes.
+   * Name can only contain alphanumeric characters and underscores '_'.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A brief description of this execution.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A brief description of this execution.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_; + /** + * + * + *
+   * Output only. State of the underlying AI Platform job.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. State of the underlying AI Platform job.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Execution.State result = + com.google.cloud.notebooks.v1.Execution.State.valueOf(state_); + return result == null ? com.google.cloud.notebooks.v1.Execution.State.UNRECOGNIZED : result; + } + + public static final int OUTPUT_NOTEBOOK_FILE_FIELD_NUMBER = 8; + private volatile java.lang.Object outputNotebookFile_; + /** + * + * + *
+   * Output notebook file generated by this execution
+   * 
+ * + * string output_notebook_file = 8; + * + * @return The outputNotebookFile. + */ + @java.lang.Override + public java.lang.String getOutputNotebookFile() { + java.lang.Object ref = outputNotebookFile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputNotebookFile_ = s; + return s; + } + } + /** + * + * + *
+   * Output notebook file generated by this execution
+   * 
+ * + * string output_notebook_file = 8; + * + * @return The bytes for outputNotebookFile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputNotebookFileBytes() { + java.lang.Object ref = outputNotebookFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputNotebookFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_URI_FIELD_NUMBER = 9; + private volatile java.lang.Object jobUri_; + /** + * + * + *
+   * Output only. The URI of the external job used to execute the notebook.
+   * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The jobUri. + */ + @java.lang.Override + public java.lang.String getJobUri() { + java.lang.Object ref = jobUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The URI of the external job used to execute the notebook.
+   * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for jobUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobUriBytes() { + java.lang.Object ref = jobUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (executionTemplate_ != null) { + output.writeMessage(1, getExecutionTemplate()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (state_ != com.google.cloud.notebooks.v1.Execution.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (!getOutputNotebookFileBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, outputNotebookFile_); + } + if (!getJobUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, jobUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (executionTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExecutionTemplate()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (state_ != com.google.cloud.notebooks.v1.Execution.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (!getOutputNotebookFileBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, outputNotebookFile_); + } + if (!getJobUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, jobUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Execution)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Execution other = (com.google.cloud.notebooks.v1.Execution) obj; + + if (hasExecutionTemplate() != other.hasExecutionTemplate()) return false; + if (hasExecutionTemplate()) { + if (!getExecutionTemplate().equals(other.getExecutionTemplate())) return false; + } + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getOutputNotebookFile().equals(other.getOutputNotebookFile())) return false; + if (!getJobUri().equals(other.getJobUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExecutionTemplate()) { + hash = (37 * hash) + EXECUTION_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTemplate().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + OUTPUT_NOTEBOOK_FILE_FIELD_NUMBER; + hash = (53 * hash) + getOutputNotebookFile().hashCode(); + hash = (37 * hash) + JOB_URI_FIELD_NUMBER; + hash = (53 * hash) + getJobUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Execution parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Execution parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Execution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.Execution prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The definition of a single executed notebook.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Execution} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Execution) + com.google.cloud.notebooks.v1.ExecutionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_Execution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_Execution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Execution.class, + com.google.cloud.notebooks.v1.Execution.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Execution.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (executionTemplateBuilder_ == null) { + executionTemplate_ = null; + } else { + executionTemplate_ = null; + executionTemplateBuilder_ = null; + } + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + state_ = 0; + + outputNotebookFile_ = ""; + + jobUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_Execution_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Execution.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution build() { + com.google.cloud.notebooks.v1.Execution result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution buildPartial() { + com.google.cloud.notebooks.v1.Execution result = + new com.google.cloud.notebooks.v1.Execution(this); + if (executionTemplateBuilder_ == null) { + result.executionTemplate_ = executionTemplate_; + } else { + result.executionTemplate_ = executionTemplateBuilder_.build(); + } + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.state_ = state_; + result.outputNotebookFile_ = outputNotebookFile_; + result.jobUri_ = jobUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Execution) { + return mergeFrom((com.google.cloud.notebooks.v1.Execution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Execution other) { + if (other == com.google.cloud.notebooks.v1.Execution.getDefaultInstance()) return this; + if (other.hasExecutionTemplate()) { + mergeExecutionTemplate(other.getExecutionTemplate()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getOutputNotebookFile().isEmpty()) { + outputNotebookFile_ = other.outputNotebookFile_; + onChanged(); + } + if (!other.getJobUri().isEmpty()) { + jobUri_ = other.jobUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Execution parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.Execution) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.notebooks.v1.ExecutionTemplate executionTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate, + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder> + executionTemplateBuilder_; + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return Whether the executionTemplate field is set. + */ + public boolean hasExecutionTemplate() { + return executionTemplateBuilder_ != null || executionTemplate_ != null; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return The executionTemplate. + */ + public com.google.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate() { + if (executionTemplateBuilder_ == null) { + return executionTemplate_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } else { + return executionTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public Builder setExecutionTemplate(com.google.cloud.notebooks.v1.ExecutionTemplate value) { + if (executionTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionTemplate_ = value; + onChanged(); + } else { + executionTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public Builder setExecutionTemplate( + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder builderForValue) { + if (executionTemplateBuilder_ == null) { + executionTemplate_ = builderForValue.build(); + onChanged(); + } else { + executionTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public Builder mergeExecutionTemplate(com.google.cloud.notebooks.v1.ExecutionTemplate value) { + if (executionTemplateBuilder_ == null) { + if (executionTemplate_ != null) { + executionTemplate_ = + com.google.cloud.notebooks.v1.ExecutionTemplate.newBuilder(executionTemplate_) + .mergeFrom(value) + .buildPartial(); + } else { + executionTemplate_ = value; + } + onChanged(); + } else { + executionTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public Builder clearExecutionTemplate() { + if (executionTemplateBuilder_ == null) { + executionTemplate_ = null; + onChanged(); + } else { + executionTemplate_ = null; + executionTemplateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public com.google.cloud.notebooks.v1.ExecutionTemplate.Builder getExecutionTemplateBuilder() { + + onChanged(); + return getExecutionTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + public com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder + getExecutionTemplateOrBuilder() { + if (executionTemplateBuilder_ != null) { + return executionTemplateBuilder_.getMessageOrBuilder(); + } else { + return executionTemplate_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + } + /** + * + * + *
+     * execute metadata including name, hardware spec, region, labels, etc.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate, + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder> + getExecutionTemplateFieldBuilder() { + if (executionTemplateBuilder_ == null) { + executionTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate, + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder>( + getExecutionTemplate(), getParentForChildren(), isClean()); + executionTemplate_ = null; + } + return executionTemplateBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/execution/{execution_id}
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/execution/{execution_id}
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/execution/{execution_id}
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/execution/{execution_id}
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the execute. Format:
+     * `projects/{project_id}/locations/{location}/execution/{execution_id}
+     * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name used for UI purposes.
+     * Name can only contain alphanumeric characters and underscores '_'.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this execution.
+     * 
+ * + * string description = 4; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time the Execution was instantiated.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time the Execution was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Execution.State result = + com.google.cloud.notebooks.v1.Execution.State.valueOf(state_); + return result == null ? com.google.cloud.notebooks.v1.Execution.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.notebooks.v1.Execution.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the underlying AI Platform job.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object outputNotebookFile_ = ""; + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @return The outputNotebookFile. + */ + public java.lang.String getOutputNotebookFile() { + java.lang.Object ref = outputNotebookFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputNotebookFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @return The bytes for outputNotebookFile. + */ + public com.google.protobuf.ByteString getOutputNotebookFileBytes() { + java.lang.Object ref = outputNotebookFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputNotebookFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @param value The outputNotebookFile to set. + * @return This builder for chaining. + */ + public Builder setOutputNotebookFile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputNotebookFile_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @return This builder for chaining. + */ + public Builder clearOutputNotebookFile() { + + outputNotebookFile_ = getDefaultInstance().getOutputNotebookFile(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output notebook file generated by this execution
+     * 
+ * + * string output_notebook_file = 8; + * + * @param value The bytes for outputNotebookFile to set. + * @return This builder for chaining. + */ + public Builder setOutputNotebookFileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputNotebookFile_ = value; + onChanged(); + return this; + } + + private java.lang.Object jobUri_ = ""; + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The jobUri. + */ + public java.lang.String getJobUri() { + java.lang.Object ref = jobUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for jobUri. + */ + public com.google.protobuf.ByteString getJobUriBytes() { + java.lang.Object ref = jobUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The jobUri to set. + * @return This builder for chaining. + */ + public Builder setJobUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearJobUri() { + + jobUri_ = getDefaultInstance().getJobUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the external job used to execute the notebook.
+     * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for jobUri to set. + * @return This builder for chaining. + */ + public Builder setJobUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Execution) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Execution) + private static final com.google.cloud.notebooks.v1.Execution DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Execution(); + } + + public static com.google.cloud.notebooks.v1.Execution getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Execution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Execution(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionName.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionName.java new file mode 100644 index 00000000..2d32973d --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ExecutionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_EXECUTION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/location/{location}/executions/{execution}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String execution; + + @Deprecated + protected ExecutionName() { + project = null; + location = null; + execution = null; + } + + private ExecutionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + execution = Preconditions.checkNotNull(builder.getExecution()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getExecution() { + return execution; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ExecutionName of(String project, String location, String execution) { + return newBuilder().setProject(project).setLocation(location).setExecution(execution).build(); + } + + public static String format(String project, String location, String execution) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setExecution(execution) + .build() + .toString(); + } + + public static ExecutionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_EXECUTION.validatedMatch( + formattedString, "ExecutionName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("execution")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ExecutionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_EXECUTION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (execution != null) { + fieldMapBuilder.put("execution", execution); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_EXECUTION.instantiate( + "project", project, "location", location, "execution", execution); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ExecutionName that = ((ExecutionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.execution, that.execution); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(execution); + return h; + } + + /** Builder for projects/{project}/location/{location}/executions/{execution}. */ + public static class Builder { + private String project; + private String location; + private String execution; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getExecution() { + return execution; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setExecution(String execution) { + this.execution = execution; + return this; + } + + private Builder(ExecutionName executionName) { + this.project = executionName.project; + this.location = executionName.location; + this.execution = executionName.execution; + } + + public ExecutionName build() { + return new ExecutionName(this); + } + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionOrBuilder.java new file mode 100644 index 00000000..1fbf4964 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionOrBuilder.java @@ -0,0 +1,294 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/execution.proto + +package com.google.cloud.notebooks.v1; + +public interface ExecutionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Execution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return Whether the executionTemplate field is set. + */ + boolean hasExecutionTemplate(); + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * + * @return The executionTemplate. + */ + com.google.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate(); + /** + * + * + *
+   * execute metadata including name, hardware spec, region, labels, etc.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder getExecutionTemplateOrBuilder(); + + /** + * + * + *
+   * Output only. The resource name of the execute. Format:
+   * `projects/{project_id}/locations/{location}/execution/{execution_id}
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the execute. Format:
+   * `projects/{project_id}/locations/{location}/execution/{execution_id}
+   * 
+ * + * string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Name used for UI purposes.
+   * Name can only contain alphanumeric characters and underscores '_'.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. Name used for UI purposes.
+   * Name can only contain alphanumeric characters and underscores '_'.
+   * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A brief description of this execution.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A brief description of this execution.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the Execution was instantiated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time the Execution was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. State of the underlying AI Platform job.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. State of the underlying AI Platform job.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.notebooks.v1.Execution.State getState(); + + /** + * + * + *
+   * Output notebook file generated by this execution
+   * 
+ * + * string output_notebook_file = 8; + * + * @return The outputNotebookFile. + */ + java.lang.String getOutputNotebookFile(); + /** + * + * + *
+   * Output notebook file generated by this execution
+   * 
+ * + * string output_notebook_file = 8; + * + * @return The bytes for outputNotebookFile. + */ + com.google.protobuf.ByteString getOutputNotebookFileBytes(); + + /** + * + * + *
+   * Output only. The URI of the external job used to execute the notebook.
+   * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The jobUri. + */ + java.lang.String getJobUri(); + /** + * + * + *
+   * Output only. The URI of the external job used to execute the notebook.
+   * 
+ * + * string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for jobUri. + */ + com.google.protobuf.ByteString getJobUriBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionProto.java new file mode 100644 index 00000000..f32a90ae --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionProto.java @@ -0,0 +1,202 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/execution.proto + +package com.google.cloud.notebooks.v1; + +public final class ExecutionProto { + private ExecutionProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Execution_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Execution_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/notebooks/v1/execution.pr" + + "oto\022\031google.cloud.notebooks.v1\032\037google/a" + + "pi/field_behavior.proto\032\031google/api/reso" + + "urce.proto\032\037google/protobuf/timestamp.pr" + + "oto\"\361\t\n\021ExecutionTemplate\022Q\n\nscale_tier\030" + + "\001 \001(\01626.google.cloud.notebooks.v1.Execut" + + "ionTemplate.ScaleTierB\005\030\001\340A\002\022\023\n\013master_t" + + "ype\030\002 \001(\t\022c\n\022accelerator_config\030\003 \001(\0132G." + + "google.cloud.notebooks.v1.ExecutionTempl" + + "ate.SchedulerAcceleratorConfig\022H\n\006labels" + + "\030\004 \003(\01328.google.cloud.notebooks.v1.Execu" + + "tionTemplate.LabelsEntry\022\033\n\023input_notebo" + + "ok_file\030\005 \001(\t\022\033\n\023container_image_uri\030\006 \001" + + "(\t\022\036\n\026output_notebook_folder\030\007 \001(\t\022\030\n\020pa" + + "rams_yaml_file\030\010 \001(\t\022\022\n\nparameters\030\t \001(\t" + + "\022\027\n\017service_account\030\n \001(\t\022F\n\010job_type\030\013 " + + "\001(\01624.google.cloud.notebooks.v1.Executio" + + "nTemplate.JobType\022^\n\023dataproc_parameters" + + "\030\014 \001(\0132?.google.cloud.notebooks.v1.Execu" + + "tionTemplate.DataprocParametersH\000\032\205\001\n\032Sc" + + "hedulerAcceleratorConfig\022S\n\004type\030\001 \001(\0162E" + + ".google.cloud.notebooks.v1.ExecutionTemp" + + "late.SchedulerAcceleratorType\022\022\n\ncore_co" + + "unt\030\002 \001(\003\032%\n\022DataprocParameters\022\017\n\007clust" + + "er\030\001 \001(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001\"{\n\tScaleTier\022\032\n\026SCALE_TI" + + "ER_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\016\n\nSTANDARD_" + + "1\020\002\022\r\n\tPREMIUM_1\020\003\022\r\n\tBASIC_GPU\020\004\022\r\n\tBAS" + + "IC_TPU\020\005\022\n\n\006CUSTOM\020\006\"\314\001\n\030SchedulerAccele" + + "ratorType\022*\n&SCHEDULER_ACCELERATOR_TYPE_" + + "UNSPECIFIED\020\000\022\024\n\020NVIDIA_TESLA_K80\020\001\022\025\n\021N" + + "VIDIA_TESLA_P100\020\002\022\025\n\021NVIDIA_TESLA_V100\020" + + "\003\022\023\n\017NVIDIA_TESLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T" + + "4\020\005\022\n\n\006TPU_V2\020\006\022\n\n\006TPU_V3\020\007\"@\n\007JobType\022\030" + + "\n\024JOB_TYPE_UNSPECIFIED\020\000\022\r\n\tVERTEX_AI\020\001\022" + + "\014\n\010DATAPROC\020\002B\020\n\016job_parameters\"\202\005\n\tExec" + + "ution\022H\n\022execution_template\030\001 \001(\0132,.goog" + + "le.cloud.notebooks.v1.ExecutionTemplate\022" + + "\021\n\004name\030\002 \001(\tB\003\340A\003\022\031\n\014display_name\030\003 \001(\t" + + "B\003\340A\003\022\023\n\013description\030\004 \001(\t\0224\n\013create_tim" + + "e\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\0224\n\013update_time\030\006 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\022>\n\005state\030\007 \001(\0162*.google.c" + + "loud.notebooks.v1.Execution.StateB\003\340A\003\022\034" + + "\n\024output_notebook_file\030\010 \001(\t\022\024\n\007job_uri\030" + + "\t \001(\tB\003\340A\003\"\237\001\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\n\n\006QUEUED\020\001\022\r\n\tPREPARING\020\002\022\013\n\007RUNNIN" + + "G\020\003\022\r\n\tSUCCEEDED\020\004\022\n\n\006FAILED\020\005\022\016\n\nCANCEL" + + "LING\020\006\022\r\n\tCANCELLED\020\007\022\013\n\007EXPIRED\020\t\022\020\n\014IN" + + "ITIALIZING\020\n:f\352Ac\n\"notebooks.googleapis." + + "com/Execution\022=projects/{project}/locati" + + "on/{location}/executions/{execution}Bu\n\035" + + "com.google.cloud.notebooks.v1B\016Execution" + + "ProtoP\001ZBgoogle.golang.org/genproto/goog" + + "leapis/cloud/notebooks/v1;notebooksb\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor, + new java.lang.String[] { + "ScaleTier", + "MasterType", + "AcceleratorConfig", + "Labels", + "InputNotebookFile", + "ContainerImageUri", + "OutputNotebookFolder", + "ParamsYamlFile", + "Parameters", + "ServiceAccount", + "JobType", + "DataprocParameters", + "JobParameters", + }); + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor = + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor, + new java.lang.String[] { + "Type", "CoreCount", + }); + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor = + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor, + new java.lang.String[] { + "Cluster", + }); + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_descriptor = + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_Execution_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_notebooks_v1_Execution_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Execution_descriptor, + new java.lang.String[] { + "ExecutionTemplate", + "Name", + "DisplayName", + "Description", + "CreateTime", + "UpdateTime", + "State", + "OutputNotebookFile", + "JobUri", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionTemplate.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionTemplate.java new file mode 100644 index 00000000..8dbb4a2d --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionTemplate.java @@ -0,0 +1,5720 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/execution.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * The description a notebook execution workload.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ExecutionTemplate} + */ +public final class ExecutionTemplate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ExecutionTemplate) + ExecutionTemplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecutionTemplate.newBuilder() to construct. + private ExecutionTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecutionTemplate() { + scaleTier_ = 0; + masterType_ = ""; + inputNotebookFile_ = ""; + containerImageUri_ = ""; + outputNotebookFolder_ = ""; + paramsYamlFile_ = ""; + parameters_ = ""; + serviceAccount_ = ""; + jobType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecutionTemplate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecutionTemplate( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + scaleTier_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + masterType_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder + subBuilder = null; + if (acceleratorConfig_ != null) { + subBuilder = acceleratorConfig_.toBuilder(); + } + acceleratorConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(acceleratorConfig_); + acceleratorConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputNotebookFile_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + containerImageUri_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputNotebookFolder_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + paramsYamlFile_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + parameters_ = s; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 88: + { + int rawValue = input.readEnum(); + + jobType_ = rawValue; + break; + } + case 98: + { + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder + subBuilder = null; + if (jobParametersCase_ == 12) { + subBuilder = + ((com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_) + .toBuilder(); + } + jobParameters_ = + input.readMessage( + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_); + jobParameters_ = subBuilder.buildPartial(); + } + jobParametersCase_ = 12; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ExecutionTemplate.class, + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder.class); + } + + /** + * + * + *
+   * Required. Specifies the machine types, the number of replicas for workers
+   * and parameter servers.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier} + */ + public enum ScaleTier implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified Scale Tier.
+     * 
+ * + * SCALE_TIER_UNSPECIFIED = 0; + */ + SCALE_TIER_UNSPECIFIED(0), + /** + * + * + *
+     * A single worker instance. This tier is suitable for learning how to use
+     * Cloud ML, and for experimenting with new models using small datasets.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Many workers and a few parameter servers.
+     * 
+ * + * STANDARD_1 = 2; + */ + STANDARD_1(2), + /** + * + * + *
+     * A large number of workers with many parameter servers.
+     * 
+ * + * PREMIUM_1 = 3; + */ + PREMIUM_1(3), + /** + * + * + *
+     * A single worker instance with a K80 GPU.
+     * 
+ * + * BASIC_GPU = 4; + */ + BASIC_GPU(4), + /** + * + * + *
+     * A single worker instance with a Cloud TPU.
+     * 
+ * + * BASIC_TPU = 5; + */ + BASIC_TPU(5), + /** + * + * + *
+     * The CUSTOM tier is not a set tier, but rather enables you to use your
+     * own cluster specification. When you use this tier, set values to
+     * configure your processing cluster according to these guidelines:
+     * *   You _must_ set `TrainingInput.masterType` to specify the type
+     *     of machine to use for your master node. This is the only required
+     *     setting.
+     * *   You _may_ set `TrainingInput.workerCount` to specify the number of
+     *     workers to use. If you specify one or more workers, you _must_ also
+     *     set `TrainingInput.workerType` to specify the type of machine to use
+     *     for your worker nodes.
+     * *   You _may_ set `TrainingInput.parameterServerCount` to specify the
+     *     number of parameter servers to use. If you specify one or more
+     *     parameter servers, you _must_ also set
+     *     `TrainingInput.parameterServerType` to specify the type of machine to
+     *     use for your parameter servers.
+     * Note that all of your workers must use the same machine type, which can
+     * be different from your parameter server type and master type. Your
+     * parameter servers must likewise use the same machine type, which can be
+     * different from your worker type and master type.
+     * 
+ * + * CUSTOM = 6; + */ + CUSTOM(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified Scale Tier.
+     * 
+ * + * SCALE_TIER_UNSPECIFIED = 0; + */ + public static final int SCALE_TIER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A single worker instance. This tier is suitable for learning how to use
+     * Cloud ML, and for experimenting with new models using small datasets.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+     * Many workers and a few parameter servers.
+     * 
+ * + * STANDARD_1 = 2; + */ + public static final int STANDARD_1_VALUE = 2; + /** + * + * + *
+     * A large number of workers with many parameter servers.
+     * 
+ * + * PREMIUM_1 = 3; + */ + public static final int PREMIUM_1_VALUE = 3; + /** + * + * + *
+     * A single worker instance with a K80 GPU.
+     * 
+ * + * BASIC_GPU = 4; + */ + public static final int BASIC_GPU_VALUE = 4; + /** + * + * + *
+     * A single worker instance with a Cloud TPU.
+     * 
+ * + * BASIC_TPU = 5; + */ + public static final int BASIC_TPU_VALUE = 5; + /** + * + * + *
+     * The CUSTOM tier is not a set tier, but rather enables you to use your
+     * own cluster specification. When you use this tier, set values to
+     * configure your processing cluster according to these guidelines:
+     * *   You _must_ set `TrainingInput.masterType` to specify the type
+     *     of machine to use for your master node. This is the only required
+     *     setting.
+     * *   You _may_ set `TrainingInput.workerCount` to specify the number of
+     *     workers to use. If you specify one or more workers, you _must_ also
+     *     set `TrainingInput.workerType` to specify the type of machine to use
+     *     for your worker nodes.
+     * *   You _may_ set `TrainingInput.parameterServerCount` to specify the
+     *     number of parameter servers to use. If you specify one or more
+     *     parameter servers, you _must_ also set
+     *     `TrainingInput.parameterServerType` to specify the type of machine to
+     *     use for your parameter servers.
+     * Note that all of your workers must use the same machine type, which can
+     * be different from your parameter server type and master type. Your
+     * parameter servers must likewise use the same machine type, which can be
+     * different from your worker type and master type.
+     * 
+ * + * CUSTOM = 6; + */ + public static final int CUSTOM_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ScaleTier valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ScaleTier forNumber(int value) { + switch (value) { + case 0: + return SCALE_TIER_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return STANDARD_1; + case 3: + return PREMIUM_1; + case 4: + return BASIC_GPU; + case 5: + return BASIC_TPU; + case 6: + return CUSTOM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ScaleTier findValueByNumber(int number) { + return ScaleTier.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionTemplate.getDescriptor().getEnumTypes().get(0); + } + + private static final ScaleTier[] VALUES = values(); + + public static ScaleTier valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ScaleTier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier) + } + + /** + * + * + *
+   * Hardware accelerator types for AI Platform Training jobs.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType} + */ + public enum SchedulerAcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified accelerator type. Default to no GPU.
+     * 
+ * + * SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Nvidia Tesla K80 GPU.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + NVIDIA_TESLA_K80(1), + /** + * + * + *
+     * Nvidia Tesla P100 GPU.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + NVIDIA_TESLA_P100(2), + /** + * + * + *
+     * Nvidia Tesla V100 GPU.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + NVIDIA_TESLA_V100(3), + /** + * + * + *
+     * Nvidia Tesla P4 GPU.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + NVIDIA_TESLA_P4(4), + /** + * + * + *
+     * Nvidia Tesla T4 GPU.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + NVIDIA_TESLA_T4(5), + /** + * + * + *
+     * TPU v2.
+     * 
+ * + * TPU_V2 = 6; + */ + TPU_V2(6), + /** + * + * + *
+     * TPU v3.
+     * 
+ * + * TPU_V3 = 7; + */ + TPU_V3(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified accelerator type. Default to no GPU.
+     * 
+ * + * SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Nvidia Tesla K80 GPU.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + public static final int NVIDIA_TESLA_K80_VALUE = 1; + /** + * + * + *
+     * Nvidia Tesla P100 GPU.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + public static final int NVIDIA_TESLA_P100_VALUE = 2; + /** + * + * + *
+     * Nvidia Tesla V100 GPU.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + public static final int NVIDIA_TESLA_V100_VALUE = 3; + /** + * + * + *
+     * Nvidia Tesla P4 GPU.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + public static final int NVIDIA_TESLA_P4_VALUE = 4; + /** + * + * + *
+     * Nvidia Tesla T4 GPU.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + public static final int NVIDIA_TESLA_T4_VALUE = 5; + /** + * + * + *
+     * TPU v2.
+     * 
+ * + * TPU_V2 = 6; + */ + public static final int TPU_V2_VALUE = 6; + /** + * + * + *
+     * TPU v3.
+     * 
+ * + * TPU_V3 = 7; + */ + public static final int TPU_V3_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SchedulerAcceleratorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SchedulerAcceleratorType forNumber(int value) { + switch (value) { + case 0: + return SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return NVIDIA_TESLA_K80; + case 2: + return NVIDIA_TESLA_P100; + case 3: + return NVIDIA_TESLA_V100; + case 4: + return NVIDIA_TESLA_P4; + case 5: + return NVIDIA_TESLA_T4; + case 6: + return TPU_V2; + case 7: + return TPU_V3; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SchedulerAcceleratorType findValueByNumber(int number) { + return SchedulerAcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionTemplate.getDescriptor().getEnumTypes().get(1); + } + + private static final SchedulerAcceleratorType[] VALUES = values(); + + public static SchedulerAcceleratorType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SchedulerAcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType) + } + + /** + * + * + *
+   * The backend used for this execution.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.ExecutionTemplate.JobType} + */ + public enum JobType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No type specified.
+     * 
+ * + * JOB_TYPE_UNSPECIFIED = 0; + */ + JOB_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Custom Job in `aiplatform.googleapis.com`.
+     * Default value for an execution.
+     * 
+ * + * VERTEX_AI = 1; + */ + VERTEX_AI(1), + /** + * + * + *
+     * Run execution on a cluster with Dataproc as a job.
+     * https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs
+     * 
+ * + * DATAPROC = 2; + */ + DATAPROC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No type specified.
+     * 
+ * + * JOB_TYPE_UNSPECIFIED = 0; + */ + public static final int JOB_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Custom Job in `aiplatform.googleapis.com`.
+     * Default value for an execution.
+     * 
+ * + * VERTEX_AI = 1; + */ + public static final int VERTEX_AI_VALUE = 1; + /** + * + * + *
+     * Run execution on a cluster with Dataproc as a job.
+     * https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs
+     * 
+ * + * DATAPROC = 2; + */ + public static final int DATAPROC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobType forNumber(int value) { + switch (value) { + case 0: + return JOB_TYPE_UNSPECIFIED; + case 1: + return VERTEX_AI; + case 2: + return DATAPROC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobType findValueByNumber(int number) { + return JobType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionTemplate.getDescriptor().getEnumTypes().get(2); + } + + private static final JobType[] VALUES = values(); + + public static JobType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.ExecutionTemplate.JobType) + } + + public interface SchedulerAcceleratorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * @return The type. + */ + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType getType(); + + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + long getCoreCount(); + } + /** + * + * + *
+   * Definition of a hardware accelerator. Note that not all combinations
+   * of `type` and `core_count` are valid. Check GPUs on
+   * Compute Engine to find a valid
+   * combination. TPUs are not supported.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig} + */ + public static final class SchedulerAcceleratorConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + SchedulerAcceleratorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SchedulerAcceleratorConfig.newBuilder() to construct. + private SchedulerAcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SchedulerAcceleratorConfig() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SchedulerAcceleratorConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SchedulerAcceleratorConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: + { + coreCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.class, + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder + .class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType result = + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType.valueOf(type_); + return result == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType.UNRECOGNIZED + : result; + } + + public static final int CORE_COUNT_FIELD_NUMBER = 2; + private long coreCount_; + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + .SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (coreCount_ != 0L) { + output.writeInt64(2, coreCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + .SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (coreCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, coreCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig other = + (com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) obj; + + if (type_ != other.type_) return false; + if (getCoreCount() != other.getCoreCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Definition of a hardware accelerator. Note that not all combinations
+     * of `type` and `core_count` are valid. Check GPUs on
+     * Compute Engine to find a valid
+     * combination. TPUs are not supported.
+     * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.class, + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + coreCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_SchedulerAcceleratorConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig build() { + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + buildPartial() { + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig result = + new com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig(this); + result.type_ = type_; + result.coreCount_ = coreCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) { + return mergeFrom( + (com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig other) { + if (other + == com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getCoreCount() != 0L) { + setCoreCount(other.getCoreCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType result = + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType.valueOf(type_); + return result == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private long coreCount_; + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @param value The coreCount to set. + * @return This builder for chaining. + */ + public Builder setCoreCount(long value) { + + coreCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoreCount() { + + coreCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig) + private static final com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig(); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchedulerAcceleratorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SchedulerAcceleratorConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataprocParametersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * URI for cluster used to run Dataproc execution.
+     * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+     * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + java.lang.String getCluster(); + /** + * + * + *
+     * URI for cluster used to run Dataproc execution.
+     * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+     * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + com.google.protobuf.ByteString getClusterBytes(); + } + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters} + */ + public static final class DataprocParameters extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + DataprocParametersOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataprocParameters.newBuilder() to construct. + private DataprocParameters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataprocParameters() { + cluster_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataprocParameters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataprocParameters( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + cluster_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.class, + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder.class); + } + + public static final int CLUSTER_FIELD_NUMBER = 1; + private volatile java.lang.Object cluster_; + /** + * + * + *
+     * URI for cluster used to run Dataproc execution.
+     * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+     * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + @java.lang.Override + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } + } + /** + * + * + *
+     * URI for cluster used to run Dataproc execution.
+     * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+     * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getClusterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getClusterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters other = + (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) obj; + + if (!getCluster().equals(other.getCluster())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.class, + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder.class); + } + + // Construct using + // com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cluster_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_DataprocParameters_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters build() { + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters buildPartial() { + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters result = + new com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters(this); + result.cluster_ = cluster_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) { + return mergeFrom( + (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters other) { + if (other + == com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance()) return this; + if (!other.getCluster().isEmpty()) { + cluster_ = other.cluster_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object cluster_ = ""; + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+       * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+       * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+       * 
+ * + * string cluster = 1; + * + * @param value The cluster to set. + * @return This builder for chaining. + */ + public Builder setCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cluster_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+       * 
+ * + * string cluster = 1; + * + * @return This builder for chaining. + */ + public Builder clearCluster() { + + cluster_ = getDefaultInstance().getCluster(); + onChanged(); + return this; + } + /** + * + * + *
+       * URI for cluster used to run Dataproc execution.
+       * Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}
+       * 
+ * + * string cluster = 1; + * + * @param value The bytes for cluster to set. + * @return This builder for chaining. + */ + public Builder setClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cluster_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + private static final com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters(); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataprocParameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataprocParameters(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int jobParametersCase_ = 0; + private java.lang.Object jobParameters_; + + public enum JobParametersCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATAPROC_PARAMETERS(12), + JOBPARAMETERS_NOT_SET(0); + private final int value; + + private JobParametersCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobParametersCase valueOf(int value) { + return forNumber(value); + } + + public static JobParametersCase forNumber(int value) { + switch (value) { + case 12: + return DATAPROC_PARAMETERS; + case 0: + return JOBPARAMETERS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public JobParametersCase getJobParametersCase() { + return JobParametersCase.forNumber(jobParametersCase_); + } + + public static final int SCALE_TIER_FIELD_NUMBER = 1; + private int scaleTier_; + /** + * + * + *
+   * Required. Scale tier of the hardware used for notebook execution.
+   * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for scaleTier. + */ + @java.lang.Override + @java.lang.Deprecated + public int getScaleTierValue() { + return scaleTier_; + } + /** + * + * + *
+   * Required. Scale tier of the hardware used for notebook execution.
+   * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scaleTier. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier getScaleTier() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier result = + com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.valueOf(scaleTier_); + return result == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.UNRECOGNIZED + : result; + } + + public static final int MASTER_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object masterType_; + /** + * + * + *
+   * Specifies the type of virtual machine to use for your training
+   * job's master worker. You must specify this field when `scaleTier` is set to
+   * `CUSTOM`.
+   * You can use certain Compute Engine machine types directly in this field.
+   * The following types are supported:
+   * - `n1-standard-4`
+   * - `n1-standard-8`
+   * - `n1-standard-16`
+   * - `n1-standard-32`
+   * - `n1-standard-64`
+   * - `n1-standard-96`
+   * - `n1-highmem-2`
+   * - `n1-highmem-4`
+   * - `n1-highmem-8`
+   * - `n1-highmem-16`
+   * - `n1-highmem-32`
+   * - `n1-highmem-64`
+   * - `n1-highmem-96`
+   * - `n1-highcpu-16`
+   * - `n1-highcpu-32`
+   * - `n1-highcpu-64`
+   * - `n1-highcpu-96`
+   * Alternatively, you can use the following legacy machine types:
+   * - `standard`
+   * - `large_model`
+   * - `complex_model_s`
+   * - `complex_model_m`
+   * - `complex_model_l`
+   * - `standard_gpu`
+   * - `complex_model_m_gpu`
+   * - `complex_model_l_gpu`
+   * - `standard_p100`
+   * - `complex_model_m_p100`
+   * - `standard_v100`
+   * - `large_model_v100`
+   * - `complex_model_m_v100`
+   * - `complex_model_l_v100`
+   * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+   * field. Learn more about the [special configuration options for training
+   * with TPU.
+   * 
+ * + * string master_type = 2; + * + * @return The masterType. + */ + @java.lang.Override + public java.lang.String getMasterType() { + java.lang.Object ref = masterType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterType_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the type of virtual machine to use for your training
+   * job's master worker. You must specify this field when `scaleTier` is set to
+   * `CUSTOM`.
+   * You can use certain Compute Engine machine types directly in this field.
+   * The following types are supported:
+   * - `n1-standard-4`
+   * - `n1-standard-8`
+   * - `n1-standard-16`
+   * - `n1-standard-32`
+   * - `n1-standard-64`
+   * - `n1-standard-96`
+   * - `n1-highmem-2`
+   * - `n1-highmem-4`
+   * - `n1-highmem-8`
+   * - `n1-highmem-16`
+   * - `n1-highmem-32`
+   * - `n1-highmem-64`
+   * - `n1-highmem-96`
+   * - `n1-highcpu-16`
+   * - `n1-highcpu-32`
+   * - `n1-highcpu-64`
+   * - `n1-highcpu-96`
+   * Alternatively, you can use the following legacy machine types:
+   * - `standard`
+   * - `large_model`
+   * - `complex_model_s`
+   * - `complex_model_m`
+   * - `complex_model_l`
+   * - `standard_gpu`
+   * - `complex_model_m_gpu`
+   * - `complex_model_l_gpu`
+   * - `standard_p100`
+   * - `complex_model_m_p100`
+   * - `standard_v100`
+   * - `large_model_v100`
+   * - `complex_model_m_v100`
+   * - `complex_model_l_v100`
+   * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+   * field. Learn more about the [special configuration options for training
+   * with TPU.
+   * 
+ * + * string master_type = 2; + * + * @return The bytes for masterType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMasterTypeBytes() { + java.lang.Object ref = masterType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + acceleratorConfig_; + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return Whether the acceleratorConfig field is set. + */ + @java.lang.Override + public boolean hasAcceleratorConfig() { + return acceleratorConfig_ != null; + } + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return The acceleratorConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getAcceleratorConfig() { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance() + : acceleratorConfig_; + } + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + return getAcceleratorConfig(); + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int INPUT_NOTEBOOK_FILE_FIELD_NUMBER = 5; + private volatile java.lang.Object inputNotebookFile_; + /** + * + * + *
+   * Path to the notebook file to execute.
+   * Must be in a Google Cloud Storage bucket.
+   * Format: gs://{project_id}/{folder}/{notebook_file_name}
+   * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+   * 
+ * + * string input_notebook_file = 5; + * + * @return The inputNotebookFile. + */ + @java.lang.Override + public java.lang.String getInputNotebookFile() { + java.lang.Object ref = inputNotebookFile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputNotebookFile_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the notebook file to execute.
+   * Must be in a Google Cloud Storage bucket.
+   * Format: gs://{project_id}/{folder}/{notebook_file_name}
+   * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+   * 
+ * + * string input_notebook_file = 5; + * + * @return The bytes for inputNotebookFile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputNotebookFileBytes() { + java.lang.Object ref = inputNotebookFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputNotebookFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_IMAGE_URI_FIELD_NUMBER = 6; + private volatile java.lang.Object containerImageUri_; + /** + * + * + *
+   * Container Image URI to a DLVM
+   * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+   * More examples can be found at:
+   * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+   * 
+ * + * string container_image_uri = 6; + * + * @return The containerImageUri. + */ + @java.lang.Override + public java.lang.String getContainerImageUri() { + java.lang.Object ref = containerImageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerImageUri_ = s; + return s; + } + } + /** + * + * + *
+   * Container Image URI to a DLVM
+   * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+   * More examples can be found at:
+   * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+   * 
+ * + * string container_image_uri = 6; + * + * @return The bytes for containerImageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContainerImageUriBytes() { + java.lang.Object ref = containerImageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUT_NOTEBOOK_FOLDER_FIELD_NUMBER = 7; + private volatile java.lang.Object outputNotebookFolder_; + /** + * + * + *
+   * Path to the notebook folder to write to.
+   * Must be in a Google Cloud Storage bucket path.
+   * Format: gs://{project_id}/{folder}
+   * Ex: gs://notebook_user/scheduled_notebooks
+   * 
+ * + * string output_notebook_folder = 7; + * + * @return The outputNotebookFolder. + */ + @java.lang.Override + public java.lang.String getOutputNotebookFolder() { + java.lang.Object ref = outputNotebookFolder_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputNotebookFolder_ = s; + return s; + } + } + /** + * + * + *
+   * Path to the notebook folder to write to.
+   * Must be in a Google Cloud Storage bucket path.
+   * Format: gs://{project_id}/{folder}
+   * Ex: gs://notebook_user/scheduled_notebooks
+   * 
+ * + * string output_notebook_folder = 7; + * + * @return The bytes for outputNotebookFolder. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputNotebookFolderBytes() { + java.lang.Object ref = outputNotebookFolder_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputNotebookFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMS_YAML_FILE_FIELD_NUMBER = 8; + private volatile java.lang.Object paramsYamlFile_; + /** + * + * + *
+   * Parameters to be overridden in the notebook during execution.
+   * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+   * how to specifying parameters in the input notebook and pass them here
+   * in an YAML file.
+   * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+   * 
+ * + * string params_yaml_file = 8; + * + * @return The paramsYamlFile. + */ + @java.lang.Override + public java.lang.String getParamsYamlFile() { + java.lang.Object ref = paramsYamlFile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + paramsYamlFile_ = s; + return s; + } + } + /** + * + * + *
+   * Parameters to be overridden in the notebook during execution.
+   * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+   * how to specifying parameters in the input notebook and pass them here
+   * in an YAML file.
+   * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+   * 
+ * + * string params_yaml_file = 8; + * + * @return The bytes for paramsYamlFile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParamsYamlFileBytes() { + java.lang.Object ref = paramsYamlFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + paramsYamlFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 9; + private volatile java.lang.Object parameters_; + /** + * + * + *
+   * Parameters used within the 'input_notebook_file' notebook.
+   * 
+ * + * string parameters = 9; + * + * @return The parameters. + */ + @java.lang.Override + public java.lang.String getParameters() { + java.lang.Object ref = parameters_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameters_ = s; + return s; + } + } + /** + * + * + *
+   * Parameters used within the 'input_notebook_file' notebook.
+   * 
+ * + * string parameters = 9; + * + * @return The bytes for parameters. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParametersBytes() { + java.lang.Object ref = parameters_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameters_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 10; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * The email address of a service account to use when running the execution.
+   * You must have the `iam.serviceAccounts.actAs` permission for the specified
+   * service account.
+   * 
+ * + * string service_account = 10; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * The email address of a service account to use when running the execution.
+   * You must have the `iam.serviceAccounts.actAs` permission for the specified
+   * service account.
+   * 
+ * + * string service_account = 10; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_TYPE_FIELD_NUMBER = 11; + private int jobType_; + /** + * + * + *
+   * The type of Job to be used on this execution.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The enum numeric value on the wire for jobType. + */ + @java.lang.Override + public int getJobTypeValue() { + return jobType_; + } + /** + * + * + *
+   * The type of Job to be used on this execution.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The jobType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.JobType getJobType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.ExecutionTemplate.JobType result = + com.google.cloud.notebooks.v1.ExecutionTemplate.JobType.valueOf(jobType_); + return result == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.JobType.UNRECOGNIZED + : result; + } + + public static final int DATAPROC_PARAMETERS_FIELD_NUMBER = 12; + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return Whether the dataprocParameters field is set. + */ + @java.lang.Override + public boolean hasDataprocParameters() { + return jobParametersCase_ == 12; + } + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return The dataprocParameters. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDataprocParameters() { + if (jobParametersCase_ == 12) { + return (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) jobParameters_; + } + return com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.getDefaultInstance(); + } + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder + getDataprocParametersOrBuilder() { + if (jobParametersCase_ == 12) { + return (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) jobParameters_; + } + return com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (scaleTier_ + != com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.SCALE_TIER_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, scaleTier_); + } + if (!getMasterTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, masterType_); + } + if (acceleratorConfig_ != null) { + output.writeMessage(3, getAcceleratorConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!getInputNotebookFileBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, inputNotebookFile_); + } + if (!getContainerImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, containerImageUri_); + } + if (!getOutputNotebookFolderBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, outputNotebookFolder_); + } + if (!getParamsYamlFileBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, paramsYamlFile_); + } + if (!getParametersBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, parameters_); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, serviceAccount_); + } + if (jobType_ + != com.google.cloud.notebooks.v1.ExecutionTemplate.JobType.JOB_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, jobType_); + } + if (jobParametersCase_ == 12) { + output.writeMessage( + 12, (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) jobParameters_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scaleTier_ + != com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.SCALE_TIER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, scaleTier_); + } + if (!getMasterTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, masterType_); + } + if (acceleratorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAcceleratorConfig()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!getInputNotebookFileBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, inputNotebookFile_); + } + if (!getContainerImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, containerImageUri_); + } + if (!getOutputNotebookFolderBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, outputNotebookFolder_); + } + if (!getParamsYamlFileBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, paramsYamlFile_); + } + if (!getParametersBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, parameters_); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, serviceAccount_); + } + if (jobType_ + != com.google.cloud.notebooks.v1.ExecutionTemplate.JobType.JOB_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, jobType_); + } + if (jobParametersCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, + (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) jobParameters_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ExecutionTemplate)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ExecutionTemplate other = + (com.google.cloud.notebooks.v1.ExecutionTemplate) obj; + + if (scaleTier_ != other.scaleTier_) return false; + if (!getMasterType().equals(other.getMasterType())) return false; + if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false; + if (hasAcceleratorConfig()) { + if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getInputNotebookFile().equals(other.getInputNotebookFile())) return false; + if (!getContainerImageUri().equals(other.getContainerImageUri())) return false; + if (!getOutputNotebookFolder().equals(other.getOutputNotebookFolder())) return false; + if (!getParamsYamlFile().equals(other.getParamsYamlFile())) return false; + if (!getParameters().equals(other.getParameters())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (jobType_ != other.jobType_) return false; + if (!getJobParametersCase().equals(other.getJobParametersCase())) return false; + switch (jobParametersCase_) { + case 12: + if (!getDataprocParameters().equals(other.getDataprocParameters())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCALE_TIER_FIELD_NUMBER; + hash = (53 * hash) + scaleTier_; + hash = (37 * hash) + MASTER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMasterType().hashCode(); + if (hasAcceleratorConfig()) { + hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorConfig().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + INPUT_NOTEBOOK_FILE_FIELD_NUMBER; + hash = (53 * hash) + getInputNotebookFile().hashCode(); + hash = (37 * hash) + CONTAINER_IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getContainerImageUri().hashCode(); + hash = (37 * hash) + OUTPUT_NOTEBOOK_FOLDER_FIELD_NUMBER; + hash = (53 * hash) + getOutputNotebookFolder().hashCode(); + hash = (37 * hash) + PARAMS_YAML_FILE_FIELD_NUMBER; + hash = (53 * hash) + getParamsYamlFile().hashCode(); + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + JOB_TYPE_FIELD_NUMBER; + hash = (53 * hash) + jobType_; + switch (jobParametersCase_) { + case 12: + hash = (37 * hash) + DATAPROC_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getDataprocParameters().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ExecutionTemplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The description a notebook execution workload.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ExecutionTemplate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ExecutionTemplate) + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ExecutionTemplate.class, + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ExecutionTemplate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + scaleTier_ = 0; + + masterType_ = ""; + + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = null; + } else { + acceleratorConfig_ = null; + acceleratorConfigBuilder_ = null; + } + internalGetMutableLabels().clear(); + inputNotebookFile_ = ""; + + containerImageUri_ = ""; + + outputNotebookFolder_ = ""; + + paramsYamlFile_ = ""; + + parameters_ = ""; + + serviceAccount_ = ""; + + jobType_ = 0; + + jobParametersCase_ = 0; + jobParameters_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ExecutionProto + .internal_static_google_cloud_notebooks_v1_ExecutionTemplate_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate build() { + com.google.cloud.notebooks.v1.ExecutionTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate buildPartial() { + com.google.cloud.notebooks.v1.ExecutionTemplate result = + new com.google.cloud.notebooks.v1.ExecutionTemplate(this); + int from_bitField0_ = bitField0_; + result.scaleTier_ = scaleTier_; + result.masterType_ = masterType_; + if (acceleratorConfigBuilder_ == null) { + result.acceleratorConfig_ = acceleratorConfig_; + } else { + result.acceleratorConfig_ = acceleratorConfigBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.inputNotebookFile_ = inputNotebookFile_; + result.containerImageUri_ = containerImageUri_; + result.outputNotebookFolder_ = outputNotebookFolder_; + result.paramsYamlFile_ = paramsYamlFile_; + result.parameters_ = parameters_; + result.serviceAccount_ = serviceAccount_; + result.jobType_ = jobType_; + if (jobParametersCase_ == 12) { + if (dataprocParametersBuilder_ == null) { + result.jobParameters_ = jobParameters_; + } else { + result.jobParameters_ = dataprocParametersBuilder_.build(); + } + } + result.jobParametersCase_ = jobParametersCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ExecutionTemplate) { + return mergeFrom((com.google.cloud.notebooks.v1.ExecutionTemplate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ExecutionTemplate other) { + if (other == com.google.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance()) + return this; + if (other.scaleTier_ != 0) { + setScaleTierValue(other.getScaleTierValue()); + } + if (!other.getMasterType().isEmpty()) { + masterType_ = other.masterType_; + onChanged(); + } + if (other.hasAcceleratorConfig()) { + mergeAcceleratorConfig(other.getAcceleratorConfig()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (!other.getInputNotebookFile().isEmpty()) { + inputNotebookFile_ = other.inputNotebookFile_; + onChanged(); + } + if (!other.getContainerImageUri().isEmpty()) { + containerImageUri_ = other.containerImageUri_; + onChanged(); + } + if (!other.getOutputNotebookFolder().isEmpty()) { + outputNotebookFolder_ = other.outputNotebookFolder_; + onChanged(); + } + if (!other.getParamsYamlFile().isEmpty()) { + paramsYamlFile_ = other.paramsYamlFile_; + onChanged(); + } + if (!other.getParameters().isEmpty()) { + parameters_ = other.parameters_; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (other.jobType_ != 0) { + setJobTypeValue(other.getJobTypeValue()); + } + switch (other.getJobParametersCase()) { + case DATAPROC_PARAMETERS: + { + mergeDataprocParameters(other.getDataprocParameters()); + break; + } + case JOBPARAMETERS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ExecutionTemplate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.ExecutionTemplate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int jobParametersCase_ = 0; + private java.lang.Object jobParameters_; + + public JobParametersCase getJobParametersCase() { + return JobParametersCase.forNumber(jobParametersCase_); + } + + public Builder clearJobParameters() { + jobParametersCase_ = 0; + jobParameters_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private int scaleTier_ = 0; + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for scaleTier. + */ + @java.lang.Override + @java.lang.Deprecated + public int getScaleTierValue() { + return scaleTier_; + } + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for scaleTier to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setScaleTierValue(int value) { + + scaleTier_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scaleTier. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier getScaleTier() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier result = + com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.valueOf(scaleTier_); + return result == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The scaleTier to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setScaleTier(com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier value) { + if (value == null) { + throw new NullPointerException(); + } + + scaleTier_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Scale tier of the hardware used for notebook execution.
+     * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearScaleTier() { + + scaleTier_ = 0; + onChanged(); + return this; + } + + private java.lang.Object masterType_ = ""; + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with TPU.
+     * 
+ * + * string master_type = 2; + * + * @return The masterType. + */ + public java.lang.String getMasterType() { + java.lang.Object ref = masterType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with TPU.
+     * 
+ * + * string master_type = 2; + * + * @return The bytes for masterType. + */ + public com.google.protobuf.ByteString getMasterTypeBytes() { + java.lang.Object ref = masterType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with TPU.
+     * 
+ * + * string master_type = 2; + * + * @param value The masterType to set. + * @return This builder for chaining. + */ + public Builder setMasterType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + masterType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with TPU.
+     * 
+ * + * string master_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMasterType() { + + masterType_ = getDefaultInstance().getMasterType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the type of virtual machine to use for your training
+     * job's master worker. You must specify this field when `scaleTier` is set to
+     * `CUSTOM`.
+     * You can use certain Compute Engine machine types directly in this field.
+     * The following types are supported:
+     * - `n1-standard-4`
+     * - `n1-standard-8`
+     * - `n1-standard-16`
+     * - `n1-standard-32`
+     * - `n1-standard-64`
+     * - `n1-standard-96`
+     * - `n1-highmem-2`
+     * - `n1-highmem-4`
+     * - `n1-highmem-8`
+     * - `n1-highmem-16`
+     * - `n1-highmem-32`
+     * - `n1-highmem-64`
+     * - `n1-highmem-96`
+     * - `n1-highcpu-16`
+     * - `n1-highcpu-32`
+     * - `n1-highcpu-64`
+     * - `n1-highcpu-96`
+     * Alternatively, you can use the following legacy machine types:
+     * - `standard`
+     * - `large_model`
+     * - `complex_model_s`
+     * - `complex_model_m`
+     * - `complex_model_l`
+     * - `standard_gpu`
+     * - `complex_model_m_gpu`
+     * - `complex_model_l_gpu`
+     * - `standard_p100`
+     * - `complex_model_m_p100`
+     * - `standard_v100`
+     * - `large_model_v100`
+     * - `complex_model_m_v100`
+     * - `complex_model_l_v100`
+     * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+     * field. Learn more about the [special configuration options for training
+     * with TPU.
+     * 
+ * + * string master_type = 2; + * + * @param value The bytes for masterType to set. + * @return This builder for chaining. + */ + public Builder setMasterTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + masterType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + acceleratorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig, + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder> + acceleratorConfigBuilder_; + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return Whether the acceleratorConfig field is set. + */ + public boolean hasAcceleratorConfig() { + return acceleratorConfigBuilder_ != null || acceleratorConfig_ != null; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return The acceleratorConfig. + */ + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + getAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance() + : acceleratorConfig_; + } else { + return acceleratorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public Builder setAcceleratorConfig( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceleratorConfig_ = value; + onChanged(); + } else { + acceleratorConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public Builder setAcceleratorConfig( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder + builderForValue) { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = builderForValue.build(); + onChanged(); + } else { + acceleratorConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public Builder mergeAcceleratorConfig( + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (acceleratorConfig_ != null) { + acceleratorConfig_ = + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.newBuilder( + acceleratorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + acceleratorConfig_ = value; + } + onChanged(); + } else { + acceleratorConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public Builder clearAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = null; + onChanged(); + } else { + acceleratorConfig_ = null; + acceleratorConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder + getAcceleratorConfigBuilder() { + + onChanged(); + return getAcceleratorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + public com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + if (acceleratorConfigBuilder_ != null) { + return acceleratorConfigBuilder_.getMessageOrBuilder(); + } else { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + .getDefaultInstance() + : acceleratorConfig_; + } + } + /** + * + * + *
+     * Configuration (count and accelerator type) for hardware running notebook
+     * execution.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig, + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder> + getAcceleratorConfigFieldBuilder() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig, + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplate + .SchedulerAcceleratorConfigOrBuilder>( + getAcceleratorConfig(), getParentForChildren(), isClean()); + acceleratorConfig_ = null; + } + return acceleratorConfigBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels for execution.
+     * If execution is scheduled, a field included will be 'nbs-scheduled'.
+     * Otherwise, it is an immediate execution, and an included field will be
+     * 'nbs-immediate'. Use fields to efficiently index between various types of
+     * executions.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object inputNotebookFile_ = ""; + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: gs://{project_id}/{folder}/{notebook_file_name}
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+     * 
+ * + * string input_notebook_file = 5; + * + * @return The inputNotebookFile. + */ + public java.lang.String getInputNotebookFile() { + java.lang.Object ref = inputNotebookFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputNotebookFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: gs://{project_id}/{folder}/{notebook_file_name}
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+     * 
+ * + * string input_notebook_file = 5; + * + * @return The bytes for inputNotebookFile. + */ + public com.google.protobuf.ByteString getInputNotebookFileBytes() { + java.lang.Object ref = inputNotebookFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputNotebookFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: gs://{project_id}/{folder}/{notebook_file_name}
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+     * 
+ * + * string input_notebook_file = 5; + * + * @param value The inputNotebookFile to set. + * @return This builder for chaining. + */ + public Builder setInputNotebookFile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputNotebookFile_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: gs://{project_id}/{folder}/{notebook_file_name}
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+     * 
+ * + * string input_notebook_file = 5; + * + * @return This builder for chaining. + */ + public Builder clearInputNotebookFile() { + + inputNotebookFile_ = getDefaultInstance().getInputNotebookFile(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the notebook file to execute.
+     * Must be in a Google Cloud Storage bucket.
+     * Format: gs://{project_id}/{folder}/{notebook_file_name}
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+     * 
+ * + * string input_notebook_file = 5; + * + * @param value The bytes for inputNotebookFile to set. + * @return This builder for chaining. + */ + public Builder setInputNotebookFileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputNotebookFile_ = value; + onChanged(); + return this; + } + + private java.lang.Object containerImageUri_ = ""; + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @return The containerImageUri. + */ + public java.lang.String getContainerImageUri() { + java.lang.Object ref = containerImageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerImageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @return The bytes for containerImageUri. + */ + public com.google.protobuf.ByteString getContainerImageUriBytes() { + java.lang.Object ref = containerImageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerImageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @param value The containerImageUri to set. + * @return This builder for chaining. + */ + public Builder setContainerImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerImageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearContainerImageUri() { + + containerImageUri_ = getDefaultInstance().getContainerImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Container Image URI to a DLVM
+     * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+     * More examples can be found at:
+     * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+     * 
+ * + * string container_image_uri = 6; + * + * @param value The bytes for containerImageUri to set. + * @return This builder for chaining. + */ + public Builder setContainerImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerImageUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object outputNotebookFolder_ = ""; + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: gs://{project_id}/{folder}
+     * Ex: gs://notebook_user/scheduled_notebooks
+     * 
+ * + * string output_notebook_folder = 7; + * + * @return The outputNotebookFolder. + */ + public java.lang.String getOutputNotebookFolder() { + java.lang.Object ref = outputNotebookFolder_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputNotebookFolder_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: gs://{project_id}/{folder}
+     * Ex: gs://notebook_user/scheduled_notebooks
+     * 
+ * + * string output_notebook_folder = 7; + * + * @return The bytes for outputNotebookFolder. + */ + public com.google.protobuf.ByteString getOutputNotebookFolderBytes() { + java.lang.Object ref = outputNotebookFolder_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputNotebookFolder_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: gs://{project_id}/{folder}
+     * Ex: gs://notebook_user/scheduled_notebooks
+     * 
+ * + * string output_notebook_folder = 7; + * + * @param value The outputNotebookFolder to set. + * @return This builder for chaining. + */ + public Builder setOutputNotebookFolder(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputNotebookFolder_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: gs://{project_id}/{folder}
+     * Ex: gs://notebook_user/scheduled_notebooks
+     * 
+ * + * string output_notebook_folder = 7; + * + * @return This builder for chaining. + */ + public Builder clearOutputNotebookFolder() { + + outputNotebookFolder_ = getDefaultInstance().getOutputNotebookFolder(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to the notebook folder to write to.
+     * Must be in a Google Cloud Storage bucket path.
+     * Format: gs://{project_id}/{folder}
+     * Ex: gs://notebook_user/scheduled_notebooks
+     * 
+ * + * string output_notebook_folder = 7; + * + * @param value The bytes for outputNotebookFolder to set. + * @return This builder for chaining. + */ + public Builder setOutputNotebookFolderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputNotebookFolder_ = value; + onChanged(); + return this; + } + + private java.lang.Object paramsYamlFile_ = ""; + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+     * 
+ * + * string params_yaml_file = 8; + * + * @return The paramsYamlFile. + */ + public java.lang.String getParamsYamlFile() { + java.lang.Object ref = paramsYamlFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + paramsYamlFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+     * 
+ * + * string params_yaml_file = 8; + * + * @return The bytes for paramsYamlFile. + */ + public com.google.protobuf.ByteString getParamsYamlFileBytes() { + java.lang.Object ref = paramsYamlFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + paramsYamlFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+     * 
+ * + * string params_yaml_file = 8; + * + * @param value The paramsYamlFile to set. + * @return This builder for chaining. + */ + public Builder setParamsYamlFile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + paramsYamlFile_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+     * 
+ * + * string params_yaml_file = 8; + * + * @return This builder for chaining. + */ + public Builder clearParamsYamlFile() { + + paramsYamlFile_ = getDefaultInstance().getParamsYamlFile(); + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters to be overridden in the notebook during execution.
+     * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+     * how to specifying parameters in the input notebook and pass them here
+     * in an YAML file.
+     * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+     * 
+ * + * string params_yaml_file = 8; + * + * @param value The bytes for paramsYamlFile to set. + * @return This builder for chaining. + */ + public Builder setParamsYamlFileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + paramsYamlFile_ = value; + onChanged(); + return this; + } + + private java.lang.Object parameters_ = ""; + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @return The parameters. + */ + public java.lang.String getParameters() { + java.lang.Object ref = parameters_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameters_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @return The bytes for parameters. + */ + public com.google.protobuf.ByteString getParametersBytes() { + java.lang.Object ref = parameters_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameters_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @param value The parameters to set. + * @return This builder for chaining. + */ + public Builder setParameters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parameters_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @return This builder for chaining. + */ + public Builder clearParameters() { + + parameters_ = getDefaultInstance().getParameters(); + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters used within the 'input_notebook_file' notebook.
+     * 
+ * + * string parameters = 9; + * + * @param value The bytes for parameters to set. + * @return This builder for chaining. + */ + public Builder setParametersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parameters_ = value; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * The email address of a service account to use when running the execution.
+     * You must have the `iam.serviceAccounts.actAs` permission for the specified
+     * service account.
+     * 
+ * + * string service_account = 10; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private int jobType_ = 0; + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The enum numeric value on the wire for jobType. + */ + @java.lang.Override + public int getJobTypeValue() { + return jobType_; + } + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @param value The enum numeric value on the wire for jobType to set. + * @return This builder for chaining. + */ + public Builder setJobTypeValue(int value) { + + jobType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The jobType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.JobType getJobType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.ExecutionTemplate.JobType result = + com.google.cloud.notebooks.v1.ExecutionTemplate.JobType.valueOf(jobType_); + return result == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.JobType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @param value The jobType to set. + * @return This builder for chaining. + */ + public Builder setJobType(com.google.cloud.notebooks.v1.ExecutionTemplate.JobType value) { + if (value == null) { + throw new NullPointerException(); + } + + jobType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of Job to be used on this execution.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return This builder for chaining. + */ + public Builder clearJobType() { + + jobType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters, + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder> + dataprocParametersBuilder_; + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return Whether the dataprocParameters field is set. + */ + @java.lang.Override + public boolean hasDataprocParameters() { + return jobParametersCase_ == 12; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return The dataprocParameters. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + getDataprocParameters() { + if (dataprocParametersBuilder_ == null) { + if (jobParametersCase_ == 12) { + return (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_; + } + return com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } else { + if (jobParametersCase_ == 12) { + return dataprocParametersBuilder_.getMessage(); + } + return com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public Builder setDataprocParameters( + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters value) { + if (dataprocParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobParameters_ = value; + onChanged(); + } else { + dataprocParametersBuilder_.setMessage(value); + } + jobParametersCase_ = 12; + return this; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public Builder setDataprocParameters( + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder + builderForValue) { + if (dataprocParametersBuilder_ == null) { + jobParameters_ = builderForValue.build(); + onChanged(); + } else { + dataprocParametersBuilder_.setMessage(builderForValue.build()); + } + jobParametersCase_ = 12; + return this; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public Builder mergeDataprocParameters( + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters value) { + if (dataprocParametersBuilder_ == null) { + if (jobParametersCase_ == 12 + && jobParameters_ + != com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance()) { + jobParameters_ = + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.newBuilder( + (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_) + .mergeFrom(value) + .buildPartial(); + } else { + jobParameters_ = value; + } + onChanged(); + } else { + if (jobParametersCase_ == 12) { + dataprocParametersBuilder_.mergeFrom(value); + } + dataprocParametersBuilder_.setMessage(value); + } + jobParametersCase_ = 12; + return this; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public Builder clearDataprocParameters() { + if (dataprocParametersBuilder_ == null) { + if (jobParametersCase_ == 12) { + jobParametersCase_ = 0; + jobParameters_ = null; + onChanged(); + } + } else { + if (jobParametersCase_ == 12) { + jobParametersCase_ = 0; + jobParameters_ = null; + } + dataprocParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder + getDataprocParametersBuilder() { + return getDataprocParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder + getDataprocParametersOrBuilder() { + if ((jobParametersCase_ == 12) && (dataprocParametersBuilder_ != null)) { + return dataprocParametersBuilder_.getMessageOrBuilder(); + } else { + if (jobParametersCase_ == 12) { + return (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) + jobParameters_; + } + return com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Parameters used in Dataproc JobType executions.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters, + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder> + getDataprocParametersFieldBuilder() { + if (dataprocParametersBuilder_ == null) { + if (!(jobParametersCase_ == 12)) { + jobParameters_ = + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + .getDefaultInstance(); + } + dataprocParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters, + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder>( + (com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters) jobParameters_, + getParentForChildren(), + isClean()); + jobParameters_ = null; + } + jobParametersCase_ = 12; + onChanged(); + ; + return dataprocParametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ExecutionTemplate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ExecutionTemplate) + private static final com.google.cloud.notebooks.v1.ExecutionTemplate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ExecutionTemplate(); + } + + public static com.google.cloud.notebooks.v1.ExecutionTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutionTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecutionTemplate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionTemplateOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionTemplateOrBuilder.java new file mode 100644 index 00000000..ff1ccbc1 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ExecutionTemplateOrBuilder.java @@ -0,0 +1,526 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/execution.proto + +package com.google.cloud.notebooks.v1; + +public interface ExecutionTemplateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ExecutionTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Scale tier of the hardware used for notebook execution.
+   * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for scaleTier. + */ + @java.lang.Deprecated + int getScaleTierValue(); + /** + * + * + *
+   * Required. Scale tier of the hardware used for notebook execution.
+   * DEPRECATED Will be discontinued. As right now only CUSTOM is supported.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scaleTier. + */ + @java.lang.Deprecated + com.google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier getScaleTier(); + + /** + * + * + *
+   * Specifies the type of virtual machine to use for your training
+   * job's master worker. You must specify this field when `scaleTier` is set to
+   * `CUSTOM`.
+   * You can use certain Compute Engine machine types directly in this field.
+   * The following types are supported:
+   * - `n1-standard-4`
+   * - `n1-standard-8`
+   * - `n1-standard-16`
+   * - `n1-standard-32`
+   * - `n1-standard-64`
+   * - `n1-standard-96`
+   * - `n1-highmem-2`
+   * - `n1-highmem-4`
+   * - `n1-highmem-8`
+   * - `n1-highmem-16`
+   * - `n1-highmem-32`
+   * - `n1-highmem-64`
+   * - `n1-highmem-96`
+   * - `n1-highcpu-16`
+   * - `n1-highcpu-32`
+   * - `n1-highcpu-64`
+   * - `n1-highcpu-96`
+   * Alternatively, you can use the following legacy machine types:
+   * - `standard`
+   * - `large_model`
+   * - `complex_model_s`
+   * - `complex_model_m`
+   * - `complex_model_l`
+   * - `standard_gpu`
+   * - `complex_model_m_gpu`
+   * - `complex_model_l_gpu`
+   * - `standard_p100`
+   * - `complex_model_m_p100`
+   * - `standard_v100`
+   * - `large_model_v100`
+   * - `complex_model_m_v100`
+   * - `complex_model_l_v100`
+   * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+   * field. Learn more about the [special configuration options for training
+   * with TPU.
+   * 
+ * + * string master_type = 2; + * + * @return The masterType. + */ + java.lang.String getMasterType(); + /** + * + * + *
+   * Specifies the type of virtual machine to use for your training
+   * job's master worker. You must specify this field when `scaleTier` is set to
+   * `CUSTOM`.
+   * You can use certain Compute Engine machine types directly in this field.
+   * The following types are supported:
+   * - `n1-standard-4`
+   * - `n1-standard-8`
+   * - `n1-standard-16`
+   * - `n1-standard-32`
+   * - `n1-standard-64`
+   * - `n1-standard-96`
+   * - `n1-highmem-2`
+   * - `n1-highmem-4`
+   * - `n1-highmem-8`
+   * - `n1-highmem-16`
+   * - `n1-highmem-32`
+   * - `n1-highmem-64`
+   * - `n1-highmem-96`
+   * - `n1-highcpu-16`
+   * - `n1-highcpu-32`
+   * - `n1-highcpu-64`
+   * - `n1-highcpu-96`
+   * Alternatively, you can use the following legacy machine types:
+   * - `standard`
+   * - `large_model`
+   * - `complex_model_s`
+   * - `complex_model_m`
+   * - `complex_model_l`
+   * - `standard_gpu`
+   * - `complex_model_m_gpu`
+   * - `complex_model_l_gpu`
+   * - `standard_p100`
+   * - `complex_model_m_p100`
+   * - `standard_v100`
+   * - `large_model_v100`
+   * - `complex_model_m_v100`
+   * - `complex_model_l_v100`
+   * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
+   * field. Learn more about the [special configuration options for training
+   * with TPU.
+   * 
+ * + * string master_type = 2; + * + * @return The bytes for masterType. + */ + com.google.protobuf.ByteString getMasterTypeBytes(); + + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return Whether the acceleratorConfig field is set. + */ + boolean hasAcceleratorConfig(); + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + * + * @return The acceleratorConfig. + */ + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig getAcceleratorConfig(); + /** + * + * + *
+   * Configuration (count and accelerator type) for hardware running notebook
+   * execution.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * + */ + com.google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder(); + + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels for execution.
+   * If execution is scheduled, a field included will be 'nbs-scheduled'.
+   * Otherwise, it is an immediate execution, and an included field will be
+   * 'nbs-immediate'. Use fields to efficiently index between various types of
+   * executions.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Path to the notebook file to execute.
+   * Must be in a Google Cloud Storage bucket.
+   * Format: gs://{project_id}/{folder}/{notebook_file_name}
+   * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+   * 
+ * + * string input_notebook_file = 5; + * + * @return The inputNotebookFile. + */ + java.lang.String getInputNotebookFile(); + /** + * + * + *
+   * Path to the notebook file to execute.
+   * Must be in a Google Cloud Storage bucket.
+   * Format: gs://{project_id}/{folder}/{notebook_file_name}
+   * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb
+   * 
+ * + * string input_notebook_file = 5; + * + * @return The bytes for inputNotebookFile. + */ + com.google.protobuf.ByteString getInputNotebookFileBytes(); + + /** + * + * + *
+   * Container Image URI to a DLVM
+   * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+   * More examples can be found at:
+   * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+   * 
+ * + * string container_image_uri = 6; + * + * @return The containerImageUri. + */ + java.lang.String getContainerImageUri(); + /** + * + * + *
+   * Container Image URI to a DLVM
+   * Example: 'gcr.io/deeplearning-platform-release/base-cu100'
+   * More examples can be found at:
+   * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container
+   * 
+ * + * string container_image_uri = 6; + * + * @return The bytes for containerImageUri. + */ + com.google.protobuf.ByteString getContainerImageUriBytes(); + + /** + * + * + *
+   * Path to the notebook folder to write to.
+   * Must be in a Google Cloud Storage bucket path.
+   * Format: gs://{project_id}/{folder}
+   * Ex: gs://notebook_user/scheduled_notebooks
+   * 
+ * + * string output_notebook_folder = 7; + * + * @return The outputNotebookFolder. + */ + java.lang.String getOutputNotebookFolder(); + /** + * + * + *
+   * Path to the notebook folder to write to.
+   * Must be in a Google Cloud Storage bucket path.
+   * Format: gs://{project_id}/{folder}
+   * Ex: gs://notebook_user/scheduled_notebooks
+   * 
+ * + * string output_notebook_folder = 7; + * + * @return The bytes for outputNotebookFolder. + */ + com.google.protobuf.ByteString getOutputNotebookFolderBytes(); + + /** + * + * + *
+   * Parameters to be overridden in the notebook during execution.
+   * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+   * how to specifying parameters in the input notebook and pass them here
+   * in an YAML file.
+   * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+   * 
+ * + * string params_yaml_file = 8; + * + * @return The paramsYamlFile. + */ + java.lang.String getParamsYamlFile(); + /** + * + * + *
+   * Parameters to be overridden in the notebook during execution.
+   * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on
+   * how to specifying parameters in the input notebook and pass them here
+   * in an YAML file.
+   * Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml
+   * 
+ * + * string params_yaml_file = 8; + * + * @return The bytes for paramsYamlFile. + */ + com.google.protobuf.ByteString getParamsYamlFileBytes(); + + /** + * + * + *
+   * Parameters used within the 'input_notebook_file' notebook.
+   * 
+ * + * string parameters = 9; + * + * @return The parameters. + */ + java.lang.String getParameters(); + /** + * + * + *
+   * Parameters used within the 'input_notebook_file' notebook.
+   * 
+ * + * string parameters = 9; + * + * @return The bytes for parameters. + */ + com.google.protobuf.ByteString getParametersBytes(); + + /** + * + * + *
+   * The email address of a service account to use when running the execution.
+   * You must have the `iam.serviceAccounts.actAs` permission for the specified
+   * service account.
+   * 
+ * + * string service_account = 10; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * The email address of a service account to use when running the execution.
+   * You must have the `iam.serviceAccounts.actAs` permission for the specified
+   * service account.
+   * 
+ * + * string service_account = 10; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * The type of Job to be used on this execution.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The enum numeric value on the wire for jobType. + */ + int getJobTypeValue(); + /** + * + * + *
+   * The type of Job to be used on this execution.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * + * @return The jobType. + */ + com.google.cloud.notebooks.v1.ExecutionTemplate.JobType getJobType(); + + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return Whether the dataprocParameters field is set. + */ + boolean hasDataprocParameters(); + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + * + * @return The dataprocParameters. + */ + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters getDataprocParameters(); + /** + * + * + *
+   * Parameters used in Dataproc JobType executions.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * + */ + com.google.cloud.notebooks.v1.ExecutionTemplate.DataprocParametersOrBuilder + getDataprocParametersOrBuilder(); + + public com.google.cloud.notebooks.v1.ExecutionTemplate.JobParametersCase getJobParametersCase(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetEnvironmentRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetEnvironmentRequest.java new file mode 100644 index 00000000..74f2b33c --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetEnvironmentRequest.java @@ -0,0 +1,643 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for getting a notebook environment.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetEnvironmentRequest} + */ +public final class GetEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.GetEnvironmentRequest) + GetEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEnvironmentRequest.newBuilder() to construct. + private GetEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEnvironmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetEnvironmentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetEnvironmentRequest.class, + com.google.cloud.notebooks.v1.GetEnvironmentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.GetEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.GetEnvironmentRequest other = + (com.google.cloud.notebooks.v1.GetEnvironmentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.GetEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for getting a notebook environment.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.GetEnvironmentRequest) + com.google.cloud.notebooks.v1.GetEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetEnvironmentRequest.class, + com.google.cloud.notebooks.v1.GetEnvironmentRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.GetEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetEnvironmentRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.GetEnvironmentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetEnvironmentRequest build() { + com.google.cloud.notebooks.v1.GetEnvironmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetEnvironmentRequest buildPartial() { + com.google.cloud.notebooks.v1.GetEnvironmentRequest result = + new com.google.cloud.notebooks.v1.GetEnvironmentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.GetEnvironmentRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.GetEnvironmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.GetEnvironmentRequest other) { + if (other == com.google.cloud.notebooks.v1.GetEnvironmentRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.GetEnvironmentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.GetEnvironmentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.GetEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.GetEnvironmentRequest) + private static final com.google.cloud.notebooks.v1.GetEnvironmentRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.GetEnvironmentRequest(); + } + + public static com.google.cloud.notebooks.v1.GetEnvironmentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetEnvironmentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetEnvironmentRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..73136005 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetEnvironmentRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface GetEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.GetEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetExecutionRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetExecutionRequest.java new file mode 100644 index 00000000..bf472385 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetExecutionRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for getting scheduled notebook execution
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetExecutionRequest} + */ +public final class GetExecutionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.GetExecutionRequest) + GetExecutionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetExecutionRequest.newBuilder() to construct. + private GetExecutionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetExecutionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetExecutionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetExecutionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetExecutionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetExecutionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetExecutionRequest.class, + com.google.cloud.notebooks.v1.GetExecutionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.GetExecutionRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.GetExecutionRequest other = + (com.google.cloud.notebooks.v1.GetExecutionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.GetExecutionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for getting scheduled notebook execution
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetExecutionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.GetExecutionRequest) + com.google.cloud.notebooks.v1.GetExecutionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetExecutionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetExecutionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetExecutionRequest.class, + com.google.cloud.notebooks.v1.GetExecutionRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.GetExecutionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetExecutionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetExecutionRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.GetExecutionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetExecutionRequest build() { + com.google.cloud.notebooks.v1.GetExecutionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetExecutionRequest buildPartial() { + com.google.cloud.notebooks.v1.GetExecutionRequest result = + new com.google.cloud.notebooks.v1.GetExecutionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.GetExecutionRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.GetExecutionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.GetExecutionRequest other) { + if (other == com.google.cloud.notebooks.v1.GetExecutionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.GetExecutionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.GetExecutionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.GetExecutionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.GetExecutionRequest) + private static final com.google.cloud.notebooks.v1.GetExecutionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.GetExecutionRequest(); + } + + public static com.google.cloud.notebooks.v1.GetExecutionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetExecutionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetExecutionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetExecutionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetExecutionRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetExecutionRequestOrBuilder.java new file mode 100644 index 00000000..d806e219 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetExecutionRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface GetExecutionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.GetExecutionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthRequest.java new file mode 100644 index 00000000..521b9547 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthRequest.java @@ -0,0 +1,658 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for checking if a notebook instance is healthy.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetInstanceHealthRequest} + */ +public final class GetInstanceHealthRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.GetInstanceHealthRequest) + GetInstanceHealthRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstanceHealthRequest.newBuilder() to construct. + private GetInstanceHealthRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceHealthRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceHealthRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInstanceHealthRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetInstanceHealthRequest.class, + com.google.cloud.notebooks.v1.GetInstanceHealthRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.GetInstanceHealthRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.GetInstanceHealthRequest other = + (com.google.cloud.notebooks.v1.GetInstanceHealthRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.GetInstanceHealthRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for checking if a notebook instance is healthy.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetInstanceHealthRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.GetInstanceHealthRequest) + com.google.cloud.notebooks.v1.GetInstanceHealthRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetInstanceHealthRequest.class, + com.google.cloud.notebooks.v1.GetInstanceHealthRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.GetInstanceHealthRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.GetInstanceHealthRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthRequest build() { + com.google.cloud.notebooks.v1.GetInstanceHealthRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthRequest buildPartial() { + com.google.cloud.notebooks.v1.GetInstanceHealthRequest result = + new com.google.cloud.notebooks.v1.GetInstanceHealthRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.GetInstanceHealthRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.GetInstanceHealthRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.GetInstanceHealthRequest other) { + if (other == com.google.cloud.notebooks.v1.GetInstanceHealthRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.GetInstanceHealthRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.GetInstanceHealthRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.GetInstanceHealthRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.GetInstanceHealthRequest) + private static final com.google.cloud.notebooks.v1.GetInstanceHealthRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.GetInstanceHealthRequest(); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceHealthRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceHealthRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthRequestOrBuilder.java new file mode 100644 index 00000000..839cece8 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface GetInstanceHealthRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.GetInstanceHealthRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthResponse.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthResponse.java new file mode 100644 index 00000000..cf1f9bfd --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthResponse.java @@ -0,0 +1,1277 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Response for checking if a notebook instance is healthy.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetInstanceHealthResponse} + */ +public final class GetInstanceHealthResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.GetInstanceHealthResponse) + GetInstanceHealthResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstanceHealthResponse.newBuilder() to construct. + private GetInstanceHealthResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceHealthResponse() { + healthState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceHealthResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInstanceHealthResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + healthState_ = rawValue; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + healthInfo_ = + com.google.protobuf.MapField.newMapField( + HealthInfoDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry healthInfo__ = + input.readMessage( + HealthInfoDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + healthInfo_.getMutableMap().put(healthInfo__.getKey(), healthInfo__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetHealthInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.class, + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.Builder.class); + } + + /** + * + * + *
+   * If an instance is healthy or not.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState} + */ + public enum HealthState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The instance substate is unknown.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + HEALTH_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The instance is known to be in an healthy state
+     * (for example, critical daemons are running)
+     * Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + HEALTHY(1), + /** + * + * + *
+     * The instance is known to be in an unhealthy state
+     * (for example, critical daemons are not running)
+     * Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + UNHEALTHY(2), + /** + * + * + *
+     * The instance has not installed health monitoring agent.
+     * Applies to ACTIVE state.
+     * 
+ * + * AGENT_NOT_INSTALLED = 3; + */ + AGENT_NOT_INSTALLED(3), + /** + * + * + *
+     * The instance health monitoring agent is not running.
+     * Applies to ACTIVE state.
+     * 
+ * + * AGENT_NOT_RUNNING = 4; + */ + AGENT_NOT_RUNNING(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The instance substate is unknown.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + public static final int HEALTH_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The instance is known to be in an healthy state
+     * (for example, critical daemons are running)
+     * Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + public static final int HEALTHY_VALUE = 1; + /** + * + * + *
+     * The instance is known to be in an unhealthy state
+     * (for example, critical daemons are not running)
+     * Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + public static final int UNHEALTHY_VALUE = 2; + /** + * + * + *
+     * The instance has not installed health monitoring agent.
+     * Applies to ACTIVE state.
+     * 
+ * + * AGENT_NOT_INSTALLED = 3; + */ + public static final int AGENT_NOT_INSTALLED_VALUE = 3; + /** + * + * + *
+     * The instance health monitoring agent is not running.
+     * Applies to ACTIVE state.
+     * 
+ * + * AGENT_NOT_RUNNING = 4; + */ + public static final int AGENT_NOT_RUNNING_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HealthState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HealthState forNumber(int value) { + switch (value) { + case 0: + return HEALTH_STATE_UNSPECIFIED; + case 1: + return HEALTHY; + case 2: + return UNHEALTHY; + case 3: + return AGENT_NOT_INSTALLED; + case 4: + return AGENT_NOT_RUNNING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HealthState findValueByNumber(int number) { + return HealthState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.GetInstanceHealthResponse.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HealthState[] VALUES = values(); + + public static HealthState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HealthState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState) + } + + public static final int HEALTH_STATE_FIELD_NUMBER = 1; + private int healthState_; + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState getHealthState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState result = + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState.valueOf(healthState_); + return result == null + ? com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState.UNRECOGNIZED + : result; + } + + public static final int HEALTH_INFO_FIELD_NUMBER = 2; + + private static final class HealthInfoDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_HealthInfoEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField healthInfo_; + + private com.google.protobuf.MapField internalGetHealthInfo() { + if (healthInfo_ == null) { + return com.google.protobuf.MapField.emptyMapField(HealthInfoDefaultEntryHolder.defaultEntry); + } + return healthInfo_; + } + + public int getHealthInfoCount() { + return internalGetHealthInfo().getMap().size(); + } + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsHealthInfo(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetHealthInfo().getMap().containsKey(key); + } + /** Use {@link #getHealthInfoMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHealthInfo() { + return getHealthInfoMap(); + } + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getHealthInfoMap() { + return internalGetHealthInfo().getMap(); + } + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getHealthInfoOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHealthInfo().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getHealthInfoOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHealthInfo().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (healthState_ + != com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState + .HEALTH_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, healthState_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetHealthInfo(), HealthInfoDefaultEntryHolder.defaultEntry, 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (healthState_ + != com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState + .HEALTH_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, healthState_); + } + for (java.util.Map.Entry entry : + internalGetHealthInfo().getMap().entrySet()) { + com.google.protobuf.MapEntry healthInfo__ = + HealthInfoDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, healthInfo__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.GetInstanceHealthResponse)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.GetInstanceHealthResponse other = + (com.google.cloud.notebooks.v1.GetInstanceHealthResponse) obj; + + if (healthState_ != other.healthState_) return false; + if (!internalGetHealthInfo().equals(other.internalGetHealthInfo())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEALTH_STATE_FIELD_NUMBER; + hash = (53 * hash) + healthState_; + if (!internalGetHealthInfo().getMap().isEmpty()) { + hash = (37 * hash) + HEALTH_INFO_FIELD_NUMBER; + hash = (53 * hash) + internalGetHealthInfo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.GetInstanceHealthResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for checking if a notebook instance is healthy.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetInstanceHealthResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.GetInstanceHealthResponse) + com.google.cloud.notebooks.v1.GetInstanceHealthResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetHealthInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableHealthInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.class, + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.GetInstanceHealthResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + healthState_ = 0; + + internalGetMutableHealthInfo().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthResponse getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.GetInstanceHealthResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthResponse build() { + com.google.cloud.notebooks.v1.GetInstanceHealthResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthResponse buildPartial() { + com.google.cloud.notebooks.v1.GetInstanceHealthResponse result = + new com.google.cloud.notebooks.v1.GetInstanceHealthResponse(this); + int from_bitField0_ = bitField0_; + result.healthState_ = healthState_; + result.healthInfo_ = internalGetHealthInfo(); + result.healthInfo_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.GetInstanceHealthResponse) { + return mergeFrom((com.google.cloud.notebooks.v1.GetInstanceHealthResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.GetInstanceHealthResponse other) { + if (other == com.google.cloud.notebooks.v1.GetInstanceHealthResponse.getDefaultInstance()) + return this; + if (other.healthState_ != 0) { + setHealthStateValue(other.getHealthStateValue()); + } + internalGetMutableHealthInfo().mergeFrom(other.internalGetHealthInfo()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.GetInstanceHealthResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.GetInstanceHealthResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int healthState_ = 0; + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthStateValue(int value) { + + healthState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState getHealthState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState result = + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState.valueOf(healthState_); + return result == null + ? com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthState( + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState value) { + if (value == null) { + throw new NullPointerException(); + } + + healthState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearHealthState() { + + healthState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField healthInfo_; + + private com.google.protobuf.MapField + internalGetHealthInfo() { + if (healthInfo_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HealthInfoDefaultEntryHolder.defaultEntry); + } + return healthInfo_; + } + + private com.google.protobuf.MapField + internalGetMutableHealthInfo() { + onChanged(); + ; + if (healthInfo_ == null) { + healthInfo_ = + com.google.protobuf.MapField.newMapField(HealthInfoDefaultEntryHolder.defaultEntry); + } + if (!healthInfo_.isMutable()) { + healthInfo_ = healthInfo_.copy(); + } + return healthInfo_; + } + + public int getHealthInfoCount() { + return internalGetHealthInfo().getMap().size(); + } + /** + * + * + *
+     * Output only. Additional information about instance health.
+     * Example:
+     *  healthInfo": {
+     *   "docker_proxy_agent_status": "1",
+     *   "docker_status": "1",
+     *   "jupyterlab_api_status": "-1",
+     *   "jupyterlab_status": "-1",
+     *   "updated": "2020-10-18 09:40:03.573409"
+     *  }
+     * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsHealthInfo(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetHealthInfo().getMap().containsKey(key); + } + /** Use {@link #getHealthInfoMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getHealthInfo() { + return getHealthInfoMap(); + } + /** + * + * + *
+     * Output only. Additional information about instance health.
+     * Example:
+     *  healthInfo": {
+     *   "docker_proxy_agent_status": "1",
+     *   "docker_status": "1",
+     *   "jupyterlab_api_status": "-1",
+     *   "jupyterlab_status": "-1",
+     *   "updated": "2020-10-18 09:40:03.573409"
+     *  }
+     * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getHealthInfoMap() { + return internalGetHealthInfo().getMap(); + } + /** + * + * + *
+     * Output only. Additional information about instance health.
+     * Example:
+     *  healthInfo": {
+     *   "docker_proxy_agent_status": "1",
+     *   "docker_status": "1",
+     *   "jupyterlab_api_status": "-1",
+     *   "jupyterlab_status": "-1",
+     *   "updated": "2020-10-18 09:40:03.573409"
+     *  }
+     * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getHealthInfoOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHealthInfo().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Additional information about instance health.
+     * Example:
+     *  healthInfo": {
+     *   "docker_proxy_agent_status": "1",
+     *   "docker_status": "1",
+     *   "jupyterlab_api_status": "-1",
+     *   "jupyterlab_status": "-1",
+     *   "updated": "2020-10-18 09:40:03.573409"
+     *  }
+     * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getHealthInfoOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetHealthInfo().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHealthInfo() { + internalGetMutableHealthInfo().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about instance health.
+     * Example:
+     *  healthInfo": {
+     *   "docker_proxy_agent_status": "1",
+     *   "docker_status": "1",
+     *   "jupyterlab_api_status": "-1",
+     *   "jupyterlab_status": "-1",
+     *   "updated": "2020-10-18 09:40:03.573409"
+     *  }
+     * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeHealthInfo(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableHealthInfo().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableHealthInfo() { + return internalGetMutableHealthInfo().getMutableMap(); + } + /** + * + * + *
+     * Output only. Additional information about instance health.
+     * Example:
+     *  healthInfo": {
+     *   "docker_proxy_agent_status": "1",
+     *   "docker_status": "1",
+     *   "jupyterlab_api_status": "-1",
+     *   "jupyterlab_status": "-1",
+     *   "updated": "2020-10-18 09:40:03.573409"
+     *  }
+     * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putHealthInfo(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableHealthInfo().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. Additional information about instance health.
+     * Example:
+     *  healthInfo": {
+     *   "docker_proxy_agent_status": "1",
+     *   "docker_status": "1",
+     *   "jupyterlab_api_status": "-1",
+     *   "jupyterlab_status": "-1",
+     *   "updated": "2020-10-18 09:40:03.573409"
+     *  }
+     * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllHealthInfo(java.util.Map values) { + internalGetMutableHealthInfo().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.GetInstanceHealthResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.GetInstanceHealthResponse) + private static final com.google.cloud.notebooks.v1.GetInstanceHealthResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.GetInstanceHealthResponse(); + } + + public static com.google.cloud.notebooks.v1.GetInstanceHealthResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceHealthResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceHealthResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceHealthResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthResponseOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthResponseOrBuilder.java new file mode 100644 index 00000000..d4fc33d9 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceHealthResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface GetInstanceHealthResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.GetInstanceHealthResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + int getHealthStateValue(); + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + com.google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState getHealthState(); + + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getHealthInfoCount(); + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsHealthInfo(java.lang.String key); + /** Use {@link #getHealthInfoMap()} instead. */ + @java.lang.Deprecated + java.util.Map getHealthInfo(); + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getHealthInfoMap(); + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getHealthInfoOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Output only. Additional information about instance health.
+   * Example:
+   *  healthInfo": {
+   *   "docker_proxy_agent_status": "1",
+   *   "docker_status": "1",
+   *   "jupyterlab_api_status": "-1",
+   *   "jupyterlab_status": "-1",
+   *   "updated": "2020-10-18 09:40:03.573409"
+   *  }
+   * 
+ * + * map<string, string> health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getHealthInfoOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceRequest.java new file mode 100644 index 00000000..67e9eeb0 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceRequest.java @@ -0,0 +1,642 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for getting a notebook instance.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetInstanceRequest} + */ +public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.GetInstanceRequest) + GetInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstanceRequest.newBuilder() to construct. + private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetInstanceRequest.class, + com.google.cloud.notebooks.v1.GetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.GetInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.GetInstanceRequest other = + (com.google.cloud.notebooks.v1.GetInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.GetInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for getting a notebook instance.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.GetInstanceRequest) + com.google.cloud.notebooks.v1.GetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetInstanceRequest.class, + com.google.cloud.notebooks.v1.GetInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.GetInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.GetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceRequest build() { + com.google.cloud.notebooks.v1.GetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.GetInstanceRequest result = + new com.google.cloud.notebooks.v1.GetInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.GetInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.GetInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.GetInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.GetInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.GetInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.GetInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.GetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.GetInstanceRequest) + private static final com.google.cloud.notebooks.v1.GetInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.GetInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.GetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceRequestOrBuilder.java new file mode 100644 index 00000000..4efde400 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface GetInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.GetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetRuntimeRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetRuntimeRequest.java new file mode 100644 index 00000000..2c54d7d3 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetRuntimeRequest.java @@ -0,0 +1,656 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for getting a Managed Notebook Runtime.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetRuntimeRequest} + */ +public final class GetRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.GetRuntimeRequest) + GetRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRuntimeRequest.newBuilder() to construct. + private GetRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetRuntimeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetRuntimeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetRuntimeRequest.class, + com.google.cloud.notebooks.v1.GetRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.GetRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.GetRuntimeRequest other = + (com.google.cloud.notebooks.v1.GetRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.GetRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for getting a Managed Notebook Runtime.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.GetRuntimeRequest) + com.google.cloud.notebooks.v1.GetRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetRuntimeRequest.class, + com.google.cloud.notebooks.v1.GetRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.GetRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.GetRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetRuntimeRequest build() { + com.google.cloud.notebooks.v1.GetRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetRuntimeRequest buildPartial() { + com.google.cloud.notebooks.v1.GetRuntimeRequest result = + new com.google.cloud.notebooks.v1.GetRuntimeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.GetRuntimeRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.GetRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.GetRuntimeRequest other) { + if (other == com.google.cloud.notebooks.v1.GetRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.GetRuntimeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.GetRuntimeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.GetRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.GetRuntimeRequest) + private static final com.google.cloud.notebooks.v1.GetRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.GetRuntimeRequest(); + } + + public static com.google.cloud.notebooks.v1.GetRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetRuntimeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetRuntimeRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetRuntimeRequestOrBuilder.java new file mode 100644 index 00000000..0b0aa61c --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetRuntimeRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface GetRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.GetRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetScheduleRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetScheduleRequest.java new file mode 100644 index 00000000..8df84acb --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetScheduleRequest.java @@ -0,0 +1,656 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for getting scheduled notebook.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetScheduleRequest} + */ +public final class GetScheduleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.GetScheduleRequest) + GetScheduleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetScheduleRequest.newBuilder() to construct. + private GetScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetScheduleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetScheduleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetScheduleRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetScheduleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetScheduleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetScheduleRequest.class, + com.google.cloud.notebooks.v1.GetScheduleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.GetScheduleRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.GetScheduleRequest other = + (com.google.cloud.notebooks.v1.GetScheduleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.GetScheduleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for getting scheduled notebook.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.GetScheduleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.GetScheduleRequest) + com.google.cloud.notebooks.v1.GetScheduleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetScheduleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetScheduleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.GetScheduleRequest.class, + com.google.cloud.notebooks.v1.GetScheduleRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.GetScheduleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_GetScheduleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetScheduleRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.GetScheduleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetScheduleRequest build() { + com.google.cloud.notebooks.v1.GetScheduleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetScheduleRequest buildPartial() { + com.google.cloud.notebooks.v1.GetScheduleRequest result = + new com.google.cloud.notebooks.v1.GetScheduleRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.GetScheduleRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.GetScheduleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.GetScheduleRequest other) { + if (other == com.google.cloud.notebooks.v1.GetScheduleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.GetScheduleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.GetScheduleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.GetScheduleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.GetScheduleRequest) + private static final com.google.cloud.notebooks.v1.GetScheduleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.GetScheduleRequest(); + } + + public static com.google.cloud.notebooks.v1.GetScheduleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetScheduleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetScheduleRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.GetScheduleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetScheduleRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetScheduleRequestOrBuilder.java new file mode 100644 index 00000000..98eb60ea --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/GetScheduleRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface GetScheduleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.GetScheduleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Instance.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Instance.java new file mode 100644 index 00000000..0c12db2b --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Instance.java @@ -0,0 +1,18298 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/instance.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of a notebook instance.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance} + */ +public final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() { + name_ = ""; + postStartupScript_ = ""; + proxyUri_ = ""; + instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceAccount_ = ""; + serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + machineType_ = ""; + state_ = 0; + customGpuDriverPath_ = ""; + bootDiskType_ = 0; + dataDiskType_ = 0; + diskEncryption_ = 0; + kmsKey_ = ""; + disks_ = java.util.Collections.emptyList(); + network_ = ""; + subnet_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + upgradeHistory_ = java.util.Collections.emptyList(); + nicType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Instance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.notebooks.v1.VmImage.Builder subBuilder = null; + if (environmentCase_ == 2) { + subBuilder = ((com.google.cloud.notebooks.v1.VmImage) environment_).toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.notebooks.v1.VmImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.notebooks.v1.VmImage) environment_); + environment_ = subBuilder.buildPartial(); + } + environmentCase_ = 2; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.ContainerImage.Builder subBuilder = null; + if (environmentCase_ == 3) { + subBuilder = + ((com.google.cloud.notebooks.v1.ContainerImage) environment_).toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.notebooks.v1.ContainerImage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.notebooks.v1.ContainerImage) environment_); + environment_ = subBuilder.buildPartial(); + } + environmentCase_ = 3; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + postStartupScript_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + proxyUri_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instanceOwners_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instanceOwners_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + machineType_ = s; + break; + } + case 74: + { + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder subBuilder = null; + if (acceleratorConfig_ != null) { + subBuilder = acceleratorConfig_.toBuilder(); + } + acceleratorConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(acceleratorConfig_); + acceleratorConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 80: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 88: + { + installGpuDriver_ = input.readBool(); + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + customGpuDriverPath_ = s; + break; + } + case 104: + { + int rawValue = input.readEnum(); + + bootDiskType_ = rawValue; + break; + } + case 112: + { + bootDiskSizeGb_ = input.readInt64(); + break; + } + case 120: + { + int rawValue = input.readEnum(); + + diskEncryption_ = rawValue; + break; + } + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKey_ = s; + break; + } + case 136: + { + noPublicIp_ = input.readBool(); + break; + } + case 144: + { + noProxyAccess_ = input.readBool(); + break; + } + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 162: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnet_ = s; + break; + } + case 170: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 178: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + metadata_ = + com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); + break; + } + case 186: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 194: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 200: + { + int rawValue = input.readEnum(); + + dataDiskType_ = rawValue; + break; + } + case 208: + { + dataDiskSizeGb_ = input.readInt64(); + break; + } + case 216: + { + noRemoveDataDisk_ = input.readBool(); + break; + } + case 226: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + disks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + disks_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Instance.Disk.parser(), extensionRegistry)); + break; + } + case 234: + { + if (!((mutable_bitField0_ & 0x00000040) != 0)) { + upgradeHistory_ = + new java.util.ArrayList< + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry>(); + mutable_bitField0_ |= 0x00000040; + } + upgradeHistory_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.parser(), + extensionRegistry)); + break; + } + case 242: + { + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder subBuilder = + null; + if (shieldedInstanceConfig_ != null) { + subBuilder = shieldedInstanceConfig_.toBuilder(); + } + shieldedInstanceConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shieldedInstanceConfig_); + shieldedInstanceConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 250: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + serviceAccountScopes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + serviceAccountScopes_.add(s); + break; + } + case 258: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000020; + } + tags_.add(s); + break; + } + case 264: + { + int rawValue = input.readEnum(); + + nicType_ = rawValue; + break; + } + case 274: + { + com.google.cloud.notebooks.v1.ReservationAffinity.Builder subBuilder = null; + if (reservationAffinity_ != null) { + subBuilder = reservationAffinity_.toBuilder(); + } + reservationAffinity_ = + input.readMessage( + com.google.cloud.notebooks.v1.ReservationAffinity.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reservationAffinity_); + reservationAffinity_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + instanceOwners_ = instanceOwners_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + disks_ = java.util.Collections.unmodifiableList(disks_); + } + if (((mutable_bitField0_ & 0x00000040) != 0)) { + upgradeHistory_ = java.util.Collections.unmodifiableList(upgradeHistory_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + serviceAccountScopes_ = serviceAccountScopes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + tags_ = tags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 21: + return internalGetLabels(); + case 22: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.class, + com.google.cloud.notebooks.v1.Instance.Builder.class); + } + + /** + * + * + *
+   * Definition of the types of hardware accelerators that can be used on this
+   * instance.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Instance.AcceleratorType} + */ + public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Accelerator type is not specified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla K80.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + NVIDIA_TESLA_K80(1), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P100.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + NVIDIA_TESLA_P100(2), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla V100.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + NVIDIA_TESLA_V100(3), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4 GPU.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + NVIDIA_TESLA_P4(4), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla T4.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + NVIDIA_TESLA_T4(5), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla A100.
+     * 
+ * + * NVIDIA_TESLA_A100 = 11; + */ + NVIDIA_TESLA_A100(11), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_T4_VWS = 8; + */ + NVIDIA_TESLA_T4_VWS(8), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P100_VWS = 9; + */ + NVIDIA_TESLA_P100_VWS(9), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4 GPU Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P4_VWS = 10; + */ + NVIDIA_TESLA_P4_VWS(10), + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V2.
+     * 
+ * + * TPU_V2 = 6; + */ + TPU_V2(6), + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V3.
+     * 
+ * + * TPU_V3 = 7; + */ + TPU_V3(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Accelerator type is not specified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla K80.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + public static final int NVIDIA_TESLA_K80_VALUE = 1; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P100.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + public static final int NVIDIA_TESLA_P100_VALUE = 2; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla V100.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + public static final int NVIDIA_TESLA_V100_VALUE = 3; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4 GPU.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + public static final int NVIDIA_TESLA_P4_VALUE = 4; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla T4.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + public static final int NVIDIA_TESLA_T4_VALUE = 5; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla A100.
+     * 
+ * + * NVIDIA_TESLA_A100 = 11; + */ + public static final int NVIDIA_TESLA_A100_VALUE = 11; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_T4_VWS = 8; + */ + public static final int NVIDIA_TESLA_T4_VWS_VALUE = 8; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P100_VWS = 9; + */ + public static final int NVIDIA_TESLA_P100_VWS_VALUE = 9; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4 GPU Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P4_VWS = 10; + */ + public static final int NVIDIA_TESLA_P4_VWS_VALUE = 10; + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V2.
+     * 
+ * + * TPU_V2 = 6; + */ + public static final int TPU_V2_VALUE = 6; + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V3.
+     * 
+ * + * TPU_V3 = 7; + */ + public static final int TPU_V3_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AcceleratorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AcceleratorType forNumber(int value) { + switch (value) { + case 0: + return ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return NVIDIA_TESLA_K80; + case 2: + return NVIDIA_TESLA_P100; + case 3: + return NVIDIA_TESLA_V100; + case 4: + return NVIDIA_TESLA_P4; + case 5: + return NVIDIA_TESLA_T4; + case 11: + return NVIDIA_TESLA_A100; + case 8: + return NVIDIA_TESLA_T4_VWS; + case 9: + return NVIDIA_TESLA_P100_VWS; + case 10: + return NVIDIA_TESLA_P4_VWS; + case 6: + return TPU_V2; + case 7: + return TPU_V3; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AcceleratorType findValueByNumber(int number) { + return AcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(0); + } + + private static final AcceleratorType[] VALUES = values(); + + public static AcceleratorType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.AcceleratorType) + } + + /** + * + * + *
+   * The definition of the states of this instance.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Instance.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The control logic is starting the instance.
+     * 
+ * + * STARTING = 1; + */ + STARTING(1), + /** + * + * + *
+     * The control logic is installing required frameworks and registering the
+     * instance with notebook proxy
+     * 
+ * + * PROVISIONING = 2; + */ + PROVISIONING(2), + /** + * + * + *
+     * The instance is running.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + * + * + *
+     * The control logic is stopping the instance.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The instance is stopped.
+     * 
+ * + * STOPPED = 5; + */ + STOPPED(5), + /** + * + * + *
+     * The instance is deleted.
+     * 
+ * + * DELETED = 6; + */ + DELETED(6), + /** + * + * + *
+     * The instance is upgrading.
+     * 
+ * + * UPGRADING = 7; + */ + UPGRADING(7), + /** + * + * + *
+     * The instance is being created.
+     * 
+ * + * INITIALIZING = 8; + */ + INITIALIZING(8), + /** + * + * + *
+     * The instance is getting registered.
+     * 
+ * + * REGISTERING = 9; + */ + REGISTERING(9), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The control logic is starting the instance.
+     * 
+ * + * STARTING = 1; + */ + public static final int STARTING_VALUE = 1; + /** + * + * + *
+     * The control logic is installing required frameworks and registering the
+     * instance with notebook proxy
+     * 
+ * + * PROVISIONING = 2; + */ + public static final int PROVISIONING_VALUE = 2; + /** + * + * + *
+     * The instance is running.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + * + * + *
+     * The control logic is stopping the instance.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The instance is stopped.
+     * 
+ * + * STOPPED = 5; + */ + public static final int STOPPED_VALUE = 5; + /** + * + * + *
+     * The instance is deleted.
+     * 
+ * + * DELETED = 6; + */ + public static final int DELETED_VALUE = 6; + /** + * + * + *
+     * The instance is upgrading.
+     * 
+ * + * UPGRADING = 7; + */ + public static final int UPGRADING_VALUE = 7; + /** + * + * + *
+     * The instance is being created.
+     * 
+ * + * INITIALIZING = 8; + */ + public static final int INITIALIZING_VALUE = 8; + /** + * + * + *
+     * The instance is getting registered.
+     * 
+ * + * REGISTERING = 9; + */ + public static final int REGISTERING_VALUE = 9; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STARTING; + case 2: + return PROVISIONING; + case 3: + return ACTIVE; + case 4: + return STOPPING; + case 5: + return STOPPED; + case 6: + return DELETED; + case 7: + return UPGRADING; + case 8: + return INITIALIZING; + case 9: + return REGISTERING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.State) + } + + /** + * + * + *
+   * Possible disk types for notebook instances.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Instance.DiskType} + */ + public enum DiskType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Disk type not set.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + DISK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Standard persistent disk type.
+     * 
+ * + * PD_STANDARD = 1; + */ + PD_STANDARD(1), + /** + * + * + *
+     * SSD persistent disk type.
+     * 
+ * + * PD_SSD = 2; + */ + PD_SSD(2), + /** + * + * + *
+     * Balanced persistent disk type.
+     * 
+ * + * PD_BALANCED = 3; + */ + PD_BALANCED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Disk type not set.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + public static final int DISK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Standard persistent disk type.
+     * 
+ * + * PD_STANDARD = 1; + */ + public static final int PD_STANDARD_VALUE = 1; + /** + * + * + *
+     * SSD persistent disk type.
+     * 
+ * + * PD_SSD = 2; + */ + public static final int PD_SSD_VALUE = 2; + /** + * + * + *
+     * Balanced persistent disk type.
+     * 
+ * + * PD_BALANCED = 3; + */ + public static final int PD_BALANCED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiskType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiskType forNumber(int value) { + switch (value) { + case 0: + return DISK_TYPE_UNSPECIFIED; + case 1: + return PD_STANDARD; + case 2: + return PD_SSD; + case 3: + return PD_BALANCED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiskType findValueByNumber(int number) { + return DiskType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(2); + } + + private static final DiskType[] VALUES = values(); + + public static DiskType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiskType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.DiskType) + } + + /** + * + * + *
+   * Definition of the disk encryption options.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Instance.DiskEncryption} + */ + public enum DiskEncryption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Disk encryption is not specified.
+     * 
+ * + * DISK_ENCRYPTION_UNSPECIFIED = 0; + */ + DISK_ENCRYPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Use Google managed encryption keys to encrypt the boot disk.
+     * 
+ * + * GMEK = 1; + */ + GMEK(1), + /** + * + * + *
+     * Use customer managed encryption keys to encrypt the boot disk.
+     * 
+ * + * CMEK = 2; + */ + CMEK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Disk encryption is not specified.
+     * 
+ * + * DISK_ENCRYPTION_UNSPECIFIED = 0; + */ + public static final int DISK_ENCRYPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use Google managed encryption keys to encrypt the boot disk.
+     * 
+ * + * GMEK = 1; + */ + public static final int GMEK_VALUE = 1; + /** + * + * + *
+     * Use customer managed encryption keys to encrypt the boot disk.
+     * 
+ * + * CMEK = 2; + */ + public static final int CMEK_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiskEncryption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiskEncryption forNumber(int value) { + switch (value) { + case 0: + return DISK_ENCRYPTION_UNSPECIFIED; + case 1: + return GMEK; + case 2: + return CMEK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiskEncryption findValueByNumber(int number) { + return DiskEncryption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(3); + } + + private static final DiskEncryption[] VALUES = values(); + + public static DiskEncryption valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiskEncryption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.DiskEncryption) + } + + /** + * + * + *
+   * The type of vNIC driver.
+   * Default should be UNSPECIFIED_NIC_TYPE.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Instance.NicType} + */ + public enum NicType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No type specified.
+     * 
+ * + * UNSPECIFIED_NIC_TYPE = 0; + */ + UNSPECIFIED_NIC_TYPE(0), + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + VIRTIO_NET(1), + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + GVNIC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No type specified.
+     * 
+ * + * UNSPECIFIED_NIC_TYPE = 0; + */ + public static final int UNSPECIFIED_NIC_TYPE_VALUE = 0; + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + public static final int VIRTIO_NET_VALUE = 1; + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + public static final int GVNIC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NicType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NicType forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED_NIC_TYPE; + case 1: + return VIRTIO_NET; + case 2: + return GVNIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NicType findValueByNumber(int number) { + return NicType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Instance.getDescriptor().getEnumTypes().get(4); + } + + private static final NicType[] VALUES = values(); + + public static NicType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NicType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.NicType) + } + + public interface AcceleratorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.AcceleratorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The type. + */ + com.google.cloud.notebooks.v1.Instance.AcceleratorType getType(); + + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + long getCoreCount(); + } + /** + * + * + *
+   * Definition of a hardware accelerator. Note that not all combinations
+   * of `type` and `core_count` are valid. Check [GPUs on
+   * Compute Engine](/compute/docs/gpus/#gpus-list) to find a valid
+   * combination. TPUs are not supported.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.AcceleratorConfig} + */ + public static final class AcceleratorConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.AcceleratorConfig) + AcceleratorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcceleratorConfig.newBuilder() to construct. + private AcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AcceleratorConfig() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcceleratorConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AcceleratorConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: + { + coreCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.class, + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of this accelerator.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.AcceleratorType result = + com.google.cloud.notebooks.v1.Instance.AcceleratorType.valueOf(type_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.AcceleratorType.UNRECOGNIZED + : result; + } + + public static final int CORE_COUNT_FIELD_NUMBER = 2; + private long coreCount_; + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.notebooks.v1.Instance.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (coreCount_ != 0L) { + output.writeInt64(2, coreCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.notebooks.v1.Instance.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (coreCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, coreCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Instance.AcceleratorConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig other = + (com.google.cloud.notebooks.v1.Instance.AcceleratorConfig) obj; + + if (type_ != other.type_) return false; + if (getCoreCount() != other.getCoreCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Definition of a hardware accelerator. Note that not all combinations
+     * of `type` and `core_count` are valid. Check [GPUs on
+     * Compute Engine](/compute/docs/gpus/#gpus-list) to find a valid
+     * combination. TPUs are not supported.
+     * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.AcceleratorConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.AcceleratorConfig) + com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.class, + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + coreCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig build() { + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig buildPartial() { + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig result = + new com.google.cloud.notebooks.v1.Instance.AcceleratorConfig(this); + result.type_ = type_; + result.coreCount_ = coreCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Instance.AcceleratorConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.Instance.AcceleratorConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance.AcceleratorConfig other) { + if (other == com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getCoreCount() != 0L) { + setCoreCount(other.getCoreCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.Instance.AcceleratorConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.AcceleratorType result = + com.google.cloud.notebooks.v1.Instance.AcceleratorType.valueOf(type_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.AcceleratorType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.notebooks.v1.Instance.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of this accelerator.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private long coreCount_; + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @param value The coreCount to set. + * @return This builder for chaining. + */ + public Builder setCoreCount(long value) { + + coreCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Count of cores of this accelerator.
+       * 
+ * + * int64 core_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoreCount() { + + coreCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Instance.AcceleratorConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.AcceleratorConfig) + private static final com.google.cloud.notebooks.v1.Instance.AcceleratorConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.AcceleratorConfig(); + } + + public static com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceleratorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AcceleratorConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.Disk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Indicates whether the disk will be auto-deleted when the instance is
+     * deleted (but not when the disk is detached from the instance).
+     * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + boolean getAutoDelete(); + + /** + * + * + *
+     * Indicates that this is a boot disk. The virtual machine will use the
+     * first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + boolean getBoot(); + + /** + * + * + *
+     * Indicates a unique device name of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to
+     * this disk, in the form persistent-disk-x, where x is a number assigned by
+     * Google Compute Engine.This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + java.lang.String getDeviceName(); + /** + * + * + *
+     * Indicates a unique device name of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to
+     * this disk, in the form persistent-disk-x, where x is a number assigned by
+     * Google Compute Engine.This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + com.google.protobuf.ByteString getDeviceNameBytes(); + + /** + * + * + *
+     * Indicates the size of the disk in base-2 GB.
+     * 
+ * + * int64 disk_size_gb = 4; + * + * @return The diskSizeGb. + */ + long getDiskSizeGb(); + + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + java.util.List + getGuestOsFeaturesList(); + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures(int index); + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + int getGuestOsFeaturesCount(); + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + java.util.List + getGuestOsFeaturesOrBuilderList(); + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder getGuestOsFeaturesOrBuilder( + int index); + + /** + * + * + *
+     * A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk
+     * would have a unique index number.
+     * 
+ * + * int64 index = 6; + * + * @return The index. + */ + long getIndex(); + + /** + * + * + *
+     * Indicates the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always
+     * use SCSI and the request will fail if you attempt to attach a persistent
+     * disk in any other format than SCSI. Local SSDs can use either NVME or
+     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+     * performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @return The interface. + */ + java.lang.String getInterface(); + /** + * + * + *
+     * Indicates the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always
+     * use SCSI and the request will fail if you attempt to attach a persistent
+     * disk in any other format than SCSI. Local SSDs can use either NVME or
+     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+     * performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * + * + *
+     * Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The kind. + */ + java.lang.String getKind(); + /** + * + * + *
+     * Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + java.util.List getLicensesList(); + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + int getLicensesCount(); + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + java.lang.String getLicenses(int index); + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + com.google.protobuf.ByteString getLicensesBytes(int index); + + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @return The mode. + */ + java.lang.String getMode(); + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + com.google.protobuf.ByteString getModeBytes(); + + /** + * + * + *
+     * Indicates a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+     * Indicates a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+     * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + } + /** + * + * + *
+   * An instance-attached disk resource.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.Disk} + */ + public static final class Disk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.Disk) + DiskOrBuilder { + private static final long serialVersionUID = 0L; + // Use Disk.newBuilder() to construct. + private Disk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Disk() { + deviceName_ = ""; + guestOsFeatures_ = java.util.Collections.emptyList(); + interface_ = ""; + kind_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + mode_ = ""; + source_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Disk(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Disk( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + autoDelete_ = input.readBool(); + break; + } + case 16: + { + boot_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + deviceName_ = s; + break; + } + case 32: + { + diskSizeGb_ = input.readInt64(); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + guestOsFeatures_ = + new java.util.ArrayList< + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature>(); + mutable_bitField0_ |= 0x00000001; + } + guestOsFeatures_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.parser(), + extensionRegistry)); + break; + } + case 48: + { + index_ = input.readInt64(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + interface_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + kind_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + licenses_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + licenses_.add(s); + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + mode_ = s; + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + source_ = s; + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + licenses_ = licenses_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.Disk.class, + com.google.cloud.notebooks.v1.Instance.Disk.Builder.class); + } + + public interface GuestOsFeatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The ID of a supported feature. Read  Enabling guest operating system
+       * features to see a list of available options.
+       * Valid values:
+       *     FEATURE_TYPE_UNSPECIFIED
+       *     MULTI_IP_SUBNET
+       *     SECURE_BOOT
+       *     UEFI_COMPATIBLE
+       *     VIRTIO_SCSI_MULTIQUEUE
+       *     WINDOWS
+       * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+       * The ID of a supported feature. Read  Enabling guest operating system
+       * features to see a list of available options.
+       * Valid values:
+       *     FEATURE_TYPE_UNSPECIFIED
+       *     MULTI_IP_SUBNET
+       *     SECURE_BOOT
+       *     UEFI_COMPATIBLE
+       *     VIRTIO_SCSI_MULTIQUEUE
+       *     WINDOWS
+       * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + } + /** + * + * + *
+     * Guest OS features for boot disk.
+     * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature} + */ + public static final class GuestOsFeature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + GuestOsFeatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuestOsFeature.newBuilder() to construct. + private GuestOsFeature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuestOsFeature() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuestOsFeature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GuestOsFeature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.class, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + * + * + *
+       * The ID of a supported feature. Read  Enabling guest operating system
+       * features to see a list of available options.
+       * Valid values:
+       *     FEATURE_TYPE_UNSPECIFIED
+       *     MULTI_IP_SUBNET
+       *     SECURE_BOOT
+       *     UEFI_COMPATIBLE
+       *     VIRTIO_SCSI_MULTIQUEUE
+       *     WINDOWS
+       * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+       * The ID of a supported feature. Read  Enabling guest operating system
+       * features to see a list of available options.
+       * Valid values:
+       *     FEATURE_TYPE_UNSPECIFIED
+       *     MULTI_IP_SUBNET
+       *     SECURE_BOOT
+       *     UEFI_COMPATIBLE
+       *     VIRTIO_SCSI_MULTIQUEUE
+       *     WINDOWS
+       * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature other = + (com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) obj; + + if (!getType().equals(other.getType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Guest OS features for boot disk.
+       * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.class, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature build() { + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature buildPartial() { + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature result = + new com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature(this); + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) { + return mergeFrom((com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature other) { + if (other + == com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.getDefaultInstance()) + return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         *     FEATURE_TYPE_UNSPECIFIED
+         *     MULTI_IP_SUBNET
+         *     SECURE_BOOT
+         *     UEFI_COMPATIBLE
+         *     VIRTIO_SCSI_MULTIQUEUE
+         *     WINDOWS
+         * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         *     FEATURE_TYPE_UNSPECIFIED
+         *     MULTI_IP_SUBNET
+         *     SECURE_BOOT
+         *     UEFI_COMPATIBLE
+         *     VIRTIO_SCSI_MULTIQUEUE
+         *     WINDOWS
+         * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         *     FEATURE_TYPE_UNSPECIFIED
+         *     MULTI_IP_SUBNET
+         *     SECURE_BOOT
+         *     UEFI_COMPATIBLE
+         *     VIRTIO_SCSI_MULTIQUEUE
+         *     WINDOWS
+         * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         *     FEATURE_TYPE_UNSPECIFIED
+         *     MULTI_IP_SUBNET
+         *     SECURE_BOOT
+         *     UEFI_COMPATIBLE
+         *     VIRTIO_SCSI_MULTIQUEUE
+         *     WINDOWS
+         * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+         * The ID of a supported feature. Read  Enabling guest operating system
+         * features to see a list of available options.
+         * Valid values:
+         *     FEATURE_TYPE_UNSPECIFIED
+         *     MULTI_IP_SUBNET
+         *     SECURE_BOOT
+         *     UEFI_COMPATIBLE
+         *     VIRTIO_SCSI_MULTIQUEUE
+         *     WINDOWS
+         * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature) + private static final com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature(); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestOsFeature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GuestOsFeature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int AUTO_DELETE_FIELD_NUMBER = 1; + private boolean autoDelete_; + /** + * + * + *
+     * Indicates whether the disk will be auto-deleted when the instance is
+     * deleted (but not when the disk is detached from the instance).
+     * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + + public static final int BOOT_FIELD_NUMBER = 2; + private boolean boot_; + /** + * + * + *
+     * Indicates that this is a boot disk. The virtual machine will use the
+     * first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object deviceName_; + /** + * + * + *
+     * Indicates a unique device name of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to
+     * this disk, in the form persistent-disk-x, where x is a number assigned by
+     * Google Compute Engine.This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + @java.lang.Override + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } + } + /** + * + * + *
+     * Indicates a unique device name of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to
+     * this disk, in the form persistent-disk-x, where x is a number assigned by
+     * Google Compute Engine.This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_SIZE_GB_FIELD_NUMBER = 4; + private long diskSizeGb_; + /** + * + * + *
+     * Indicates the size of the disk in base-2 GB.
+     * 
+ * + * int64 disk_size_gb = 4; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + + public static final int GUEST_OS_FEATURES_FIELD_NUMBER = 5; + private java.util.List + guestOsFeatures_; + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public java.util.List + getGuestOsFeaturesList() { + return guestOsFeatures_; + } + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList() { + return guestOsFeatures_; + } + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public int getGuestOsFeaturesCount() { + return guestOsFeatures_.size(); + } + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures( + int index) { + return guestOsFeatures_.get(index); + } + /** + * + * + *
+     * Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index) { + return guestOsFeatures_.get(index); + } + + public static final int INDEX_FIELD_NUMBER = 6; + private long index_; + /** + * + * + *
+     * A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk
+     * would have a unique index number.
+     * 
+ * + * int64 index = 6; + * + * @return The index. + */ + @java.lang.Override + public long getIndex() { + return index_; + } + + public static final int INTERFACE_FIELD_NUMBER = 7; + private volatile java.lang.Object interface_; + /** + * + * + *
+     * Indicates the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always
+     * use SCSI and the request will fail if you attempt to attach a persistent
+     * disk in any other format than SCSI. Local SSDs can use either NVME or
+     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+     * performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @return The interface. + */ + @java.lang.Override + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } + } + /** + * + * + *
+     * Indicates the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always
+     * use SCSI and the request will fail if you attempt to attach a persistent
+     * disk in any other format than SCSI. Local SSDs can use either NVME or
+     * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+     * performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 8; + private volatile java.lang.Object kind_; + /** + * + * + *
+     * Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + /** + * + * + *
+     * Type of the resource. Always compute#attachedDisk for attached
+     * disks.
+     * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSES_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList licenses_; + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_; + } + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + /** + * + * + *
+     * A list of publicly visible licenses. Reserved for Google's use.
+     * A License represents billing and aggregate usage data for public
+     * and marketplace images.
+     * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + + public static final int MODE_FIELD_NUMBER = 10; + private volatile java.lang.Object mode_; + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @return The mode. + */ + @java.lang.Override + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } + } + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 11; + private volatile java.lang.Object source_; + /** + * + * + *
+     * Indicates a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+     * Indicates a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 12; + private volatile java.lang.Object type_; + /** + * + * + *
+     * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (autoDelete_ != false) { + output.writeBool(1, autoDelete_); + } + if (boot_ != false) { + output.writeBool(2, boot_); + } + if (!getDeviceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceName_); + } + if (diskSizeGb_ != 0L) { + output.writeInt64(4, diskSizeGb_); + } + for (int i = 0; i < guestOsFeatures_.size(); i++) { + output.writeMessage(5, guestOsFeatures_.get(i)); + } + if (index_ != 0L) { + output.writeInt64(6, index_); + } + if (!getInterfaceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, interface_); + } + if (!getKindBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, kind_); + } + for (int i = 0; i < licenses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, licenses_.getRaw(i)); + } + if (!getModeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, mode_); + } + if (!getSourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, source_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (autoDelete_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, autoDelete_); + } + if (boot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, boot_); + } + if (!getDeviceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceName_); + } + if (diskSizeGb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, diskSizeGb_); + } + for (int i = 0; i < guestOsFeatures_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, guestOsFeatures_.get(i)); + } + if (index_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, index_); + } + if (!getInterfaceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, interface_); + } + if (!getKindBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, kind_); + } + { + int dataSize = 0; + for (int i = 0; i < licenses_.size(); i++) { + dataSize += computeStringSizeNoTag(licenses_.getRaw(i)); + } + size += dataSize; + size += 1 * getLicensesList().size(); + } + if (!getModeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, mode_); + } + if (!getSourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, source_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Instance.Disk)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Instance.Disk other = + (com.google.cloud.notebooks.v1.Instance.Disk) obj; + + if (getAutoDelete() != other.getAutoDelete()) return false; + if (getBoot() != other.getBoot()) return false; + if (!getDeviceName().equals(other.getDeviceName())) return false; + if (getDiskSizeGb() != other.getDiskSizeGb()) return false; + if (!getGuestOsFeaturesList().equals(other.getGuestOsFeaturesList())) return false; + if (getIndex() != other.getIndex()) return false; + if (!getInterface().equals(other.getInterface())) return false; + if (!getKind().equals(other.getKind())) return false; + if (!getLicensesList().equals(other.getLicensesList())) return false; + if (!getMode().equals(other.getMode())) return false; + if (!getSource().equals(other.getSource())) return false; + if (!getType().equals(other.getType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUTO_DELETE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoDelete()); + hash = (37 * hash) + BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoot()); + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb()); + if (getGuestOsFeaturesCount() > 0) { + hash = (37 * hash) + GUEST_OS_FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getGuestOsFeaturesList().hashCode(); + } + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIndex()); + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + if (getLicensesCount() > 0) { + hash = (37 * hash) + LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getLicensesList().hashCode(); + } + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.Instance.Disk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An instance-attached disk resource.
+     * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.Disk} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.Disk) + com.google.cloud.notebooks.v1.Instance.DiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.Disk.class, + com.google.cloud.notebooks.v1.Instance.Disk.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Instance.Disk.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGuestOsFeaturesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + autoDelete_ = false; + + boot_ = false; + + deviceName_ = ""; + + diskSizeGb_ = 0L; + + if (guestOsFeaturesBuilder_ == null) { + guestOsFeatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + guestOsFeaturesBuilder_.clear(); + } + index_ = 0L; + + interface_ = ""; + + kind_ = ""; + + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + mode_ = ""; + + source_ = ""; + + type_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Instance.Disk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk build() { + com.google.cloud.notebooks.v1.Instance.Disk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk buildPartial() { + com.google.cloud.notebooks.v1.Instance.Disk result = + new com.google.cloud.notebooks.v1.Instance.Disk(this); + int from_bitField0_ = bitField0_; + result.autoDelete_ = autoDelete_; + result.boot_ = boot_; + result.deviceName_ = deviceName_; + result.diskSizeGb_ = diskSizeGb_; + if (guestOsFeaturesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.guestOsFeatures_ = guestOsFeatures_; + } else { + result.guestOsFeatures_ = guestOsFeaturesBuilder_.build(); + } + result.index_ = index_; + result.interface_ = interface_; + result.kind_ = kind_; + if (((bitField0_ & 0x00000002) != 0)) { + licenses_ = licenses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.licenses_ = licenses_; + result.mode_ = mode_; + result.source_ = source_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Instance.Disk) { + return mergeFrom((com.google.cloud.notebooks.v1.Instance.Disk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance.Disk other) { + if (other == com.google.cloud.notebooks.v1.Instance.Disk.getDefaultInstance()) return this; + if (other.getAutoDelete() != false) { + setAutoDelete(other.getAutoDelete()); + } + if (other.getBoot() != false) { + setBoot(other.getBoot()); + } + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + onChanged(); + } + if (other.getDiskSizeGb() != 0L) { + setDiskSizeGb(other.getDiskSizeGb()); + } + if (guestOsFeaturesBuilder_ == null) { + if (!other.guestOsFeatures_.isEmpty()) { + if (guestOsFeatures_.isEmpty()) { + guestOsFeatures_ = other.guestOsFeatures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.addAll(other.guestOsFeatures_); + } + onChanged(); + } + } else { + if (!other.guestOsFeatures_.isEmpty()) { + if (guestOsFeaturesBuilder_.isEmpty()) { + guestOsFeaturesBuilder_.dispose(); + guestOsFeaturesBuilder_ = null; + guestOsFeatures_ = other.guestOsFeatures_; + bitField0_ = (bitField0_ & ~0x00000001); + guestOsFeaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGuestOsFeaturesFieldBuilder() + : null; + } else { + guestOsFeaturesBuilder_.addAllMessages(other.guestOsFeatures_); + } + } + } + if (other.getIndex() != 0L) { + setIndex(other.getIndex()); + } + if (!other.getInterface().isEmpty()) { + interface_ = other.interface_; + onChanged(); + } + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + onChanged(); + } + if (!other.licenses_.isEmpty()) { + if (licenses_.isEmpty()) { + licenses_ = other.licenses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLicensesIsMutable(); + licenses_.addAll(other.licenses_); + } + onChanged(); + } + if (!other.getMode().isEmpty()) { + mode_ = other.mode_; + onChanged(); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Instance.Disk parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.Instance.Disk) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean autoDelete_; + /** + * + * + *
+       * Indicates whether the disk will be auto-deleted when the instance is
+       * deleted (but not when the disk is detached from the instance).
+       * 
+ * + * bool auto_delete = 1; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + /** + * + * + *
+       * Indicates whether the disk will be auto-deleted when the instance is
+       * deleted (but not when the disk is detached from the instance).
+       * 
+ * + * bool auto_delete = 1; + * + * @param value The autoDelete to set. + * @return This builder for chaining. + */ + public Builder setAutoDelete(boolean value) { + + autoDelete_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates whether the disk will be auto-deleted when the instance is
+       * deleted (but not when the disk is detached from the instance).
+       * 
+ * + * bool auto_delete = 1; + * + * @return This builder for chaining. + */ + public Builder clearAutoDelete() { + + autoDelete_ = false; + onChanged(); + return this; + } + + private boolean boot_; + /** + * + * + *
+       * Indicates that this is a boot disk. The virtual machine will use the
+       * first partition of the disk for its root filesystem.
+       * 
+ * + * bool boot = 2; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + /** + * + * + *
+       * Indicates that this is a boot disk. The virtual machine will use the
+       * first partition of the disk for its root filesystem.
+       * 
+ * + * bool boot = 2; + * + * @param value The boot to set. + * @return This builder for chaining. + */ + public Builder setBoot(boolean value) { + + boot_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates that this is a boot disk. The virtual machine will use the
+       * first partition of the disk for its root filesystem.
+       * 
+ * + * bool boot = 2; + * + * @return This builder for chaining. + */ + public Builder clearBoot() { + + boot_ = false; + onChanged(); + return this; + } + + private java.lang.Object deviceName_ = ""; + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * /dev/disk/by-id/google-* tree of a Linux operating system running within
+       * the instance. This name can be used to reference the device for mounting,
+       * resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @return The deviceName. + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * /dev/disk/by-id/google-* tree of a Linux operating system running within
+       * the instance. This name can be used to reference the device for mounting,
+       * resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @return The bytes for deviceName. + */ + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * /dev/disk/by-id/google-* tree of a Linux operating system running within
+       * the instance. This name can be used to reference the device for mounting,
+       * resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @param value The deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * /dev/disk/by-id/google-* tree of a Linux operating system running within
+       * the instance. This name can be used to reference the device for mounting,
+       * resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDeviceName() { + + deviceName_ = getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates a unique device name of your choice that is reflected into the
+       * /dev/disk/by-id/google-* tree of a Linux operating system running within
+       * the instance. This name can be used to reference the device for mounting,
+       * resizing, and so on, from within the instance.
+       * If not specified, the server chooses a default device name to apply to
+       * this disk, in the form persistent-disk-x, where x is a number assigned by
+       * Google Compute Engine.This field is only applicable for persistent disks.
+       * 
+ * + * string device_name = 3; + * + * @param value The bytes for deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceName_ = value; + onChanged(); + return this; + } + + private long diskSizeGb_; + /** + * + * + *
+       * Indicates the size of the disk in base-2 GB.
+       * 
+ * + * int64 disk_size_gb = 4; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + /** + * + * + *
+       * Indicates the size of the disk in base-2 GB.
+       * 
+ * + * int64 disk_size_gb = 4; + * + * @param value The diskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setDiskSizeGb(long value) { + + diskSizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the size of the disk in base-2 GB.
+       * 
+ * + * int64 disk_size_gb = 4; + * + * @return This builder for chaining. + */ + public Builder clearDiskSizeGb() { + + diskSizeGb_ = 0L; + onChanged(); + return this; + } + + private java.util.List + guestOsFeatures_ = java.util.Collections.emptyList(); + + private void ensureGuestOsFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + guestOsFeatures_ = + new java.util.ArrayList( + guestOsFeatures_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + guestOsFeaturesBuilder_; + + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public java.util.List + getGuestOsFeaturesList() { + if (guestOsFeaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestOsFeatures_); + } else { + return guestOsFeaturesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public int getGuestOsFeaturesCount() { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.size(); + } else { + return guestOsFeaturesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature getGuestOsFeatures( + int index) { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.get(index); + } else { + return guestOsFeaturesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder setGuestOsFeatures( + int index, com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.set(index, value); + onChanged(); + } else { + guestOsFeaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder setGuestOsFeatures( + int index, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.set(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addGuestOsFeatures( + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(value); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addGuestOsFeatures( + int index, com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(index, value); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addGuestOsFeatures( + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addGuestOsFeatures( + int index, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder addAllGuestOsFeatures( + java.lang.Iterable + values) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeatures_); + onChanged(); + } else { + guestOsFeaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder clearGuestOsFeatures() { + if (guestOsFeaturesBuilder_ == null) { + guestOsFeatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + guestOsFeaturesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public Builder removeGuestOsFeatures(int index) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.remove(index); + onChanged(); + } else { + guestOsFeaturesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + getGuestOsFeaturesBuilder(int index) { + return getGuestOsFeaturesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index) { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.get(index); + } else { + return guestOsFeaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public java.util.List< + ? extends com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList() { + if (guestOsFeaturesBuilder_ != null) { + return guestOsFeaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestOsFeatures_); + } + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + addGuestOsFeaturesBuilder() { + return getGuestOsFeaturesFieldBuilder() + .addBuilder( + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.getDefaultInstance()); + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder + addGuestOsFeaturesBuilder(int index) { + return getGuestOsFeaturesFieldBuilder() + .addBuilder( + index, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.getDefaultInstance()); + } + /** + * + * + *
+       * Indicates a list of features to enable on the guest operating system.
+       * Applicable only for bootable images. Read  Enabling guest operating
+       * system features to see a list of available options.
+       * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * + */ + public java.util.List + getGuestOsFeaturesBuilderList() { + return getGuestOsFeaturesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder> + getGuestOsFeaturesFieldBuilder() { + if (guestOsFeaturesBuilder_ == null) { + guestOsFeaturesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature.Builder, + com.google.cloud.notebooks.v1.Instance.Disk.GuestOsFeatureOrBuilder>( + guestOsFeatures_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + guestOsFeatures_ = null; + } + return guestOsFeaturesBuilder_; + } + + private long index_; + /** + * + * + *
+       * A zero-based index to this disk, where 0 is reserved for the
+       * boot disk. If you have many disks attached to an instance, each disk
+       * would have a unique index number.
+       * 
+ * + * int64 index = 6; + * + * @return The index. + */ + @java.lang.Override + public long getIndex() { + return index_; + } + /** + * + * + *
+       * A zero-based index to this disk, where 0 is reserved for the
+       * boot disk. If you have many disks attached to an instance, each disk
+       * would have a unique index number.
+       * 
+ * + * int64 index = 6; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(long value) { + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A zero-based index to this disk, where 0 is reserved for the
+       * boot disk. If you have many disks attached to an instance, each disk
+       * would have a unique index number.
+       * 
+ * + * int64 index = 6; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object interface_ = ""; + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       *     NVME
+       *     SCSI
+       * 
+ * + * string interface = 7; + * + * @return The interface. + */ + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       *     NVME
+       *     SCSI
+       * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       *     NVME
+       *     SCSI
+       * 
+ * + * string interface = 7; + * + * @param value The interface to set. + * @return This builder for chaining. + */ + public Builder setInterface(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + interface_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       *     NVME
+       *     SCSI
+       * 
+ * + * string interface = 7; + * + * @return This builder for chaining. + */ + public Builder clearInterface() { + + interface_ = getDefaultInstance().getInterface(); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the disk interface to use for attaching this disk, which is
+       * either SCSI or NVME. The default is SCSI. Persistent disks must always
+       * use SCSI and the request will fail if you attempt to attach a persistent
+       * disk in any other format than SCSI. Local SSDs can use either NVME or
+       * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
+       * performance.
+       * Valid values:
+       *     NVME
+       *     SCSI
+       * 
+ * + * string interface = 7; + * + * @param value The bytes for interface to set. + * @return This builder for chaining. + */ + public Builder setInterfaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + interface_ = value; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + + kind_ = getDefaultInstance().getKind(); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of the resource. Always compute#attachedDisk for attached
+       * disks.
+       * 
+ * + * string kind = 8; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kind_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList licenses_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureLicensesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_.getUnmodifiableView(); + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param index The index to set the value at. + * @param value The licenses to set. + * @return This builder for chaining. + */ + public Builder setLicenses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param value The licenses to add. + * @return This builder for chaining. + */ + public Builder addLicenses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param values The licenses to add. + * @return This builder for chaining. + */ + public Builder addAllLicenses(java.lang.Iterable values) { + ensureLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenses_); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @return This builder for chaining. + */ + public Builder clearLicenses() { + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of publicly visible licenses. Reserved for Google's use.
+       * A License represents billing and aggregate usage data for public
+       * and marketplace images.
+       * 
+ * + * repeated string licenses = 9; + * + * @param value The bytes of the licenses to add. + * @return This builder for chaining. + */ + public Builder addLicensesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLicensesIsMutable(); + licenses_.add(value); + onChanged(); + return this; + } + + private java.lang.Object mode_ = ""; + /** + * + * + *
+       * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+       * not specified, the default is to attach the disk in READ_WRITE mode.
+       * Valid values:
+       *     READ_ONLY
+       *     READ_WRITE
+       * 
+ * + * string mode = 10; + * + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+       * not specified, the default is to attach the disk in READ_WRITE mode.
+       * Valid values:
+       *     READ_ONLY
+       *     READ_WRITE
+       * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+       * not specified, the default is to attach the disk in READ_WRITE mode.
+       * Valid values:
+       *     READ_ONLY
+       *     READ_WRITE
+       * 
+ * + * string mode = 10; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+       * not specified, the default is to attach the disk in READ_WRITE mode.
+       * Valid values:
+       *     READ_ONLY
+       *     READ_WRITE
+       * 
+ * + * string mode = 10; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = getDefaultInstance().getMode(); + onChanged(); + return this; + } + /** + * + * + *
+       * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+       * not specified, the default is to attach the disk in READ_WRITE mode.
+       * Valid values:
+       *     READ_ONLY
+       *     READ_WRITE
+       * 
+ * + * string mode = 10; + * + * @param value The bytes for mode to set. + * @return This builder for chaining. + */ + public Builder setModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mode_ = value; + onChanged(); + return this; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates a valid partial or full URL to an existing Persistent Disk
+       * resource.
+       * 
+ * + * string source = 11; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + source_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+       * Valid values:
+       *     PERSISTENT
+       *     SCRATCH
+       * 
+ * + * string type = 12; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+       * Valid values:
+       *     PERSISTENT
+       *     SCRATCH
+       * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+       * Valid values:
+       *     PERSISTENT
+       *     SCRATCH
+       * 
+ * + * string type = 12; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+       * Valid values:
+       *     PERSISTENT
+       *     SCRATCH
+       * 
+ * + * string type = 12; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+       * Indicates the type of the disk, either SCRATCH or PERSISTENT.
+       * Valid values:
+       *     PERSISTENT
+       *     SCRATCH
+       * 
+ * + * string type = 12; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Instance.Disk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.Disk) + private static final com.google.cloud.notebooks.v1.Instance.Disk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.Disk(); + } + + public static com.google.cloud.notebooks.v1.Instance.Disk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Disk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Disk(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ShieldedInstanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + boolean getEnableSecureBoot(); + + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + boolean getEnableVtpm(); + + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + boolean getEnableIntegrityMonitoring(); + } + /** + * + * + *
+   * A set of Shielded Instance options.
+   * Check [Images using supported Shielded VM features]
+   * Not all combinations are valid.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig} + */ + public static final class ShieldedInstanceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + ShieldedInstanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShieldedInstanceConfig.newBuilder() to construct. + private ShieldedInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ShieldedInstanceConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ShieldedInstanceConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ShieldedInstanceConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableSecureBoot_ = input.readBool(); + break; + } + case 16: + { + enableVtpm_ = input.readBool(); + break; + } + case 24: + { + enableIntegrityMonitoring_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.class, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder.class); + } + + public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; + private boolean enableSecureBoot_; + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + + public static final int ENABLE_VTPM_FIELD_NUMBER = 2; + private boolean enableVtpm_; + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + @java.lang.Override + public boolean getEnableVtpm() { + return enableVtpm_; + } + + public static final int ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER = 3; + private boolean enableIntegrityMonitoring_; + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + @java.lang.Override + public boolean getEnableIntegrityMonitoring() { + return enableIntegrityMonitoring_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableSecureBoot_ != false) { + output.writeBool(1, enableSecureBoot_); + } + if (enableVtpm_ != false) { + output.writeBool(2, enableVtpm_); + } + if (enableIntegrityMonitoring_ != false) { + output.writeBool(3, enableIntegrityMonitoring_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableSecureBoot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); + } + if (enableVtpm_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableVtpm_); + } + if (enableIntegrityMonitoring_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableIntegrityMonitoring_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig other = + (com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) obj; + + if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false; + if (getEnableVtpm() != other.getEnableVtpm()) return false; + if (getEnableIntegrityMonitoring() != other.getEnableIntegrityMonitoring()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_SECURE_BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); + hash = (37 * hash) + ENABLE_VTPM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVtpm()); + hash = (37 * hash) + ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableIntegrityMonitoring()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A set of Shielded Instance options.
+     * Check [Images using supported Shielded VM features]
+     * Not all combinations are valid.
+     * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.class, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enableSecureBoot_ = false; + + enableVtpm_ = false; + + enableIntegrityMonitoring_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig build() { + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig buildPartial() { + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig result = + new com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig(this); + result.enableSecureBoot_ = enableSecureBoot_; + result.enableVtpm_ = enableVtpm_; + result.enableIntegrityMonitoring_ = enableIntegrityMonitoring_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig other) { + if (other + == com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance()) + return this; + if (other.getEnableSecureBoot() != false) { + setEnableSecureBoot(other.getEnableSecureBoot()); + } + if (other.getEnableVtpm() != false) { + setEnableVtpm(other.getEnableVtpm()); + } + if (other.getEnableIntegrityMonitoring() != false) { + setEnableIntegrityMonitoring(other.getEnableIntegrityMonitoring()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enableSecureBoot_; + /** + * + * + *
+       * Defines whether the instance has Secure Boot enabled.
+       * Secure Boot helps ensure that the system only runs authentic software by
+       * verifying the digital signature of all boot components, and halting the
+       * boot process if signature verification fails. Disabled by default.
+       * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + /** + * + * + *
+       * Defines whether the instance has Secure Boot enabled.
+       * Secure Boot helps ensure that the system only runs authentic software by
+       * verifying the digital signature of all boot components, and halting the
+       * boot process if signature verification fails. Disabled by default.
+       * 
+ * + * bool enable_secure_boot = 1; + * + * @param value The enableSecureBoot to set. + * @return This builder for chaining. + */ + public Builder setEnableSecureBoot(boolean value) { + + enableSecureBoot_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Defines whether the instance has Secure Boot enabled.
+       * Secure Boot helps ensure that the system only runs authentic software by
+       * verifying the digital signature of all boot components, and halting the
+       * boot process if signature verification fails. Disabled by default.
+       * 
+ * + * bool enable_secure_boot = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableSecureBoot() { + + enableSecureBoot_ = false; + onChanged(); + return this; + } + + private boolean enableVtpm_; + /** + * + * + *
+       * Defines whether the instance has the vTPM enabled. Enabled by default.
+       * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + @java.lang.Override + public boolean getEnableVtpm() { + return enableVtpm_; + } + /** + * + * + *
+       * Defines whether the instance has the vTPM enabled. Enabled by default.
+       * 
+ * + * bool enable_vtpm = 2; + * + * @param value The enableVtpm to set. + * @return This builder for chaining. + */ + public Builder setEnableVtpm(boolean value) { + + enableVtpm_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Defines whether the instance has the vTPM enabled. Enabled by default.
+       * 
+ * + * bool enable_vtpm = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableVtpm() { + + enableVtpm_ = false; + onChanged(); + return this; + } + + private boolean enableIntegrityMonitoring_; + /** + * + * + *
+       * Defines whether the instance has integrity monitoring enabled.
+       * Enables monitoring and attestation of the boot integrity of the instance.
+       * The attestation is performed against the integrity policy baseline. This
+       * baseline is initially derived from the implicitly trusted boot image when
+       * the instance is created. Enabled by default.
+       * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + @java.lang.Override + public boolean getEnableIntegrityMonitoring() { + return enableIntegrityMonitoring_; + } + /** + * + * + *
+       * Defines whether the instance has integrity monitoring enabled.
+       * Enables monitoring and attestation of the boot integrity of the instance.
+       * The attestation is performed against the integrity policy baseline. This
+       * baseline is initially derived from the implicitly trusted boot image when
+       * the instance is created. Enabled by default.
+       * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @param value The enableIntegrityMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableIntegrityMonitoring(boolean value) { + + enableIntegrityMonitoring_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Defines whether the instance has integrity monitoring enabled.
+       * Enables monitoring and attestation of the boot integrity of the instance.
+       * The attestation is performed against the integrity policy baseline. This
+       * baseline is initially derived from the implicitly trusted boot image when
+       * the instance is created. Enabled by default.
+       * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableIntegrityMonitoring() { + + enableIntegrityMonitoring_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig) + private static final com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig(); + } + + public static com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ShieldedInstanceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ShieldedInstanceConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpgradeHistoryEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The snapshot of the boot disk of this notebook instance before upgrade.
+     * 
+ * + * string snapshot = 1; + * + * @return The snapshot. + */ + java.lang.String getSnapshot(); + /** + * + * + *
+     * The snapshot of the boot disk of this notebook instance before upgrade.
+     * 
+ * + * string snapshot = 1; + * + * @return The bytes for snapshot. + */ + com.google.protobuf.ByteString getSnapshotBytes(); + + /** + * + * + *
+     * The VM image before this instance upgrade.
+     * 
+ * + * string vm_image = 2; + * + * @return The vmImage. + */ + java.lang.String getVmImage(); + /** + * + * + *
+     * The VM image before this instance upgrade.
+     * 
+ * + * string vm_image = 2; + * + * @return The bytes for vmImage. + */ + com.google.protobuf.ByteString getVmImageBytes(); + + /** + * + * + *
+     * The container image before this instance upgrade.
+     * 
+ * + * string container_image = 3; + * + * @return The containerImage. + */ + java.lang.String getContainerImage(); + /** + * + * + *
+     * The container image before this instance upgrade.
+     * 
+ * + * string container_image = 3; + * + * @return The bytes for containerImage. + */ + com.google.protobuf.ByteString getContainerImageBytes(); + + /** + * + * + *
+     * The framework of this notebook instance.
+     * 
+ * + * string framework = 4; + * + * @return The framework. + */ + java.lang.String getFramework(); + /** + * + * + *
+     * The framework of this notebook instance.
+     * 
+ * + * string framework = 4; + * + * @return The bytes for framework. + */ + com.google.protobuf.ByteString getFrameworkBytes(); + + /** + * + * + *
+     * The version of the notebook instance before this upgrade.
+     * 
+ * + * string version = 5; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * The version of the notebook instance before this upgrade.
+     * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+     * The state of this instance upgrade history entry.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * The state of this instance upgrade history entry.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The state. + */ + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState(); + + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+     * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @return The targetImage. + */ + @java.lang.Deprecated + java.lang.String getTargetImage(); + /** + * + * + *
+     * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+     * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @return The bytes for targetImage. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getTargetImageBytes(); + + /** + * + * + *
+     * Action. Rolloback or Upgrade.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @return The enum numeric value on the wire for action. + */ + int getActionValue(); + /** + * + * + *
+     * Action. Rolloback or Upgrade.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @return The action. + */ + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction(); + + /** + * + * + *
+     * Target VM Version, like m63.
+     * 
+ * + * string target_version = 10; + * + * @return The targetVersion. + */ + java.lang.String getTargetVersion(); + /** + * + * + *
+     * Target VM Version, like m63.
+     * 
+ * + * string target_version = 10; + * + * @return The bytes for targetVersion. + */ + com.google.protobuf.ByteString getTargetVersionBytes(); + } + /** + * + * + *
+   * The entry of VM image upgrade history.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry} + */ + public static final class UpgradeHistoryEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + UpgradeHistoryEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeHistoryEntry.newBuilder() to construct. + private UpgradeHistoryEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeHistoryEntry() { + snapshot_ = ""; + vmImage_ = ""; + containerImage_ = ""; + framework_ = ""; + version_ = ""; + state_ = 0; + targetImage_ = ""; + action_ = 0; + targetVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeHistoryEntry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpgradeHistoryEntry( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + snapshot_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmImage_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + containerImage_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + framework_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetImage_ = s; + break; + } + case 72: + { + int rawValue = input.readEnum(); + + action_ = rawValue; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.class, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder.class); + } + + /** + * + * + *
+     * The definition of the states of this upgrade history entry.
+     * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * State is not specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The instance upgrade is started.
+       * 
+ * + * STARTED = 1; + */ + STARTED(1), + /** + * + * + *
+       * The instance upgrade is succeeded.
+       * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + * + * + *
+       * The instance upgrade is failed.
+       * 
+ * + * FAILED = 3; + */ + FAILED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * State is not specified.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The instance upgrade is started.
+       * 
+ * + * STARTED = 1; + */ + public static final int STARTED_VALUE = 1; + /** + * + * + *
+       * The instance upgrade is succeeded.
+       * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + * + * + *
+       * The instance upgrade is failed.
+       * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STARTED; + case 2: + return SUCCEEDED; + case 3: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State) + } + + /** + * + * + *
+     * The definition of operations of this upgrade history entry.
+     * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Operation is not specified.
+       * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + ACTION_UNSPECIFIED(0), + /** + * + * + *
+       * Upgrade.
+       * 
+ * + * UPGRADE = 1; + */ + UPGRADE(1), + /** + * + * + *
+       * Rollback.
+       * 
+ * + * ROLLBACK = 2; + */ + ROLLBACK(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Operation is not specified.
+       * 
+ * + * ACTION_UNSPECIFIED = 0; + */ + public static final int ACTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Upgrade.
+       * 
+ * + * UPGRADE = 1; + */ + public static final int UPGRADE_VALUE = 1; + /** + * + * + *
+       * Rollback.
+       * 
+ * + * ROLLBACK = 2; + */ + public static final int ROLLBACK_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Action valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Action forNumber(int value) { + switch (value) { + case 0: + return ACTION_UNSPECIFIED; + case 1: + return UPGRADE; + case 2: + return ROLLBACK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Action findValueByNumber(int number) { + return Action.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Action[] VALUES = values(); + + public static Action valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Action(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action) + } + + public static final int SNAPSHOT_FIELD_NUMBER = 1; + private volatile java.lang.Object snapshot_; + /** + * + * + *
+     * The snapshot of the boot disk of this notebook instance before upgrade.
+     * 
+ * + * string snapshot = 1; + * + * @return The snapshot. + */ + @java.lang.Override + public java.lang.String getSnapshot() { + java.lang.Object ref = snapshot_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snapshot_ = s; + return s; + } + } + /** + * + * + *
+     * The snapshot of the boot disk of this notebook instance before upgrade.
+     * 
+ * + * string snapshot = 1; + * + * @return The bytes for snapshot. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnapshotBytes() { + java.lang.Object ref = snapshot_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_IMAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object vmImage_; + /** + * + * + *
+     * The VM image before this instance upgrade.
+     * 
+ * + * string vm_image = 2; + * + * @return The vmImage. + */ + @java.lang.Override + public java.lang.String getVmImage() { + java.lang.Object ref = vmImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmImage_ = s; + return s; + } + } + /** + * + * + *
+     * The VM image before this instance upgrade.
+     * 
+ * + * string vm_image = 2; + * + * @return The bytes for vmImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmImageBytes() { + java.lang.Object ref = vmImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_IMAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object containerImage_; + /** + * + * + *
+     * The container image before this instance upgrade.
+     * 
+ * + * string container_image = 3; + * + * @return The containerImage. + */ + @java.lang.Override + public java.lang.String getContainerImage() { + java.lang.Object ref = containerImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerImage_ = s; + return s; + } + } + /** + * + * + *
+     * The container image before this instance upgrade.
+     * 
+ * + * string container_image = 3; + * + * @return The bytes for containerImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContainerImageBytes() { + java.lang.Object ref = containerImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FRAMEWORK_FIELD_NUMBER = 4; + private volatile java.lang.Object framework_; + /** + * + * + *
+     * The framework of this notebook instance.
+     * 
+ * + * string framework = 4; + * + * @return The framework. + */ + @java.lang.Override + public java.lang.String getFramework() { + java.lang.Object ref = framework_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + framework_ = s; + return s; + } + } + /** + * + * + *
+     * The framework of this notebook instance.
+     * 
+ * + * string framework = 4; + * + * @return The bytes for framework. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFrameworkBytes() { + java.lang.Object ref = framework_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + framework_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 5; + private volatile java.lang.Object version_; + /** + * + * + *
+     * The version of the notebook instance before this upgrade.
+     * 
+ * + * string version = 5; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * The version of the notebook instance before this upgrade.
+     * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_; + /** + * + * + *
+     * The state of this instance upgrade history entry.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of this instance upgrade history entry.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State result = + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.valueOf(state_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+     * The time that this instance upgrade history entry is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int TARGET_IMAGE_FIELD_NUMBER = 8; + private volatile java.lang.Object targetImage_; + /** + * + * + *
+     * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+     * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @return The targetImage. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getTargetImage() { + java.lang.Object ref = targetImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetImage_ = s; + return s; + } + } + /** + * + * + *
+     * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+     * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @return The bytes for targetImage. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getTargetImageBytes() { + java.lang.Object ref = targetImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 9; + private int action_; + /** + * + * + *
+     * Action. Rolloback or Upgrade.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+     * Action. Rolloback or Upgrade.
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @return The action. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action result = + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.valueOf(action_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.UNRECOGNIZED + : result; + } + + public static final int TARGET_VERSION_FIELD_NUMBER = 10; + private volatile java.lang.Object targetVersion_; + /** + * + * + *
+     * Target VM Version, like m63.
+     * 
+ * + * string target_version = 10; + * + * @return The targetVersion. + */ + @java.lang.Override + public java.lang.String getTargetVersion() { + java.lang.Object ref = targetVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetVersion_ = s; + return s; + } + } + /** + * + * + *
+     * Target VM Version, like m63.
+     * 
+ * + * string target_version = 10; + * + * @return The bytes for targetVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetVersionBytes() { + java.lang.Object ref = targetVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSnapshotBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snapshot_); + } + if (!getVmImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vmImage_); + } + if (!getContainerImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, containerImage_); + } + if (!getFrameworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, framework_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_); + } + if (state_ + != com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, state_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (!getTargetImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, targetImage_); + } + if (action_ + != com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.ACTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, action_); + } + if (!getTargetVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, targetVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSnapshotBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snapshot_); + } + if (!getVmImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vmImage_); + } + if (!getContainerImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, containerImage_); + } + if (!getFrameworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, framework_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_); + } + if (state_ + != com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (!getTargetImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, targetImage_); + } + if (action_ + != com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.ACTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, action_); + } + if (!getTargetVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, targetVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry other = + (com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) obj; + + if (!getSnapshot().equals(other.getSnapshot())) return false; + if (!getVmImage().equals(other.getVmImage())) return false; + if (!getContainerImage().equals(other.getContainerImage())) return false; + if (!getFramework().equals(other.getFramework())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getTargetImage().equals(other.getTargetImage())) return false; + if (action_ != other.action_) return false; + if (!getTargetVersion().equals(other.getTargetVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getSnapshot().hashCode(); + hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getVmImage().hashCode(); + hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getContainerImage().hashCode(); + hash = (37 * hash) + FRAMEWORK_FIELD_NUMBER; + hash = (53 * hash) + getFramework().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + TARGET_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getTargetImage().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + action_; + hash = (37 * hash) + TARGET_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getTargetVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The entry of VM image upgrade history.
+     * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.class, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + snapshot_ = ""; + + vmImage_ = ""; + + containerImage_ = ""; + + framework_ = ""; + + version_ = ""; + + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + targetImage_ = ""; + + action_ = 0; + + targetVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry build() { + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry buildPartial() { + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry result = + new com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry(this); + result.snapshot_ = snapshot_; + result.vmImage_ = vmImage_; + result.containerImage_ = containerImage_; + result.framework_ = framework_; + result.version_ = version_; + result.state_ = state_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.targetImage_ = targetImage_; + result.action_ = action_; + result.targetVersion_ = targetVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) { + return mergeFrom((com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry other) { + if (other + == com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDefaultInstance()) + return this; + if (!other.getSnapshot().isEmpty()) { + snapshot_ = other.snapshot_; + onChanged(); + } + if (!other.getVmImage().isEmpty()) { + vmImage_ = other.vmImage_; + onChanged(); + } + if (!other.getContainerImage().isEmpty()) { + containerImage_ = other.containerImage_; + onChanged(); + } + if (!other.getFramework().isEmpty()) { + framework_ = other.framework_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getTargetImage().isEmpty()) { + targetImage_ = other.targetImage_; + onChanged(); + } + if (other.action_ != 0) { + setActionValue(other.getActionValue()); + } + if (!other.getTargetVersion().isEmpty()) { + targetVersion_ = other.targetVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object snapshot_ = ""; + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @return The snapshot. + */ + public java.lang.String getSnapshot() { + java.lang.Object ref = snapshot_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snapshot_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @return The bytes for snapshot. + */ + public com.google.protobuf.ByteString getSnapshotBytes() { + java.lang.Object ref = snapshot_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @param value The snapshot to set. + * @return This builder for chaining. + */ + public Builder setSnapshot(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + snapshot_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @return This builder for chaining. + */ + public Builder clearSnapshot() { + + snapshot_ = getDefaultInstance().getSnapshot(); + onChanged(); + return this; + } + /** + * + * + *
+       * The snapshot of the boot disk of this notebook instance before upgrade.
+       * 
+ * + * string snapshot = 1; + * + * @param value The bytes for snapshot to set. + * @return This builder for chaining. + */ + public Builder setSnapshotBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + snapshot_ = value; + onChanged(); + return this; + } + + private java.lang.Object vmImage_ = ""; + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @return The vmImage. + */ + public java.lang.String getVmImage() { + java.lang.Object ref = vmImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @return The bytes for vmImage. + */ + public com.google.protobuf.ByteString getVmImageBytes() { + java.lang.Object ref = vmImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @param value The vmImage to set. + * @return This builder for chaining. + */ + public Builder setVmImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmImage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @return This builder for chaining. + */ + public Builder clearVmImage() { + + vmImage_ = getDefaultInstance().getVmImage(); + onChanged(); + return this; + } + /** + * + * + *
+       * The VM image before this instance upgrade.
+       * 
+ * + * string vm_image = 2; + * + * @param value The bytes for vmImage to set. + * @return This builder for chaining. + */ + public Builder setVmImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmImage_ = value; + onChanged(); + return this; + } + + private java.lang.Object containerImage_ = ""; + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @return The containerImage. + */ + public java.lang.String getContainerImage() { + java.lang.Object ref = containerImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @return The bytes for containerImage. + */ + public com.google.protobuf.ByteString getContainerImageBytes() { + java.lang.Object ref = containerImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + containerImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @param value The containerImage to set. + * @return This builder for chaining. + */ + public Builder setContainerImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerImage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @return This builder for chaining. + */ + public Builder clearContainerImage() { + + containerImage_ = getDefaultInstance().getContainerImage(); + onChanged(); + return this; + } + /** + * + * + *
+       * The container image before this instance upgrade.
+       * 
+ * + * string container_image = 3; + * + * @param value The bytes for containerImage to set. + * @return This builder for chaining. + */ + public Builder setContainerImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerImage_ = value; + onChanged(); + return this; + } + + private java.lang.Object framework_ = ""; + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @return The framework. + */ + public java.lang.String getFramework() { + java.lang.Object ref = framework_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + framework_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @return The bytes for framework. + */ + public com.google.protobuf.ByteString getFrameworkBytes() { + java.lang.Object ref = framework_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + framework_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @param value The framework to set. + * @return This builder for chaining. + */ + public Builder setFramework(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + framework_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @return This builder for chaining. + */ + public Builder clearFramework() { + + framework_ = getDefaultInstance().getFramework(); + onChanged(); + return this; + } + /** + * + * + *
+       * The framework of this notebook instance.
+       * 
+ * + * string framework = 4; + * + * @param value The bytes for framework to set. + * @return This builder for chaining. + */ + public Builder setFrameworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + framework_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The version of the notebook instance before this upgrade.
+       * 
+ * + * string version = 5; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State result = + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.valueOf(state_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The state of this instance upgrade history entry.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_) + .mergeFrom(value) + .buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+       * The time that this instance upgrade history entry is created.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.lang.Object targetImage_ = ""; + /** + * + * + *
+       * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+       * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @return The targetImage. + */ + @java.lang.Deprecated + public java.lang.String getTargetImage() { + java.lang.Object ref = targetImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+       * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @return The bytes for targetImage. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getTargetImageBytes() { + java.lang.Object ref = targetImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+       * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @param value The targetImage to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setTargetImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetImage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+       * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearTargetImage() { + + targetImage_ = getDefaultInstance().getTargetImage(); + onChanged(); + return this; + } + /** + * + * + *
+       * Target VM Image. Format: ainotebooks-vm/project/image-name/name.
+       * 
+ * + * string target_image = 8 [deprecated = true]; + * + * @param value The bytes for targetImage to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setTargetImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetImage_ = value; + onChanged(); + return this; + } + + private int action_ = 0; + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @return The enum numeric value on the wire for action. + */ + @java.lang.Override + public int getActionValue() { + return action_; + } + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @param value The enum numeric value on the wire for action to set. + * @return This builder for chaining. + */ + public Builder setActionValue(int value) { + + action_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @return The action. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action getAction() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action result = + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.valueOf(action_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Action. Rolloback or Upgrade.
+       * 
+ * + * .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = 0; + onChanged(); + return this; + } + + private java.lang.Object targetVersion_ = ""; + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @return The targetVersion. + */ + public java.lang.String getTargetVersion() { + java.lang.Object ref = targetVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @return The bytes for targetVersion. + */ + public com.google.protobuf.ByteString getTargetVersionBytes() { + java.lang.Object ref = targetVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @param value The targetVersion to set. + * @return This builder for chaining. + */ + public Builder setTargetVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @return This builder for chaining. + */ + public Builder clearTargetVersion() { + + targetVersion_ = getDefaultInstance().getTargetVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * Target VM Version, like m63.
+       * 
+ * + * string target_version = 10; + * + * @param value The bytes for targetVersion to set. + * @return This builder for chaining. + */ + public Builder setTargetVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetVersion_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry) + private static final com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry(); + } + + public static com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeHistoryEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeHistoryEntry(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int environmentCase_ = 0; + private java.lang.Object environment_; + + public enum EnvironmentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VM_IMAGE(2), + CONTAINER_IMAGE(3), + ENVIRONMENT_NOT_SET(0); + private final int value; + + private EnvironmentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EnvironmentCase valueOf(int value) { + return forNumber(value); + } + + public static EnvironmentCase forNumber(int value) { + switch (value) { + case 2: + return VM_IMAGE; + case 3: + return CONTAINER_IMAGE; + case 0: + return ENVIRONMENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EnvironmentCase getEnvironmentCase() { + return EnvironmentCase.forNumber(environmentCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The name of this notebook instance. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of this notebook instance. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_IMAGE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return Whether the vmImage field is set. + */ + @java.lang.Override + public boolean hasVmImage() { + return environmentCase_ == 2; + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return The vmImage. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImage getVmImage() { + if (environmentCase_ == 2) { + return (com.google.cloud.notebooks.v1.VmImage) environment_; + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() { + if (environmentCase_ == 2) { + return (com.google.cloud.notebooks.v1.VmImage) environment_; + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + + public static final int CONTAINER_IMAGE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return Whether the containerImage field is set. + */ + @java.lang.Override + public boolean hasContainerImage() { + return environmentCase_ == 3; + } + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return The containerImage. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage getContainerImage() { + if (environmentCase_ == 3) { + return (com.google.cloud.notebooks.v1.ContainerImage) environment_; + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder() { + if (environmentCase_ == 3) { + return (com.google.cloud.notebooks.v1.ContainerImage) environment_; + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + + public static final int POST_STARTUP_SCRIPT_FIELD_NUMBER = 4; + private volatile java.lang.Object postStartupScript_; + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (gs://path-to-file/file-name).
+   * 
+ * + * string post_startup_script = 4; + * + * @return The postStartupScript. + */ + @java.lang.Override + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } + } + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (gs://path-to-file/file-name).
+   * 
+ * + * string post_startup_script = 4; + * + * @return The bytes for postStartupScript. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROXY_URI_FIELD_NUMBER = 5; + private volatile java.lang.Object proxyUri_; + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + @java.lang.Override + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_OWNERS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList instanceOwners_; + /** + * + * + *
+   * Input only. The owner of this instance after creation. Format: `alias@example.com`
+   * Currently supports one owner only. If not specified, all of the service
+   * account users of your VM instance's service account can use
+   * the instance.
+   * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return A list containing the instanceOwners. + */ + public com.google.protobuf.ProtocolStringList getInstanceOwnersList() { + return instanceOwners_; + } + /** + * + * + *
+   * Input only. The owner of this instance after creation. Format: `alias@example.com`
+   * Currently supports one owner only. If not specified, all of the service
+   * account users of your VM instance's service account can use
+   * the instance.
+   * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The count of instanceOwners. + */ + public int getInstanceOwnersCount() { + return instanceOwners_.size(); + } + /** + * + * + *
+   * Input only. The owner of this instance after creation. Format: `alias@example.com`
+   * Currently supports one owner only. If not specified, all of the service
+   * account users of your VM instance's service account can use
+   * the instance.
+   * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The instanceOwners at the given index. + */ + public java.lang.String getInstanceOwners(int index) { + return instanceOwners_.get(index); + } + /** + * + * + *
+   * Input only. The owner of this instance after creation. Format: `alias@example.com`
+   * Currently supports one owner only. If not specified, all of the service
+   * account users of your VM instance's service account can use
+   * the instance.
+   * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the instanceOwners at the given index. + */ + public com.google.protobuf.ByteString getInstanceOwnersBytes(int index) { + return instanceOwners_.getByteString(index); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 7; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * The service account on this instance, giving access to other Google
+   * Cloud services.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 7; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * The service account on this instance, giving access to other Google
+   * Cloud services.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 7; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_ACCOUNT_SCOPES_FIELD_NUMBER = 31; + private com.google.protobuf.LazyStringList serviceAccountScopes_; + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the serviceAccountScopes. + */ + public com.google.protobuf.ProtocolStringList getServiceAccountScopesList() { + return serviceAccountScopes_; + } + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of serviceAccountScopes. + */ + public int getServiceAccountScopesCount() { + return serviceAccountScopes_.size(); + } + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The serviceAccountScopes at the given index. + */ + public java.lang.String getServiceAccountScopes(int index) { + return serviceAccountScopes_.get(index); + } + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAccountScopes at the given index. + */ + public com.google.protobuf.ByteString getServiceAccountScopesBytes(int index) { + return serviceAccountScopes_.getByteString(index); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 8; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+   * instance.
+   * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+   * instance.
+   * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.notebooks.v1.Instance.AcceleratorConfig acceleratorConfig_; + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you
+   * have selected](/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * @return Whether the acceleratorConfig field is set. + */ + @java.lang.Override + public boolean hasAcceleratorConfig() { + return acceleratorConfig_ != null; + } + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you
+   * have selected](/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * @return The acceleratorConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getAcceleratorConfig() { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you
+   * have selected](/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + return getAcceleratorConfig(); + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_; + /** + * + * + *
+   * Output only. The state of this instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The state of this instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.State result = + com.google.cloud.notebooks.v1.Instance.State.valueOf(state_); + return result == null ? com.google.cloud.notebooks.v1.Instance.State.UNRECOGNIZED : result; + } + + public static final int INSTALL_GPU_DRIVER_FIELD_NUMBER = 11; + private boolean installGpuDriver_; + /** + * + * + *
+   * Whether the end user authorizes Google Cloud to install GPU driver
+   * on this instance.
+   * If this field is empty or set to false, the GPU driver won't be installed.
+   * Only applicable to instances with GPUs.
+   * 
+ * + * bool install_gpu_driver = 11; + * + * @return The installGpuDriver. + */ + @java.lang.Override + public boolean getInstallGpuDriver() { + return installGpuDriver_; + } + + public static final int CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER = 12; + private volatile java.lang.Object customGpuDriverPath_; + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The customGpuDriverPath. + */ + @java.lang.Override + public java.lang.String getCustomGpuDriverPath() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customGpuDriverPath_ = s; + return s; + } + } + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The bytes for customGpuDriverPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customGpuDriverPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOT_DISK_TYPE_FIELD_NUMBER = 13; + private int bootDiskType_; + /** + * + * + *
+   * Input only. The type of the boot disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for bootDiskType. + */ + @java.lang.Override + public int getBootDiskTypeValue() { + return bootDiskType_; + } + /** + * + * + *
+   * Input only. The type of the boot disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The bootDiskType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.DiskType getBootDiskType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.DiskType result = + com.google.cloud.notebooks.v1.Instance.DiskType.valueOf(bootDiskType_); + return result == null ? com.google.cloud.notebooks.v1.Instance.DiskType.UNRECOGNIZED : result; + } + + public static final int BOOT_DISK_SIZE_GB_FIELD_NUMBER = 14; + private long bootDiskSizeGb_; + /** + * + * + *
+   * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
+   * of 64000&nbsp;GB (64&nbsp;TB). The minimum recommended value is
+   * 100&nbsp;GB. If not specified, this defaults to 100.
+   * 
+ * + * int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bootDiskSizeGb. + */ + @java.lang.Override + public long getBootDiskSizeGb() { + return bootDiskSizeGb_; + } + + public static final int DATA_DISK_TYPE_FIELD_NUMBER = 25; + private int dataDiskType_; + /** + * + * + *
+   * Input only. The type of the data disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataDiskType. + */ + @java.lang.Override + public int getDataDiskTypeValue() { + return dataDiskType_; + } + /** + * + * + *
+   * Input only. The type of the data disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The dataDiskType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.DiskType getDataDiskType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.DiskType result = + com.google.cloud.notebooks.v1.Instance.DiskType.valueOf(dataDiskType_); + return result == null ? com.google.cloud.notebooks.v1.Instance.DiskType.UNRECOGNIZED : result; + } + + public static final int DATA_DISK_SIZE_GB_FIELD_NUMBER = 26; + private long dataDiskSizeGb_; + /** + * + * + *
+   * Input only. The size of the data disk in GB attached to this instance, up to a maximum
+   * of 64000&nbsp;GB (64&nbsp;TB). You can choose the size of the data disk
+   * based on how big your notebooks and data are. If not specified, this
+   * defaults to 100.
+   * 
+ * + * int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The dataDiskSizeGb. + */ + @java.lang.Override + public long getDataDiskSizeGb() { + return dataDiskSizeGb_; + } + + public static final int NO_REMOVE_DATA_DISK_FIELD_NUMBER = 27; + private boolean noRemoveDataDisk_; + /** + * + * + *
+   * Input only. If true, the data disk will not be auto deleted when deleting the instance.
+   * 
+ * + * bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The noRemoveDataDisk. + */ + @java.lang.Override + public boolean getNoRemoveDataDisk() { + return noRemoveDataDisk_; + } + + public static final int DISK_ENCRYPTION_FIELD_NUMBER = 15; + private int diskEncryption_; + /** + * + * + *
+   * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for diskEncryption. + */ + @java.lang.Override + public int getDiskEncryptionValue() { + return diskEncryption_; + } + /** + * + * + *
+   * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diskEncryption. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.DiskEncryption getDiskEncryption() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.DiskEncryption result = + com.google.cloud.notebooks.v1.Instance.DiskEncryption.valueOf(diskEncryption_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.DiskEncryption.UNRECOGNIZED + : result; + } + + public static final int KMS_KEY_FIELD_NUMBER = 16; + private volatile java.lang.Object kmsKey_; + /** + * + * + *
+   * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+   * is CMEK.
+   * Format:
+   * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+   * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+   * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } + } + /** + * + * + *
+   * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+   * is CMEK.
+   * Format:
+   * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+   * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+   * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISKS_FIELD_NUMBER = 28; + private java.util.List disks_; + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getDisksList() { + return disks_; + } + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDisksOrBuilderList() { + return disks_; + } + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDisksCount() { + return disks_.size(); + } + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.Disk getDisks(int index) { + return disks_.get(index); + } + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.DiskOrBuilder getDisksOrBuilder(int index) { + return disks_.get(index); + } + + public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 30; + private com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shieldedInstanceConfig_; + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM features]
+   * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfig_ != null; + } + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM features]
+   * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The shieldedInstanceConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig getShieldedInstanceConfig() { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM features]
+   * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + return getShieldedInstanceConfig(); + } + + public static final int NO_PUBLIC_IP_FIELD_NUMBER = 17; + private boolean noPublicIp_; + /** + * + * + *
+   * If true, no public IP will be assigned to this instance.
+   * 
+ * + * bool no_public_ip = 17; + * + * @return The noPublicIp. + */ + @java.lang.Override + public boolean getNoPublicIp() { + return noPublicIp_; + } + + public static final int NO_PROXY_ACCESS_FIELD_NUMBER = 18; + private boolean noProxyAccess_; + /** + * + * + *
+   * If true, the notebook instance will not register with the proxy.
+   * 
+ * + * bool no_proxy_access = 18; + * + * @return The noProxyAccess. + */ + @java.lang.Override + public boolean getNoProxyAccess() { + return noProxyAccess_; + } + + public static final int NETWORK_FIELD_NUMBER = 19; + private volatile java.lang.Object network_; + /** + * + * + *
+   * The name of the VPC that this instance is in.
+   * Format:
+   * `projects/{project_id}/global/networks/{network_id}`
+   * 
+ * + * string network = 19; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the VPC that this instance is in.
+   * Format:
+   * `projects/{project_id}/global/networks/{network_id}`
+   * 
+ * + * string network = 19; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNET_FIELD_NUMBER = 20; + private volatile java.lang.Object subnet_; + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnet = 20; + * + * @return The subnet. + */ + @java.lang.Override + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnet = 20; + * + * @return The bytes for subnet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 21; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int METADATA_FIELD_NUMBER = 22; + + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.lang.String getMetadataOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TAGS_FIELD_NUMBER = 32; + private com.google.protobuf.LazyStringList tags_; + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int UPGRADE_HISTORY_FIELD_NUMBER = 29; + private java.util.List + upgradeHistory_; + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public java.util.List + getUpgradeHistoryList() { + return upgradeHistory_; + } + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + getUpgradeHistoryOrBuilderList() { + return upgradeHistory_; + } + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public int getUpgradeHistoryCount() { + return upgradeHistory_.size(); + } + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getUpgradeHistory(int index) { + return upgradeHistory_.get(index); + } + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder + getUpgradeHistoryOrBuilder(int index) { + return upgradeHistory_.get(index); + } + + public static final int NIC_TYPE_FIELD_NUMBER = 33; + private int nicType_; + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+   * VirtioNet.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+   * VirtioNet.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.NicType getNicType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.NicType result = + com.google.cloud.notebooks.v1.Instance.NicType.valueOf(nicType_); + return result == null ? com.google.cloud.notebooks.v1.Instance.NicType.UNRECOGNIZED : result; + } + + public static final int RESERVATION_AFFINITY_FIELD_NUMBER = 34; + private com.google.cloud.notebooks.v1.ReservationAffinity reservationAffinity_; + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reservationAffinity field is set. + */ + @java.lang.Override + public boolean hasReservationAffinity() { + return reservationAffinity_ != null; + } + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reservationAffinity. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ReservationAffinity getReservationAffinity() { + return reservationAffinity_ == null + ? com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance() + : reservationAffinity_; + } + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder + getReservationAffinityOrBuilder() { + return getReservationAffinity(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 23; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 24; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (environmentCase_ == 2) { + output.writeMessage(2, (com.google.cloud.notebooks.v1.VmImage) environment_); + } + if (environmentCase_ == 3) { + output.writeMessage(3, (com.google.cloud.notebooks.v1.ContainerImage) environment_); + } + if (!getPostStartupScriptBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, postStartupScript_); + } + if (!getProxyUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, proxyUri_); + } + for (int i = 0; i < instanceOwners_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, instanceOwners_.getRaw(i)); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceAccount_); + } + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, machineType_); + } + if (acceleratorConfig_ != null) { + output.writeMessage(9, getAcceleratorConfig()); + } + if (state_ != com.google.cloud.notebooks.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + if (installGpuDriver_ != false) { + output.writeBool(11, installGpuDriver_); + } + if (!getCustomGpuDriverPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, customGpuDriverPath_); + } + if (bootDiskType_ + != com.google.cloud.notebooks.v1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(13, bootDiskType_); + } + if (bootDiskSizeGb_ != 0L) { + output.writeInt64(14, bootDiskSizeGb_); + } + if (diskEncryption_ + != com.google.cloud.notebooks.v1.Instance.DiskEncryption.DISK_ENCRYPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(15, diskEncryption_); + } + if (!getKmsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, kmsKey_); + } + if (noPublicIp_ != false) { + output.writeBool(17, noPublicIp_); + } + if (noProxyAccess_ != false) { + output.writeBool(18, noProxyAccess_); + } + if (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, network_); + } + if (!getSubnetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, subnet_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 21); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 22); + if (createTime_ != null) { + output.writeMessage(23, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(24, getUpdateTime()); + } + if (dataDiskType_ + != com.google.cloud.notebooks.v1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(25, dataDiskType_); + } + if (dataDiskSizeGb_ != 0L) { + output.writeInt64(26, dataDiskSizeGb_); + } + if (noRemoveDataDisk_ != false) { + output.writeBool(27, noRemoveDataDisk_); + } + for (int i = 0; i < disks_.size(); i++) { + output.writeMessage(28, disks_.get(i)); + } + for (int i = 0; i < upgradeHistory_.size(); i++) { + output.writeMessage(29, upgradeHistory_.get(i)); + } + if (shieldedInstanceConfig_ != null) { + output.writeMessage(30, getShieldedInstanceConfig()); + } + for (int i = 0; i < serviceAccountScopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 31, serviceAccountScopes_.getRaw(i)); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 32, tags_.getRaw(i)); + } + if (nicType_ + != com.google.cloud.notebooks.v1.Instance.NicType.UNSPECIFIED_NIC_TYPE.getNumber()) { + output.writeEnum(33, nicType_); + } + if (reservationAffinity_ != null) { + output.writeMessage(34, getReservationAffinity()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (environmentCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.notebooks.v1.VmImage) environment_); + } + if (environmentCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.notebooks.v1.ContainerImage) environment_); + } + if (!getPostStartupScriptBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, postStartupScript_); + } + if (!getProxyUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, proxyUri_); + } + { + int dataSize = 0; + for (int i = 0; i < instanceOwners_.size(); i++) { + dataSize += computeStringSizeNoTag(instanceOwners_.getRaw(i)); + } + size += dataSize; + size += 1 * getInstanceOwnersList().size(); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceAccount_); + } + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, machineType_); + } + if (acceleratorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getAcceleratorConfig()); + } + if (state_ != com.google.cloud.notebooks.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + if (installGpuDriver_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, installGpuDriver_); + } + if (!getCustomGpuDriverPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, customGpuDriverPath_); + } + if (bootDiskType_ + != com.google.cloud.notebooks.v1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, bootDiskType_); + } + if (bootDiskSizeGb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, bootDiskSizeGb_); + } + if (diskEncryption_ + != com.google.cloud.notebooks.v1.Instance.DiskEncryption.DISK_ENCRYPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, diskEncryption_); + } + if (!getKmsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, kmsKey_); + } + if (noPublicIp_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, noPublicIp_); + } + if (noProxyAccess_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, noProxyAccess_); + } + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, network_); + } + if (!getSubnetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, subnet_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, labels__); + } + for (java.util.Map.Entry entry : + internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry metadata__ = + MetadataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, metadata__); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getUpdateTime()); + } + if (dataDiskType_ + != com.google.cloud.notebooks.v1.Instance.DiskType.DISK_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(25, dataDiskType_); + } + if (dataDiskSizeGb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(26, dataDiskSizeGb_); + } + if (noRemoveDataDisk_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(27, noRemoveDataDisk_); + } + for (int i = 0; i < disks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, disks_.get(i)); + } + for (int i = 0; i < upgradeHistory_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, upgradeHistory_.get(i)); + } + if (shieldedInstanceConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(30, getShieldedInstanceConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < serviceAccountScopes_.size(); i++) { + dataSize += computeStringSizeNoTag(serviceAccountScopes_.getRaw(i)); + } + size += dataSize; + size += 2 * getServiceAccountScopesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 2 * getTagsList().size(); + } + if (nicType_ + != com.google.cloud.notebooks.v1.Instance.NicType.UNSPECIFIED_NIC_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(33, nicType_); + } + if (reservationAffinity_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(34, getReservationAffinity()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Instance)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Instance other = (com.google.cloud.notebooks.v1.Instance) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPostStartupScript().equals(other.getPostStartupScript())) return false; + if (!getProxyUri().equals(other.getProxyUri())) return false; + if (!getInstanceOwnersList().equals(other.getInstanceOwnersList())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getServiceAccountScopesList().equals(other.getServiceAccountScopesList())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false; + if (hasAcceleratorConfig()) { + if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false; + } + if (state_ != other.state_) return false; + if (getInstallGpuDriver() != other.getInstallGpuDriver()) return false; + if (!getCustomGpuDriverPath().equals(other.getCustomGpuDriverPath())) return false; + if (bootDiskType_ != other.bootDiskType_) return false; + if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) return false; + if (dataDiskType_ != other.dataDiskType_) return false; + if (getDataDiskSizeGb() != other.getDataDiskSizeGb()) return false; + if (getNoRemoveDataDisk() != other.getNoRemoveDataDisk()) return false; + if (diskEncryption_ != other.diskEncryption_) return false; + if (!getKmsKey().equals(other.getKmsKey())) return false; + if (!getDisksList().equals(other.getDisksList())) return false; + if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false; + if (hasShieldedInstanceConfig()) { + if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false; + } + if (getNoPublicIp() != other.getNoPublicIp()) return false; + if (getNoProxyAccess() != other.getNoProxyAccess()) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getSubnet().equals(other.getSubnet())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!getUpgradeHistoryList().equals(other.getUpgradeHistoryList())) return false; + if (nicType_ != other.nicType_) return false; + if (hasReservationAffinity() != other.hasReservationAffinity()) return false; + if (hasReservationAffinity()) { + if (!getReservationAffinity().equals(other.getReservationAffinity())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEnvironmentCase().equals(other.getEnvironmentCase())) return false; + switch (environmentCase_) { + case 2: + if (!getVmImage().equals(other.getVmImage())) return false; + break; + case 3: + if (!getContainerImage().equals(other.getContainerImage())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + POST_STARTUP_SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getPostStartupScript().hashCode(); + hash = (37 * hash) + PROXY_URI_FIELD_NUMBER; + hash = (53 * hash) + getProxyUri().hashCode(); + if (getInstanceOwnersCount() > 0) { + hash = (37 * hash) + INSTANCE_OWNERS_FIELD_NUMBER; + hash = (53 * hash) + getInstanceOwnersList().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + if (getServiceAccountScopesCount() > 0) { + hash = (37 * hash) + SERVICE_ACCOUNT_SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountScopesList().hashCode(); + } + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + if (hasAcceleratorConfig()) { + hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorConfig().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + INSTALL_GPU_DRIVER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInstallGpuDriver()); + hash = (37 * hash) + CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER; + hash = (53 * hash) + getCustomGpuDriverPath().hashCode(); + hash = (37 * hash) + BOOT_DISK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + bootDiskType_; + hash = (37 * hash) + BOOT_DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBootDiskSizeGb()); + hash = (37 * hash) + DATA_DISK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataDiskType_; + hash = (37 * hash) + DATA_DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDataDiskSizeGb()); + hash = (37 * hash) + NO_REMOVE_DATA_DISK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoRemoveDataDisk()); + hash = (37 * hash) + DISK_ENCRYPTION_FIELD_NUMBER; + hash = (53 * hash) + diskEncryption_; + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + if (getDisksCount() > 0) { + hash = (37 * hash) + DISKS_FIELD_NUMBER; + hash = (53 * hash) + getDisksList().hashCode(); + } + if (hasShieldedInstanceConfig()) { + hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShieldedInstanceConfig().hashCode(); + } + hash = (37 * hash) + NO_PUBLIC_IP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoPublicIp()); + hash = (37 * hash) + NO_PROXY_ACCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNoProxyAccess()); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getSubnet().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (getUpgradeHistoryCount() > 0) { + hash = (37 * hash) + UPGRADE_HISTORY_FIELD_NUMBER; + hash = (53 * hash) + getUpgradeHistoryList().hashCode(); + } + hash = (37 * hash) + NIC_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nicType_; + if (hasReservationAffinity()) { + hash = (37 * hash) + RESERVATION_AFFINITY_FIELD_NUMBER; + hash = (53 * hash) + getReservationAffinity().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (environmentCase_) { + case 2: + hash = (37 * hash) + VM_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getVmImage().hashCode(); + break; + case 3: + hash = (37 * hash) + CONTAINER_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getContainerImage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.Instance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The definition of a notebook instance.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Instance) + com.google.cloud.notebooks.v1.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 21: + return internalGetLabels(); + case 22: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 21: + return internalGetMutableLabels(); + case 22: + return internalGetMutableMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Instance.class, + com.google.cloud.notebooks.v1.Instance.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDisksFieldBuilder(); + getUpgradeHistoryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + postStartupScript_ = ""; + + proxyUri_ = ""; + + instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccount_ = ""; + + serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + machineType_ = ""; + + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = null; + } else { + acceleratorConfig_ = null; + acceleratorConfigBuilder_ = null; + } + state_ = 0; + + installGpuDriver_ = false; + + customGpuDriverPath_ = ""; + + bootDiskType_ = 0; + + bootDiskSizeGb_ = 0L; + + dataDiskType_ = 0; + + dataDiskSizeGb_ = 0L; + + noRemoveDataDisk_ = false; + + diskEncryption_ = 0; + + kmsKey_ = ""; + + if (disksBuilder_ == null) { + disks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + disksBuilder_.clear(); + } + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = null; + } else { + shieldedInstanceConfig_ = null; + shieldedInstanceConfigBuilder_ = null; + } + noPublicIp_ = false; + + noProxyAccess_ = false; + + network_ = ""; + + subnet_ = ""; + + internalGetMutableLabels().clear(); + internalGetMutableMetadata().clear(); + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + if (upgradeHistoryBuilder_ == null) { + upgradeHistory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + upgradeHistoryBuilder_.clear(); + } + nicType_ = 0; + + if (reservationAffinityBuilder_ == null) { + reservationAffinity_ = null; + } else { + reservationAffinity_ = null; + reservationAffinityBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + environmentCase_ = 0; + environment_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance build() { + com.google.cloud.notebooks.v1.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance buildPartial() { + com.google.cloud.notebooks.v1.Instance result = + new com.google.cloud.notebooks.v1.Instance(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (environmentCase_ == 2) { + if (vmImageBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = vmImageBuilder_.build(); + } + } + if (environmentCase_ == 3) { + if (containerImageBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = containerImageBuilder_.build(); + } + } + result.postStartupScript_ = postStartupScript_; + result.proxyUri_ = proxyUri_; + if (((bitField0_ & 0x00000001) != 0)) { + instanceOwners_ = instanceOwners_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instanceOwners_ = instanceOwners_; + result.serviceAccount_ = serviceAccount_; + if (((bitField0_ & 0x00000002) != 0)) { + serviceAccountScopes_ = serviceAccountScopes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.serviceAccountScopes_ = serviceAccountScopes_; + result.machineType_ = machineType_; + if (acceleratorConfigBuilder_ == null) { + result.acceleratorConfig_ = acceleratorConfig_; + } else { + result.acceleratorConfig_ = acceleratorConfigBuilder_.build(); + } + result.state_ = state_; + result.installGpuDriver_ = installGpuDriver_; + result.customGpuDriverPath_ = customGpuDriverPath_; + result.bootDiskType_ = bootDiskType_; + result.bootDiskSizeGb_ = bootDiskSizeGb_; + result.dataDiskType_ = dataDiskType_; + result.dataDiskSizeGb_ = dataDiskSizeGb_; + result.noRemoveDataDisk_ = noRemoveDataDisk_; + result.diskEncryption_ = diskEncryption_; + result.kmsKey_ = kmsKey_; + if (disksBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + disks_ = java.util.Collections.unmodifiableList(disks_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.disks_ = disks_; + } else { + result.disks_ = disksBuilder_.build(); + } + if (shieldedInstanceConfigBuilder_ == null) { + result.shieldedInstanceConfig_ = shieldedInstanceConfig_; + } else { + result.shieldedInstanceConfig_ = shieldedInstanceConfigBuilder_.build(); + } + result.noPublicIp_ = noPublicIp_; + result.noProxyAccess_ = noProxyAccess_; + result.network_ = network_; + result.subnet_ = subnet_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + if (((bitField0_ & 0x00000020) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.tags_ = tags_; + if (upgradeHistoryBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + upgradeHistory_ = java.util.Collections.unmodifiableList(upgradeHistory_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.upgradeHistory_ = upgradeHistory_; + } else { + result.upgradeHistory_ = upgradeHistoryBuilder_.build(); + } + result.nicType_ = nicType_; + if (reservationAffinityBuilder_ == null) { + result.reservationAffinity_ = reservationAffinity_; + } else { + result.reservationAffinity_ = reservationAffinityBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.environmentCase_ = environmentCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Instance) { + return mergeFrom((com.google.cloud.notebooks.v1.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Instance other) { + if (other == com.google.cloud.notebooks.v1.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getPostStartupScript().isEmpty()) { + postStartupScript_ = other.postStartupScript_; + onChanged(); + } + if (!other.getProxyUri().isEmpty()) { + proxyUri_ = other.proxyUri_; + onChanged(); + } + if (!other.instanceOwners_.isEmpty()) { + if (instanceOwners_.isEmpty()) { + instanceOwners_ = other.instanceOwners_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstanceOwnersIsMutable(); + instanceOwners_.addAll(other.instanceOwners_); + } + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (!other.serviceAccountScopes_.isEmpty()) { + if (serviceAccountScopes_.isEmpty()) { + serviceAccountScopes_ = other.serviceAccountScopes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.addAll(other.serviceAccountScopes_); + } + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + onChanged(); + } + if (other.hasAcceleratorConfig()) { + mergeAcceleratorConfig(other.getAcceleratorConfig()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getInstallGpuDriver() != false) { + setInstallGpuDriver(other.getInstallGpuDriver()); + } + if (!other.getCustomGpuDriverPath().isEmpty()) { + customGpuDriverPath_ = other.customGpuDriverPath_; + onChanged(); + } + if (other.bootDiskType_ != 0) { + setBootDiskTypeValue(other.getBootDiskTypeValue()); + } + if (other.getBootDiskSizeGb() != 0L) { + setBootDiskSizeGb(other.getBootDiskSizeGb()); + } + if (other.dataDiskType_ != 0) { + setDataDiskTypeValue(other.getDataDiskTypeValue()); + } + if (other.getDataDiskSizeGb() != 0L) { + setDataDiskSizeGb(other.getDataDiskSizeGb()); + } + if (other.getNoRemoveDataDisk() != false) { + setNoRemoveDataDisk(other.getNoRemoveDataDisk()); + } + if (other.diskEncryption_ != 0) { + setDiskEncryptionValue(other.getDiskEncryptionValue()); + } + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + onChanged(); + } + if (disksBuilder_ == null) { + if (!other.disks_.isEmpty()) { + if (disks_.isEmpty()) { + disks_ = other.disks_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDisksIsMutable(); + disks_.addAll(other.disks_); + } + onChanged(); + } + } else { + if (!other.disks_.isEmpty()) { + if (disksBuilder_.isEmpty()) { + disksBuilder_.dispose(); + disksBuilder_ = null; + disks_ = other.disks_; + bitField0_ = (bitField0_ & ~0x00000004); + disksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDisksFieldBuilder() + : null; + } else { + disksBuilder_.addAllMessages(other.disks_); + } + } + } + if (other.hasShieldedInstanceConfig()) { + mergeShieldedInstanceConfig(other.getShieldedInstanceConfig()); + } + if (other.getNoPublicIp() != false) { + setNoPublicIp(other.getNoPublicIp()); + } + if (other.getNoProxyAccess() != false) { + setNoProxyAccess(other.getNoProxyAccess()); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getSubnet().isEmpty()) { + subnet_ = other.subnet_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (upgradeHistoryBuilder_ == null) { + if (!other.upgradeHistory_.isEmpty()) { + if (upgradeHistory_.isEmpty()) { + upgradeHistory_ = other.upgradeHistory_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.addAll(other.upgradeHistory_); + } + onChanged(); + } + } else { + if (!other.upgradeHistory_.isEmpty()) { + if (upgradeHistoryBuilder_.isEmpty()) { + upgradeHistoryBuilder_.dispose(); + upgradeHistoryBuilder_ = null; + upgradeHistory_ = other.upgradeHistory_; + bitField0_ = (bitField0_ & ~0x00000040); + upgradeHistoryBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUpgradeHistoryFieldBuilder() + : null; + } else { + upgradeHistoryBuilder_.addAllMessages(other.upgradeHistory_); + } + } + } + if (other.nicType_ != 0) { + setNicTypeValue(other.getNicTypeValue()); + } + if (other.hasReservationAffinity()) { + mergeReservationAffinity(other.getReservationAffinity()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getEnvironmentCase()) { + case VM_IMAGE: + { + mergeVmImage(other.getVmImage()); + break; + } + case CONTAINER_IMAGE: + { + mergeContainerImage(other.getContainerImage()); + break; + } + case ENVIRONMENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Instance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.Instance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int environmentCase_ = 0; + private java.lang.Object environment_; + + public EnvironmentCase getEnvironmentCase() { + return EnvironmentCase.forNumber(environmentCase_); + } + + public Builder clearEnvironment() { + environmentCase_ = 0; + environment_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this notebook instance. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VmImage, + com.google.cloud.notebooks.v1.VmImage.Builder, + com.google.cloud.notebooks.v1.VmImageOrBuilder> + vmImageBuilder_; + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return Whether the vmImage field is set. + */ + @java.lang.Override + public boolean hasVmImage() { + return environmentCase_ == 2; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return The vmImage. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImage getVmImage() { + if (vmImageBuilder_ == null) { + if (environmentCase_ == 2) { + return (com.google.cloud.notebooks.v1.VmImage) environment_; + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } else { + if (environmentCase_ == 2) { + return vmImageBuilder_.getMessage(); + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public Builder setVmImage(com.google.cloud.notebooks.v1.VmImage value) { + if (vmImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + vmImageBuilder_.setMessage(value); + } + environmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public Builder setVmImage(com.google.cloud.notebooks.v1.VmImage.Builder builderForValue) { + if (vmImageBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + vmImageBuilder_.setMessage(builderForValue.build()); + } + environmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public Builder mergeVmImage(com.google.cloud.notebooks.v1.VmImage value) { + if (vmImageBuilder_ == null) { + if (environmentCase_ == 2 + && environment_ != com.google.cloud.notebooks.v1.VmImage.getDefaultInstance()) { + environment_ = + com.google.cloud.notebooks.v1.VmImage.newBuilder( + (com.google.cloud.notebooks.v1.VmImage) environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + if (environmentCase_ == 2) { + vmImageBuilder_.mergeFrom(value); + } + vmImageBuilder_.setMessage(value); + } + environmentCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public Builder clearVmImage() { + if (vmImageBuilder_ == null) { + if (environmentCase_ == 2) { + environmentCase_ = 0; + environment_ = null; + onChanged(); + } + } else { + if (environmentCase_ == 2) { + environmentCase_ = 0; + environment_ = null; + } + vmImageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + public com.google.cloud.notebooks.v1.VmImage.Builder getVmImageBuilder() { + return getVmImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder() { + if ((environmentCase_ == 2) && (vmImageBuilder_ != null)) { + return vmImageBuilder_.getMessageOrBuilder(); + } else { + if (environmentCase_ == 2) { + return (com.google.cloud.notebooks.v1.VmImage) environment_; + } + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VmImage, + com.google.cloud.notebooks.v1.VmImage.Builder, + com.google.cloud.notebooks.v1.VmImageOrBuilder> + getVmImageFieldBuilder() { + if (vmImageBuilder_ == null) { + if (!(environmentCase_ == 2)) { + environment_ = com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + vmImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VmImage, + com.google.cloud.notebooks.v1.VmImage.Builder, + com.google.cloud.notebooks.v1.VmImageOrBuilder>( + (com.google.cloud.notebooks.v1.VmImage) environment_, + getParentForChildren(), + isClean()); + environment_ = null; + } + environmentCase_ = 2; + onChanged(); + ; + return vmImageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder> + containerImageBuilder_; + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return Whether the containerImage field is set. + */ + @java.lang.Override + public boolean hasContainerImage() { + return environmentCase_ == 3; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return The containerImage. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage getContainerImage() { + if (containerImageBuilder_ == null) { + if (environmentCase_ == 3) { + return (com.google.cloud.notebooks.v1.ContainerImage) environment_; + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } else { + if (environmentCase_ == 3) { + return containerImageBuilder_.getMessage(); + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public Builder setContainerImage(com.google.cloud.notebooks.v1.ContainerImage value) { + if (containerImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + containerImageBuilder_.setMessage(value); + } + environmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public Builder setContainerImage( + com.google.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImageBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + containerImageBuilder_.setMessage(builderForValue.build()); + } + environmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public Builder mergeContainerImage(com.google.cloud.notebooks.v1.ContainerImage value) { + if (containerImageBuilder_ == null) { + if (environmentCase_ == 3 + && environment_ != com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance()) { + environment_ = + com.google.cloud.notebooks.v1.ContainerImage.newBuilder( + (com.google.cloud.notebooks.v1.ContainerImage) environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + if (environmentCase_ == 3) { + containerImageBuilder_.mergeFrom(value); + } + containerImageBuilder_.setMessage(value); + } + environmentCase_ = 3; + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public Builder clearContainerImage() { + if (containerImageBuilder_ == null) { + if (environmentCase_ == 3) { + environmentCase_ = 0; + environment_ = null; + onChanged(); + } + } else { + if (environmentCase_ == 3) { + environmentCase_ = 0; + environment_ = null; + } + containerImageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + public com.google.cloud.notebooks.v1.ContainerImage.Builder getContainerImageBuilder() { + return getContainerImageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder() { + if ((environmentCase_ == 3) && (containerImageBuilder_ != null)) { + return containerImageBuilder_.getMessageOrBuilder(); + } else { + if (environmentCase_ == 3) { + return (com.google.cloud.notebooks.v1.ContainerImage) environment_; + } + return com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a container image to start the notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder> + getContainerImageFieldBuilder() { + if (containerImageBuilder_ == null) { + if (!(environmentCase_ == 3)) { + environment_ = com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance(); + } + containerImageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder>( + (com.google.cloud.notebooks.v1.ContainerImage) environment_, + getParentForChildren(), + isClean()); + environment_ = null; + } + environmentCase_ = 3; + onChanged(); + ; + return containerImageBuilder_; + } + + private java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 4; + * + * @return The postStartupScript. + */ + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 4; + * + * @return The bytes for postStartupScript. + */ + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 4; + * + * @param value The postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + postStartupScript_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 4; + * + * @return This builder for chaining. + */ + public Builder clearPostStartupScript() { + + postStartupScript_ = getDefaultInstance().getPostStartupScript(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 4; + * + * @param value The bytes for postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + postStartupScript_ = value; + onChanged(); + return this; + } + + private java.lang.Object proxyUri_ = ""; + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + proxyUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProxyUri() { + + proxyUri_ = getDefaultInstance().getProxyUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+     * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + proxyUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList instanceOwners_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstanceOwnersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instanceOwners_ = new com.google.protobuf.LazyStringArrayList(instanceOwners_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return A list containing the instanceOwners. + */ + public com.google.protobuf.ProtocolStringList getInstanceOwnersList() { + return instanceOwners_.getUnmodifiableView(); + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The count of instanceOwners. + */ + public int getInstanceOwnersCount() { + return instanceOwners_.size(); + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The instanceOwners at the given index. + */ + public java.lang.String getInstanceOwners(int index) { + return instanceOwners_.get(index); + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the instanceOwners at the given index. + */ + public com.google.protobuf.ByteString getInstanceOwnersBytes(int index) { + return instanceOwners_.getByteString(index); + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The instanceOwners to set. + * @return This builder for chaining. + */ + public Builder setInstanceOwners(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceOwnersIsMutable(); + instanceOwners_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The instanceOwners to add. + * @return This builder for chaining. + */ + public Builder addInstanceOwners(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceOwnersIsMutable(); + instanceOwners_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param values The instanceOwners to add. + * @return This builder for chaining. + */ + public Builder addAllInstanceOwners(java.lang.Iterable values) { + ensureInstanceOwnersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceOwners_); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceOwners() { + instanceOwners_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The owner of this instance after creation. Format: `alias@example.com`
+     * Currently supports one owner only. If not specified, all of the service
+     * account users of your VM instance's service account can use
+     * the instance.
+     * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes of the instanceOwners to add. + * @return This builder for chaining. + */ + public Builder addInstanceOwnersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInstanceOwnersIsMutable(); + instanceOwners_.add(value); + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * The service account on this instance, giving access to other Google
+     * Cloud services.
+     * You can use any service account within the same project, but you
+     * must have the service account user permission to use the instance.
+     * If not specified, the [Compute Engine default service
+     * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+     * is used.
+     * 
+ * + * string service_account = 7; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceAccount_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList serviceAccountScopes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureServiceAccountScopesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + serviceAccountScopes_ = new com.google.protobuf.LazyStringArrayList(serviceAccountScopes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the serviceAccountScopes. + */ + public com.google.protobuf.ProtocolStringList getServiceAccountScopesList() { + return serviceAccountScopes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of serviceAccountScopes. + */ + public int getServiceAccountScopesCount() { + return serviceAccountScopes_.size(); + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The serviceAccountScopes at the given index. + */ + public java.lang.String getServiceAccountScopes(int index) { + return serviceAccountScopes_.get(index); + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAccountScopes at the given index. + */ + public com.google.protobuf.ByteString getServiceAccountScopesBytes(int index) { + return serviceAccountScopes_.getByteString(index); + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The serviceAccountScopes to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The serviceAccountScopes to add. + * @return This builder for chaining. + */ + public Builder addServiceAccountScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The serviceAccountScopes to add. + * @return This builder for chaining. + */ + public Builder addAllServiceAccountScopes(java.lang.Iterable values) { + ensureServiceAccountScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceAccountScopes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServiceAccountScopes() { + serviceAccountScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The URIs of service account scopes to be included in
+     * Compute Engine instances.
+     * If not specified, the following
+     * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+     * are defined:
+     *  - https://www.googleapis.com/auth/cloud-platform
+     *  - https://www.googleapis.com/auth/userinfo.email
+     * If not using default scopes, you need at least:
+     *    https://www.googleapis.com/auth/compute
+     * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the serviceAccountScopes to add. + * @return This builder for chaining. + */ + public Builder addServiceAccountScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServiceAccountScopesIsMutable(); + serviceAccountScopes_.add(value); + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+     * instance.
+     * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.Instance.AcceleratorConfig acceleratorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig, + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder> + acceleratorConfigBuilder_; + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * @return Whether the acceleratorConfig field is set. + */ + public boolean hasAcceleratorConfig() { + return acceleratorConfigBuilder_ != null || acceleratorConfig_ != null; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * @return The acceleratorConfig. + */ + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } else { + return acceleratorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + public Builder setAcceleratorConfig( + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceleratorConfig_ = value; + onChanged(); + } else { + acceleratorConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + public Builder setAcceleratorConfig( + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder builderForValue) { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = builderForValue.build(); + onChanged(); + } else { + acceleratorConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + public Builder mergeAcceleratorConfig( + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (acceleratorConfig_ != null) { + acceleratorConfig_ = + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.newBuilder( + acceleratorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + acceleratorConfig_ = value; + } + onChanged(); + } else { + acceleratorConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + public Builder clearAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = null; + onChanged(); + } else { + acceleratorConfig_ = null; + acceleratorConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder + getAcceleratorConfigBuilder() { + + onChanged(); + return getAcceleratorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + public com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + if (acceleratorConfigBuilder_ != null) { + return acceleratorConfigBuilder_.getMessageOrBuilder(); + } else { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + } + /** + * + * + *
+     * The hardware accelerator used on this instance. If you use
+     * accelerators, make sure that your configuration has
+     * [enough vCPUs and memory to support the `machine_type` you
+     * have selected](/compute/docs/gpus/#gpus-list).
+     * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig, + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder> + getAcceleratorConfigFieldBuilder() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig, + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder>( + getAcceleratorConfig(), getParentForChildren(), isClean()); + acceleratorConfig_ = null; + } + return acceleratorConfigBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.State result = + com.google.cloud.notebooks.v1.Instance.State.valueOf(state_); + return result == null ? com.google.cloud.notebooks.v1.Instance.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.notebooks.v1.Instance.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of this instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private boolean installGpuDriver_; + /** + * + * + *
+     * Whether the end user authorizes Google Cloud to install GPU driver
+     * on this instance.
+     * If this field is empty or set to false, the GPU driver won't be installed.
+     * Only applicable to instances with GPUs.
+     * 
+ * + * bool install_gpu_driver = 11; + * + * @return The installGpuDriver. + */ + @java.lang.Override + public boolean getInstallGpuDriver() { + return installGpuDriver_; + } + /** + * + * + *
+     * Whether the end user authorizes Google Cloud to install GPU driver
+     * on this instance.
+     * If this field is empty or set to false, the GPU driver won't be installed.
+     * Only applicable to instances with GPUs.
+     * 
+ * + * bool install_gpu_driver = 11; + * + * @param value The installGpuDriver to set. + * @return This builder for chaining. + */ + public Builder setInstallGpuDriver(boolean value) { + + installGpuDriver_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the end user authorizes Google Cloud to install GPU driver
+     * on this instance.
+     * If this field is empty or set to false, the GPU driver won't be installed.
+     * Only applicable to instances with GPUs.
+     * 
+ * + * bool install_gpu_driver = 11; + * + * @return This builder for chaining. + */ + public Builder clearInstallGpuDriver() { + + installGpuDriver_ = false; + onChanged(); + return this; + } + + private java.lang.Object customGpuDriverPath_ = ""; + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The customGpuDriverPath. + */ + public java.lang.String getCustomGpuDriverPath() { + java.lang.Object ref = customGpuDriverPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customGpuDriverPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The bytes for customGpuDriverPath. + */ + public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customGpuDriverPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @param value The customGpuDriverPath to set. + * @return This builder for chaining. + */ + public Builder setCustomGpuDriverPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customGpuDriverPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return This builder for chaining. + */ + public Builder clearCustomGpuDriverPath() { + + customGpuDriverPath_ = getDefaultInstance().getCustomGpuDriverPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 12; + * + * @param value The bytes for customGpuDriverPath to set. + * @return This builder for chaining. + */ + public Builder setCustomGpuDriverPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customGpuDriverPath_ = value; + onChanged(); + return this; + } + + private int bootDiskType_ = 0; + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for bootDiskType. + */ + @java.lang.Override + public int getBootDiskTypeValue() { + return bootDiskType_; + } + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for bootDiskType to set. + * @return This builder for chaining. + */ + public Builder setBootDiskTypeValue(int value) { + + bootDiskType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The bootDiskType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.DiskType getBootDiskType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.DiskType result = + com.google.cloud.notebooks.v1.Instance.DiskType.valueOf(bootDiskType_); + return result == null ? com.google.cloud.notebooks.v1.Instance.DiskType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The bootDiskType to set. + * @return This builder for chaining. + */ + public Builder setBootDiskType(com.google.cloud.notebooks.v1.Instance.DiskType value) { + if (value == null) { + throw new NullPointerException(); + } + + bootDiskType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBootDiskType() { + + bootDiskType_ = 0; + onChanged(); + return this; + } + + private long bootDiskSizeGb_; + /** + * + * + *
+     * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
+     * of 64000&nbsp;GB (64&nbsp;TB). The minimum recommended value is
+     * 100&nbsp;GB. If not specified, this defaults to 100.
+     * 
+ * + * int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bootDiskSizeGb. + */ + @java.lang.Override + public long getBootDiskSizeGb() { + return bootDiskSizeGb_; + } + /** + * + * + *
+     * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
+     * of 64000&nbsp;GB (64&nbsp;TB). The minimum recommended value is
+     * 100&nbsp;GB. If not specified, this defaults to 100.
+     * 
+ * + * int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bootDiskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setBootDiskSizeGb(long value) { + + bootDiskSizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
+     * of 64000&nbsp;GB (64&nbsp;TB). The minimum recommended value is
+     * 100&nbsp;GB. If not specified, this defaults to 100.
+     * 
+ * + * int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBootDiskSizeGb() { + + bootDiskSizeGb_ = 0L; + onChanged(); + return this; + } + + private int dataDiskType_ = 0; + /** + * + * + *
+     * Input only. The type of the data disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataDiskType. + */ + @java.lang.Override + public int getDataDiskTypeValue() { + return dataDiskType_; + } + /** + * + * + *
+     * Input only. The type of the data disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for dataDiskType to set. + * @return This builder for chaining. + */ + public Builder setDataDiskTypeValue(int value) { + + dataDiskType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The type of the data disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The dataDiskType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.DiskType getDataDiskType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.DiskType result = + com.google.cloud.notebooks.v1.Instance.DiskType.valueOf(dataDiskType_); + return result == null ? com.google.cloud.notebooks.v1.Instance.DiskType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Input only. The type of the data disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The dataDiskType to set. + * @return This builder for chaining. + */ + public Builder setDataDiskType(com.google.cloud.notebooks.v1.Instance.DiskType value) { + if (value == null) { + throw new NullPointerException(); + } + + dataDiskType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The type of the data disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataDiskType() { + + dataDiskType_ = 0; + onChanged(); + return this; + } + + private long dataDiskSizeGb_; + /** + * + * + *
+     * Input only. The size of the data disk in GB attached to this instance, up to a maximum
+     * of 64000&nbsp;GB (64&nbsp;TB). You can choose the size of the data disk
+     * based on how big your notebooks and data are. If not specified, this
+     * defaults to 100.
+     * 
+ * + * int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The dataDiskSizeGb. + */ + @java.lang.Override + public long getDataDiskSizeGb() { + return dataDiskSizeGb_; + } + /** + * + * + *
+     * Input only. The size of the data disk in GB attached to this instance, up to a maximum
+     * of 64000&nbsp;GB (64&nbsp;TB). You can choose the size of the data disk
+     * based on how big your notebooks and data are. If not specified, this
+     * defaults to 100.
+     * 
+ * + * int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The dataDiskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setDataDiskSizeGb(long value) { + + dataDiskSizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The size of the data disk in GB attached to this instance, up to a maximum
+     * of 64000&nbsp;GB (64&nbsp;TB). You can choose the size of the data disk
+     * based on how big your notebooks and data are. If not specified, this
+     * defaults to 100.
+     * 
+ * + * int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDataDiskSizeGb() { + + dataDiskSizeGb_ = 0L; + onChanged(); + return this; + } + + private boolean noRemoveDataDisk_; + /** + * + * + *
+     * Input only. If true, the data disk will not be auto deleted when deleting the instance.
+     * 
+ * + * bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The noRemoveDataDisk. + */ + @java.lang.Override + public boolean getNoRemoveDataDisk() { + return noRemoveDataDisk_; + } + /** + * + * + *
+     * Input only. If true, the data disk will not be auto deleted when deleting the instance.
+     * 
+ * + * bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The noRemoveDataDisk to set. + * @return This builder for chaining. + */ + public Builder setNoRemoveDataDisk(boolean value) { + + noRemoveDataDisk_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. If true, the data disk will not be auto deleted when deleting the instance.
+     * 
+ * + * bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearNoRemoveDataDisk() { + + noRemoveDataDisk_ = false; + onChanged(); + return this; + } + + private int diskEncryption_ = 0; + /** + * + * + *
+     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for diskEncryption. + */ + @java.lang.Override + public int getDiskEncryptionValue() { + return diskEncryption_; + } + /** + * + * + *
+     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for diskEncryption to set. + * @return This builder for chaining. + */ + public Builder setDiskEncryptionValue(int value) { + + diskEncryption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diskEncryption. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.DiskEncryption getDiskEncryption() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.DiskEncryption result = + com.google.cloud.notebooks.v1.Instance.DiskEncryption.valueOf(diskEncryption_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.DiskEncryption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The diskEncryption to set. + * @return This builder for chaining. + */ + public Builder setDiskEncryption(com.google.cloud.notebooks.v1.Instance.DiskEncryption value) { + if (value == null) { + throw new NullPointerException(); + } + + diskEncryption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDiskEncryption() { + + diskEncryption_ = 0; + onChanged(); + return this; + } + + private java.lang.Object kmsKey_ = ""; + /** + * + * + *
+     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+     * is CMEK.
+     * Format:
+     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+     * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+     * is CMEK.
+     * Format:
+     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+     * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+     * is CMEK.
+     * Format:
+     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+     * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+     * is CMEK.
+     * Format:
+     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+     * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + + kmsKey_ = getDefaultInstance().getKmsKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+     * is CMEK.
+     * Format:
+     * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+     * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+     * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKey_ = value; + onChanged(); + return this; + } + + private java.util.List disks_ = + java.util.Collections.emptyList(); + + private void ensureDisksIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + disks_ = new java.util.ArrayList(disks_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.Disk, + com.google.cloud.notebooks.v1.Instance.Disk.Builder, + com.google.cloud.notebooks.v1.Instance.DiskOrBuilder> + disksBuilder_; + + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getDisksList() { + if (disksBuilder_ == null) { + return java.util.Collections.unmodifiableList(disks_); + } else { + return disksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDisksCount() { + if (disksBuilder_ == null) { + return disks_.size(); + } else { + return disksBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk getDisks(int index) { + if (disksBuilder_ == null) { + return disks_.get(index); + } else { + return disksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDisks(int index, com.google.cloud.notebooks.v1.Instance.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.set(index, value); + onChanged(); + } else { + disksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDisks( + int index, com.google.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.set(index, builderForValue.build()); + onChanged(); + } else { + disksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDisks(com.google.cloud.notebooks.v1.Instance.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.add(value); + onChanged(); + } else { + disksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDisks(int index, com.google.cloud.notebooks.v1.Instance.Disk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.add(index, value); + onChanged(); + } else { + disksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDisks(com.google.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(builderForValue.build()); + onChanged(); + } else { + disksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDisks( + int index, com.google.cloud.notebooks.v1.Instance.Disk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(index, builderForValue.build()); + onChanged(); + } else { + disksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDisks( + java.lang.Iterable values) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, disks_); + onChanged(); + } else { + disksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDisks() { + if (disksBuilder_ == null) { + disks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + disksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDisks(int index) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.remove(index); + onChanged(); + } else { + disksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk.Builder getDisksBuilder(int index) { + return getDisksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Instance.DiskOrBuilder getDisksOrBuilder(int index) { + if (disksBuilder_ == null) { + return disks_.get(index); + } else { + return disksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDisksOrBuilderList() { + if (disksBuilder_ != null) { + return disksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(disks_); + } + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk.Builder addDisksBuilder() { + return getDisksFieldBuilder() + .addBuilder(com.google.cloud.notebooks.v1.Instance.Disk.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Instance.Disk.Builder addDisksBuilder(int index) { + return getDisksFieldBuilder() + .addBuilder(index, com.google.cloud.notebooks.v1.Instance.Disk.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Attached disks to notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDisksBuilderList() { + return getDisksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.Disk, + com.google.cloud.notebooks.v1.Instance.Disk.Builder, + com.google.cloud.notebooks.v1.Instance.DiskOrBuilder> + getDisksFieldBuilder() { + if (disksBuilder_ == null) { + disksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.Disk, + com.google.cloud.notebooks.v1.Instance.Disk.Builder, + com.google.cloud.notebooks.v1.Instance.DiskOrBuilder>( + disks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + disks_ = null; + } + return disksBuilder_; + } + + private com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shieldedInstanceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder> + shieldedInstanceConfigBuilder_; + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfigBuilder_ != null || shieldedInstanceConfig_ != null; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The shieldedInstanceConfig. + */ + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } else { + return shieldedInstanceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setShieldedInstanceConfig( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shieldedInstanceConfig_ = value; + onChanged(); + } else { + shieldedInstanceConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setShieldedInstanceConfig( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder builderForValue) { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = builderForValue.build(); + onChanged(); + } else { + shieldedInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeShieldedInstanceConfig( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (shieldedInstanceConfig_ != null) { + shieldedInstanceConfig_ = + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.newBuilder( + shieldedInstanceConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + shieldedInstanceConfig_ = value; + } + onChanged(); + } else { + shieldedInstanceConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = null; + onChanged(); + } else { + shieldedInstanceConfig_ = null; + shieldedInstanceConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder + getShieldedInstanceConfigBuilder() { + + onChanged(); + return getShieldedInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + if (shieldedInstanceConfigBuilder_ != null) { + return shieldedInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + } + /** + * + * + *
+     * Optional. Shielded VM configuration.
+     * [Images using supported Shielded VM features]
+     * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder> + getShieldedInstanceConfigFieldBuilder() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder>( + getShieldedInstanceConfig(), getParentForChildren(), isClean()); + shieldedInstanceConfig_ = null; + } + return shieldedInstanceConfigBuilder_; + } + + private boolean noPublicIp_; + /** + * + * + *
+     * If true, no public IP will be assigned to this instance.
+     * 
+ * + * bool no_public_ip = 17; + * + * @return The noPublicIp. + */ + @java.lang.Override + public boolean getNoPublicIp() { + return noPublicIp_; + } + /** + * + * + *
+     * If true, no public IP will be assigned to this instance.
+     * 
+ * + * bool no_public_ip = 17; + * + * @param value The noPublicIp to set. + * @return This builder for chaining. + */ + public Builder setNoPublicIp(boolean value) { + + noPublicIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, no public IP will be assigned to this instance.
+     * 
+ * + * bool no_public_ip = 17; + * + * @return This builder for chaining. + */ + public Builder clearNoPublicIp() { + + noPublicIp_ = false; + onChanged(); + return this; + } + + private boolean noProxyAccess_; + /** + * + * + *
+     * If true, the notebook instance will not register with the proxy.
+     * 
+ * + * bool no_proxy_access = 18; + * + * @return The noProxyAccess. + */ + @java.lang.Override + public boolean getNoProxyAccess() { + return noProxyAccess_; + } + /** + * + * + *
+     * If true, the notebook instance will not register with the proxy.
+     * 
+ * + * bool no_proxy_access = 18; + * + * @param value The noProxyAccess to set. + * @return This builder for chaining. + */ + public Builder setNoProxyAccess(boolean value) { + + noProxyAccess_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, the notebook instance will not register with the proxy.
+     * 
+ * + * bool no_proxy_access = 18; + * + * @return This builder for chaining. + */ + public Builder clearNoProxyAccess() { + + noProxyAccess_ = false; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the VPC that this instance is in.
+     * Format:
+     * `projects/{project_id}/global/networks/{network_id}`
+     * 
+ * + * string network = 19; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object subnet_ = ""; + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @return The subnet. + */ + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @return The bytes for subnet. + */ + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @param value The subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @return This builder for chaining. + */ + public Builder clearSubnet() { + + subnet_ = getDefaultInstance().getSubnet(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the subnet that this instance is in.
+     * Format:
+     * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+     * 
+ * + * string subnet = 20; + * + * @param value The bytes for subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnet_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method.
+     * 
+ * + * map<string, string> labels = 21; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + private com.google.protobuf.MapField + internalGetMutableMetadata() { + onChanged(); + ; + if (metadata_ == null) { + metadata_ = + com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.lang.String getMetadataOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + internalGetMutableMetadata().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + public Builder removeMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableMetadata().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetadata() { + return internalGetMutableMetadata().getMutableMap(); + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + public Builder putMetadata(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableMetadata().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Custom metadata to apply to this instance.
+     * 
+ * + * map<string, string> metadata = 22; + */ + public Builder putAllMetadata(java.util.Map values) { + internalGetMutableMetadata().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private java.util.List + upgradeHistory_ = java.util.Collections.emptyList(); + + private void ensureUpgradeHistoryIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + upgradeHistory_ = + new java.util.ArrayList( + upgradeHistory_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + upgradeHistoryBuilder_; + + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public java.util.List + getUpgradeHistoryList() { + if (upgradeHistoryBuilder_ == null) { + return java.util.Collections.unmodifiableList(upgradeHistory_); + } else { + return upgradeHistoryBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public int getUpgradeHistoryCount() { + if (upgradeHistoryBuilder_ == null) { + return upgradeHistory_.size(); + } else { + return upgradeHistoryBuilder_.getCount(); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getUpgradeHistory(int index) { + if (upgradeHistoryBuilder_ == null) { + return upgradeHistory_.get(index); + } else { + return upgradeHistoryBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder setUpgradeHistory( + int index, com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) { + if (upgradeHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.set(index, value); + onChanged(); + } else { + upgradeHistoryBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder setUpgradeHistory( + int index, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.set(index, builderForValue.build()); + onChanged(); + } else { + upgradeHistoryBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addUpgradeHistory( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) { + if (upgradeHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(value); + onChanged(); + } else { + upgradeHistoryBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addUpgradeHistory( + int index, com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry value) { + if (upgradeHistoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(index, value); + onChanged(); + } else { + upgradeHistoryBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addUpgradeHistory( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(builderForValue.build()); + onChanged(); + } else { + upgradeHistoryBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addUpgradeHistory( + int index, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder builderForValue) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.add(index, builderForValue.build()); + onChanged(); + } else { + upgradeHistoryBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder addAllUpgradeHistory( + java.lang.Iterable + values) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, upgradeHistory_); + onChanged(); + } else { + upgradeHistoryBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder clearUpgradeHistory() { + if (upgradeHistoryBuilder_ == null) { + upgradeHistory_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + upgradeHistoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public Builder removeUpgradeHistory(int index) { + if (upgradeHistoryBuilder_ == null) { + ensureUpgradeHistoryIsMutable(); + upgradeHistory_.remove(index); + onChanged(); + } else { + upgradeHistoryBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder + getUpgradeHistoryBuilder(int index) { + return getUpgradeHistoryFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder + getUpgradeHistoryOrBuilder(int index) { + if (upgradeHistoryBuilder_ == null) { + return upgradeHistory_.get(index); + } else { + return upgradeHistoryBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public java.util.List< + ? extends com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + getUpgradeHistoryOrBuilderList() { + if (upgradeHistoryBuilder_ != null) { + return upgradeHistoryBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(upgradeHistory_); + } + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder + addUpgradeHistoryBuilder() { + return getUpgradeHistoryFieldBuilder() + .addBuilder( + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDefaultInstance()); + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder + addUpgradeHistoryBuilder(int index) { + return getUpgradeHistoryFieldBuilder() + .addBuilder( + index, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.getDefaultInstance()); + } + /** + * + * + *
+     * The upgrade history of this instance.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + public java.util.List + getUpgradeHistoryBuilderList() { + return getUpgradeHistoryFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder> + getUpgradeHistoryFieldBuilder() { + if (upgradeHistoryBuilder_ == null) { + upgradeHistoryBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Builder, + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder>( + upgradeHistory_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + upgradeHistory_ = null; + } + return upgradeHistoryBuilder_; + } + + private int nicType_ = 0; + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for nicType to set. + * @return This builder for chaining. + */ + public Builder setNicTypeValue(int value) { + + nicType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.NicType getNicType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.NicType result = + com.google.cloud.notebooks.v1.Instance.NicType.valueOf(nicType_); + return result == null ? com.google.cloud.notebooks.v1.Instance.NicType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The nicType to set. + * @return This builder for chaining. + */ + public Builder setNicType(com.google.cloud.notebooks.v1.Instance.NicType value) { + if (value == null) { + throw new NullPointerException(); + } + + nicType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNicType() { + + nicType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.ReservationAffinity reservationAffinity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ReservationAffinity, + com.google.cloud.notebooks.v1.ReservationAffinity.Builder, + com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder> + reservationAffinityBuilder_; + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reservationAffinity field is set. + */ + public boolean hasReservationAffinity() { + return reservationAffinityBuilder_ != null || reservationAffinity_ != null; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reservationAffinity. + */ + public com.google.cloud.notebooks.v1.ReservationAffinity getReservationAffinity() { + if (reservationAffinityBuilder_ == null) { + return reservationAffinity_ == null + ? com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance() + : reservationAffinity_; + } else { + return reservationAffinityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReservationAffinity(com.google.cloud.notebooks.v1.ReservationAffinity value) { + if (reservationAffinityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reservationAffinity_ = value; + onChanged(); + } else { + reservationAffinityBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReservationAffinity( + com.google.cloud.notebooks.v1.ReservationAffinity.Builder builderForValue) { + if (reservationAffinityBuilder_ == null) { + reservationAffinity_ = builderForValue.build(); + onChanged(); + } else { + reservationAffinityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReservationAffinity( + com.google.cloud.notebooks.v1.ReservationAffinity value) { + if (reservationAffinityBuilder_ == null) { + if (reservationAffinity_ != null) { + reservationAffinity_ = + com.google.cloud.notebooks.v1.ReservationAffinity.newBuilder(reservationAffinity_) + .mergeFrom(value) + .buildPartial(); + } else { + reservationAffinity_ = value; + } + onChanged(); + } else { + reservationAffinityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReservationAffinity() { + if (reservationAffinityBuilder_ == null) { + reservationAffinity_ = null; + onChanged(); + } else { + reservationAffinity_ = null; + reservationAffinityBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.ReservationAffinity.Builder + getReservationAffinityBuilder() { + + onChanged(); + return getReservationAffinityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder + getReservationAffinityOrBuilder() { + if (reservationAffinityBuilder_ != null) { + return reservationAffinityBuilder_.getMessageOrBuilder(); + } else { + return reservationAffinity_ == null + ? com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance() + : reservationAffinity_; + } + } + /** + * + * + *
+     * Optional. The optional reservation affinity. Setting this field will apply
+     * the specified [Zonal Compute
+     * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+     * to this notebook instance.
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ReservationAffinity, + com.google.cloud.notebooks.v1.ReservationAffinity.Builder, + com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder> + getReservationAffinityFieldBuilder() { + if (reservationAffinityBuilder_ == null) { + reservationAffinityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ReservationAffinity, + com.google.cloud.notebooks.v1.ReservationAffinity.Builder, + com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder>( + getReservationAffinity(), getParentForChildren(), isClean()); + reservationAffinity_ = null; + } + return reservationAffinityBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Instance creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Instance update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Instance) + private static final com.google.cloud.notebooks.v1.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Instance(); + } + + public static com.google.cloud.notebooks.v1.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Instance(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfig.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfig.java new file mode 100644 index 00000000..d68cb28e --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfig.java @@ -0,0 +1,731 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/instance_config.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Notebook instance configurations that can be updated.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.InstanceConfig} + */ +public final class InstanceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.InstanceConfig) + InstanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceConfig.newBuilder() to construct. + private InstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceConfig() { + notebookUpgradeSchedule_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstanceConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + notebookUpgradeSchedule_ = s; + break; + } + case 16: + { + enableHealthMonitoring_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceConfigProto + .internal_static_google_cloud_notebooks_v1_InstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceConfigProto + .internal_static_google_cloud_notebooks_v1_InstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.InstanceConfig.class, + com.google.cloud.notebooks.v1.InstanceConfig.Builder.class); + } + + public static final int NOTEBOOK_UPGRADE_SCHEDULE_FIELD_NUMBER = 1; + private volatile java.lang.Object notebookUpgradeSchedule_; + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + @java.lang.Override + public java.lang.String getNotebookUpgradeSchedule() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookUpgradeSchedule_ = s; + return s; + } + } + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookUpgradeSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_HEALTH_MONITORING_FIELD_NUMBER = 2; + private boolean enableHealthMonitoring_; + /** + * + * + *
+   * Verifies core internal services are running. More info: go/notebooks-health
+   * 
+ * + * bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + @java.lang.Override + public boolean getEnableHealthMonitoring() { + return enableHealthMonitoring_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNotebookUpgradeScheduleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, notebookUpgradeSchedule_); + } + if (enableHealthMonitoring_ != false) { + output.writeBool(2, enableHealthMonitoring_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNotebookUpgradeScheduleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, notebookUpgradeSchedule_); + } + if (enableHealthMonitoring_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableHealthMonitoring_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.InstanceConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.InstanceConfig other = + (com.google.cloud.notebooks.v1.InstanceConfig) obj; + + if (!getNotebookUpgradeSchedule().equals(other.getNotebookUpgradeSchedule())) return false; + if (getEnableHealthMonitoring() != other.getEnableHealthMonitoring()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NOTEBOOK_UPGRADE_SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookUpgradeSchedule().hashCode(); + hash = (37 * hash) + ENABLE_HEALTH_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableHealthMonitoring()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.InstanceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Notebook instance configurations that can be updated.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.InstanceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.InstanceConfig) + com.google.cloud.notebooks.v1.InstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceConfigProto + .internal_static_google_cloud_notebooks_v1_InstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceConfigProto + .internal_static_google_cloud_notebooks_v1_InstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.InstanceConfig.class, + com.google.cloud.notebooks.v1.InstanceConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.InstanceConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + notebookUpgradeSchedule_ = ""; + + enableHealthMonitoring_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.InstanceConfigProto + .internal_static_google_cloud_notebooks_v1_InstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.InstanceConfig getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.InstanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.InstanceConfig build() { + com.google.cloud.notebooks.v1.InstanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.InstanceConfig buildPartial() { + com.google.cloud.notebooks.v1.InstanceConfig result = + new com.google.cloud.notebooks.v1.InstanceConfig(this); + result.notebookUpgradeSchedule_ = notebookUpgradeSchedule_; + result.enableHealthMonitoring_ = enableHealthMonitoring_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.InstanceConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.InstanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.InstanceConfig other) { + if (other == com.google.cloud.notebooks.v1.InstanceConfig.getDefaultInstance()) return this; + if (!other.getNotebookUpgradeSchedule().isEmpty()) { + notebookUpgradeSchedule_ = other.notebookUpgradeSchedule_; + onChanged(); + } + if (other.getEnableHealthMonitoring() != false) { + setEnableHealthMonitoring(other.getEnableHealthMonitoring()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.InstanceConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.InstanceConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object notebookUpgradeSchedule_ = ""; + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + public java.lang.String getNotebookUpgradeSchedule() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookUpgradeSchedule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + public com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookUpgradeSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @param value The notebookUpgradeSchedule to set. + * @return This builder for chaining. + */ + public Builder setNotebookUpgradeSchedule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + notebookUpgradeSchedule_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return This builder for chaining. + */ + public Builder clearNotebookUpgradeSchedule() { + + notebookUpgradeSchedule_ = getDefaultInstance().getNotebookUpgradeSchedule(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @param value The bytes for notebookUpgradeSchedule to set. + * @return This builder for chaining. + */ + public Builder setNotebookUpgradeScheduleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + notebookUpgradeSchedule_ = value; + onChanged(); + return this; + } + + private boolean enableHealthMonitoring_; + /** + * + * + *
+     * Verifies core internal services are running. More info: go/notebooks-health
+     * 
+ * + * bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + @java.lang.Override + public boolean getEnableHealthMonitoring() { + return enableHealthMonitoring_; + } + /** + * + * + *
+     * Verifies core internal services are running. More info: go/notebooks-health
+     * 
+ * + * bool enable_health_monitoring = 2; + * + * @param value The enableHealthMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableHealthMonitoring(boolean value) { + + enableHealthMonitoring_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Verifies core internal services are running. More info: go/notebooks-health
+     * 
+ * + * bool enable_health_monitoring = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableHealthMonitoring() { + + enableHealthMonitoring_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.InstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.InstanceConfig) + private static final com.google.cloud.notebooks.v1.InstanceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.InstanceConfig(); + } + + public static com.google.cloud.notebooks.v1.InstanceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstanceConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.InstanceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfigOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfigOrBuilder.java new file mode 100644 index 00000000..4a0e02b3 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfigOrBuilder.java @@ -0,0 +1,65 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/instance_config.proto + +package com.google.cloud.notebooks.v1; + +public interface InstanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.InstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + java.lang.String getNotebookUpgradeSchedule(); + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes(); + + /** + * + * + *
+   * Verifies core internal services are running. More info: go/notebooks-health
+   * 
+ * + * bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + boolean getEnableHealthMonitoring(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfigProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfigProto.java new file mode 100644 index 00000000..f407a2e7 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceConfigProto.java @@ -0,0 +1,68 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/instance_config.proto + +package com.google.cloud.notebooks.v1; + +public final class InstanceConfigProto { + private InstanceConfigProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_InstanceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_InstanceConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/notebooks/v1/instance_con" + + "fig.proto\022\031google.cloud.notebooks.v1\"U\n\016" + + "InstanceConfig\022!\n\031notebook_upgrade_sched" + + "ule\030\001 \001(\t\022 \n\030enable_health_monitoring\030\002 " + + "\001(\010B\321\001\n\035com.google.cloud.notebooks.v1B\023I" + + "nstanceConfigProtoP\001ZBgoogle.golang.org/" + + "genproto/googleapis/cloud/notebooks/v1;n" + + "otebooks\252\002\031Google.Cloud.Notebooks.V1\312\002\031G" + + "oogle\\Cloud\\Notebooks\\V1\352\002\034Google::Cloud" + + "::Notebooks::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_notebooks_v1_InstanceConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_InstanceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_InstanceConfig_descriptor, + new java.lang.String[] { + "NotebookUpgradeSchedule", "EnableHealthMonitoring", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceName.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceName.java new file mode 100644 index 00000000..11d8bbc8 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceName implements ResourceName { + private static final PathTemplate PROJECT_INSTANCE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String project, String instance) { + return newBuilder().setProject(project).setInstance(instance).build(); + } + + public static String format(String project, String instance) { + return newBuilder().setProject(project).setInstance(instance).build().toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_INSTANCE.instantiate("project", project, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** Builder for projects/{project}/instances/{instance}. */ + public static class Builder { + private String project; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + this.project = instanceName.project; + this.instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceOrBuilder.java new file mode 100644 index 00000000..419d9c06 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceOrBuilder.java @@ -0,0 +1,1254 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/instance.proto + +package com.google.cloud.notebooks.v1; + +public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of this notebook instance. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of this notebook instance. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return Whether the vmImage field is set. + */ + boolean hasVmImage(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + * + * @return The vmImage. + */ + com.google.cloud.notebooks.v1.VmImage getVmImage(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VmImage vm_image = 2; + */ + com.google.cloud.notebooks.v1.VmImageOrBuilder getVmImageOrBuilder(); + + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return Whether the containerImage field is set. + */ + boolean hasContainerImage(); + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + * + * @return The containerImage. + */ + com.google.cloud.notebooks.v1.ContainerImage getContainerImage(); + /** + * + * + *
+   * Use a container image to start the notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.ContainerImage container_image = 3; + */ + com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImageOrBuilder(); + + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (gs://path-to-file/file-name).
+   * 
+ * + * string post_startup_script = 4; + * + * @return The postStartupScript. + */ + java.lang.String getPostStartupScript(); + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (gs://path-to-file/file-name).
+   * 
+ * + * string post_startup_script = 4; + * + * @return The bytes for postStartupScript. + */ + com.google.protobuf.ByteString getPostStartupScriptBytes(); + + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + java.lang.String getProxyUri(); + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the Jupyter notebook.
+   * 
+ * + * string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + com.google.protobuf.ByteString getProxyUriBytes(); + + /** + * + * + *
+   * Input only. The owner of this instance after creation. Format: `alias@example.com`
+   * Currently supports one owner only. If not specified, all of the service
+   * account users of your VM instance's service account can use
+   * the instance.
+   * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return A list containing the instanceOwners. + */ + java.util.List getInstanceOwnersList(); + /** + * + * + *
+   * Input only. The owner of this instance after creation. Format: `alias@example.com`
+   * Currently supports one owner only. If not specified, all of the service
+   * account users of your VM instance's service account can use
+   * the instance.
+   * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The count of instanceOwners. + */ + int getInstanceOwnersCount(); + /** + * + * + *
+   * Input only. The owner of this instance after creation. Format: `alias@example.com`
+   * Currently supports one owner only. If not specified, all of the service
+   * account users of your VM instance's service account can use
+   * the instance.
+   * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The instanceOwners at the given index. + */ + java.lang.String getInstanceOwners(int index); + /** + * + * + *
+   * Input only. The owner of this instance after creation. Format: `alias@example.com`
+   * Currently supports one owner only. If not specified, all of the service
+   * account users of your VM instance's service account can use
+   * the instance.
+   * 
+ * + * repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the instanceOwners at the given index. + */ + com.google.protobuf.ByteString getInstanceOwnersBytes(int index); + + /** + * + * + *
+   * The service account on this instance, giving access to other Google
+   * Cloud services.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 7; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * The service account on this instance, giving access to other Google
+   * Cloud services.
+   * You can use any service account within the same project, but you
+   * must have the service account user permission to use the instance.
+   * If not specified, the [Compute Engine default service
+   * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
+   * is used.
+   * 
+ * + * string service_account = 7; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the serviceAccountScopes. + */ + java.util.List getServiceAccountScopesList(); + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of serviceAccountScopes. + */ + int getServiceAccountScopesCount(); + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The serviceAccountScopes at the given index. + */ + java.lang.String getServiceAccountScopes(int index); + /** + * + * + *
+   * Optional. The URIs of service account scopes to be included in
+   * Compute Engine instances.
+   * If not specified, the following
+   * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam)
+   * are defined:
+   *  - https://www.googleapis.com/auth/cloud-platform
+   *  - https://www.googleapis.com/auth/userinfo.email
+   * If not using default scopes, you need at least:
+   *    https://www.googleapis.com/auth/compute
+   * 
+ * + * repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the serviceAccountScopes at the given index. + */ + com.google.protobuf.ByteString getServiceAccountScopesBytes(int index); + + /** + * + * + *
+   * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+   * instance.
+   * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Required. The [Compute Engine machine type](/compute/docs/machine-types) of this
+   * instance.
+   * 
+ * + * string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you
+   * have selected](/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * @return Whether the acceleratorConfig field is set. + */ + boolean hasAcceleratorConfig(); + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you
+   * have selected](/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * + * @return The acceleratorConfig. + */ + com.google.cloud.notebooks.v1.Instance.AcceleratorConfig getAcceleratorConfig(); + /** + * + * + *
+   * The hardware accelerator used on this instance. If you use
+   * accelerators, make sure that your configuration has
+   * [enough vCPUs and memory to support the `machine_type` you
+   * have selected](/compute/docs/gpus/#gpus-list).
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + com.google.cloud.notebooks.v1.Instance.AcceleratorConfigOrBuilder getAcceleratorConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The state of this instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The state of this instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.notebooks.v1.Instance.State getState(); + + /** + * + * + *
+   * Whether the end user authorizes Google Cloud to install GPU driver
+   * on this instance.
+   * If this field is empty or set to false, the GPU driver won't be installed.
+   * Only applicable to instances with GPUs.
+   * 
+ * + * bool install_gpu_driver = 11; + * + * @return The installGpuDriver. + */ + boolean getInstallGpuDriver(); + + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The customGpuDriverPath. + */ + java.lang.String getCustomGpuDriverPath(); + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 12; + * + * @return The bytes for customGpuDriverPath. + */ + com.google.protobuf.ByteString getCustomGpuDriverPathBytes(); + + /** + * + * + *
+   * Input only. The type of the boot disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for bootDiskType. + */ + int getBootDiskTypeValue(); + /** + * + * + *
+   * Input only. The type of the boot disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The bootDiskType. + */ + com.google.cloud.notebooks.v1.Instance.DiskType getBootDiskType(); + + /** + * + * + *
+   * Input only. The size of the boot disk in GB attached to this instance, up to a maximum
+   * of 64000&nbsp;GB (64&nbsp;TB). The minimum recommended value is
+   * 100&nbsp;GB. If not specified, this defaults to 100.
+   * 
+ * + * int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bootDiskSizeGb. + */ + long getBootDiskSizeGb(); + + /** + * + * + *
+   * Input only. The type of the data disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataDiskType. + */ + int getDataDiskTypeValue(); + /** + * + * + *
+   * Input only. The type of the data disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The dataDiskType. + */ + com.google.cloud.notebooks.v1.Instance.DiskType getDataDiskType(); + + /** + * + * + *
+   * Input only. The size of the data disk in GB attached to this instance, up to a maximum
+   * of 64000&nbsp;GB (64&nbsp;TB). You can choose the size of the data disk
+   * based on how big your notebooks and data are. If not specified, this
+   * defaults to 100.
+   * 
+ * + * int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The dataDiskSizeGb. + */ + long getDataDiskSizeGb(); + + /** + * + * + *
+   * Input only. If true, the data disk will not be auto deleted when deleting the instance.
+   * 
+ * + * bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The noRemoveDataDisk. + */ + boolean getNoRemoveDataDisk(); + + /** + * + * + *
+   * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for diskEncryption. + */ + int getDiskEncryptionValue(); + /** + * + * + *
+   * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diskEncryption. + */ + com.google.cloud.notebooks.v1.Instance.DiskEncryption getDiskEncryption(); + + /** + * + * + *
+   * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+   * is CMEK.
+   * Format:
+   * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+   * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+   * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + /** + * + * + *
+   * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption
+   * is CMEK.
+   * Format:
+   * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}`
+   * Learn more about [using your own encryption keys](/kms/docs/quickstart).
+   * 
+ * + * string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); + + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getDisksList(); + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.notebooks.v1.Instance.Disk getDisks(int index); + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDisksCount(); + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDisksOrBuilderList(); + /** + * + * + *
+   * Output only. Attached disks to notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.notebooks.v1.Instance.DiskOrBuilder getDisksOrBuilder(int index); + + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM features]
+   * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + boolean hasShieldedInstanceConfig(); + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM features]
+   * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The shieldedInstanceConfig. + */ + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig getShieldedInstanceConfig(); + /** + * + * + *
+   * Optional. Shielded VM configuration.
+   * [Images using supported Shielded VM features]
+   * (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder(); + + /** + * + * + *
+   * If true, no public IP will be assigned to this instance.
+   * 
+ * + * bool no_public_ip = 17; + * + * @return The noPublicIp. + */ + boolean getNoPublicIp(); + + /** + * + * + *
+   * If true, the notebook instance will not register with the proxy.
+   * 
+ * + * bool no_proxy_access = 18; + * + * @return The noProxyAccess. + */ + boolean getNoProxyAccess(); + + /** + * + * + *
+   * The name of the VPC that this instance is in.
+   * Format:
+   * `projects/{project_id}/global/networks/{network_id}`
+   * 
+ * + * string network = 19; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * The name of the VPC that this instance is in.
+   * Format:
+   * `projects/{project_id}/global/networks/{network_id}`
+   * 
+ * + * string network = 19; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnet = 20; + * + * @return The subnet. + */ + java.lang.String getSubnet(); + /** + * + * + *
+   * The name of the subnet that this instance is in.
+   * Format:
+   * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
+   * 
+ * + * string subnet = 20; + * + * @return The bytes for subnet. + */ + com.google.protobuf.ByteString getSubnetBytes(); + + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method.
+   * 
+ * + * map<string, string> labels = 21; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + int getMetadataCount(); + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + boolean containsMetadata(java.lang.String key); + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetadata(); + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + java.util.Map getMetadataMap(); + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Custom metadata to apply to this instance.
+   * 
+ * + * map<string, string> metadata = 22; + */ + java.lang.String getMetadataOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + java.util.List + getUpgradeHistoryList(); + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry getUpgradeHistory(int index); + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + int getUpgradeHistoryCount(); + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + java.util.List + getUpgradeHistoryOrBuilderList(); + /** + * + * + *
+   * The upgrade history of this instance.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * + */ + com.google.cloud.notebooks.v1.Instance.UpgradeHistoryEntryOrBuilder getUpgradeHistoryOrBuilder( + int index); + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+   * VirtioNet.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + int getNicTypeValue(); + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+   * VirtioNet.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + com.google.cloud.notebooks.v1.Instance.NicType getNicType(); + + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reservationAffinity field is set. + */ + boolean hasReservationAffinity(); + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reservationAffinity. + */ + com.google.cloud.notebooks.v1.ReservationAffinity getReservationAffinity(); + /** + * + * + *
+   * Optional. The optional reservation affinity. Setting this field will apply
+   * the specified [Zonal Compute
+   * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources)
+   * to this notebook instance.
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder getReservationAffinityOrBuilder(); + + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Instance creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Instance update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + public com.google.cloud.notebooks.v1.Instance.EnvironmentCase getEnvironmentCase(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceProto.java new file mode 100644 index 00000000..97380fa3 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/InstanceProto.java @@ -0,0 +1,330 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/instance.proto + +package com.google.cloud.notebooks.v1; + +public final class InstanceProto { + private InstanceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ReservationAffinity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ReservationAffinity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Instance_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Instance_MetadataEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Instance_MetadataEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n(google/cloud/notebooks/v1/instance.pro" + + "to\022\031google.cloud.notebooks.v1\032\037google/ap" + + "i/field_behavior.proto\032\031google/api/resou" + + "rce.proto\032+google/cloud/notebooks/v1/env" + + "ironment.proto\032\037google/protobuf/timestam" + + "p.proto\"\371\001\n\023ReservationAffinity\022Z\n\030consu" + + "me_reservation_type\030\001 \001(\01623.google.cloud" + + ".notebooks.v1.ReservationAffinity.TypeB\003" + + "\340A\001\022\020\n\003key\030\002 \001(\tB\003\340A\001\022\023\n\006values\030\003 \003(\tB\003\340" + + "A\001\"_\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\022\n\016NO_R" + + "ESERVATION\020\001\022\023\n\017ANY_RESERVATION\020\002\022\030\n\024SPE" + + "CIFIC_RESERVATION\020\003\"\313\033\n\010Instance\022\021\n\004name" + + "\030\001 \001(\tB\003\340A\003\0226\n\010vm_image\030\002 \001(\0132\".google.c" + + "loud.notebooks.v1.VmImageH\000\022D\n\017container" + + "_image\030\003 \001(\0132).google.cloud.notebooks.v1" + + ".ContainerImageH\000\022\033\n\023post_startup_script" + + "\030\004 \001(\t\022\026\n\tproxy_uri\030\005 \001(\tB\003\340A\003\022\034\n\017instan" + + "ce_owners\030\006 \003(\tB\003\340A\004\022\027\n\017service_account\030" + + "\007 \001(\t\022#\n\026service_account_scopes\030\037 \003(\tB\003\340" + + "A\001\022\031\n\014machine_type\030\010 \001(\tB\003\340A\002\022Q\n\022acceler" + + "ator_config\030\t \001(\01325.google.cloud.noteboo" + + "ks.v1.Instance.AcceleratorConfig\022=\n\005stat" + + "e\030\n \001(\0162).google.cloud.notebooks.v1.Inst" + + "ance.StateB\003\340A\003\022\032\n\022install_gpu_driver\030\013 " + + "\001(\010\022\036\n\026custom_gpu_driver_path\030\014 \001(\t\022I\n\016b" + + "oot_disk_type\030\r \001(\0162,.google.cloud.noteb" + + "ooks.v1.Instance.DiskTypeB\003\340A\004\022\036\n\021boot_d" + + "isk_size_gb\030\016 \001(\003B\003\340A\004\022I\n\016data_disk_type" + + "\030\031 \001(\0162,.google.cloud.notebooks.v1.Insta" + + "nce.DiskTypeB\003\340A\004\022\036\n\021data_disk_size_gb\030\032" + + " \001(\003B\003\340A\004\022 \n\023no_remove_data_disk\030\033 \001(\010B\003" + + "\340A\004\022P\n\017disk_encryption\030\017 \001(\01622.google.cl" + + "oud.notebooks.v1.Instance.DiskEncryption" + + "B\003\340A\004\022\024\n\007kms_key\030\020 \001(\tB\003\340A\004\022<\n\005disks\030\034 \003" + + "(\0132(.google.cloud.notebooks.v1.Instance." + + "DiskB\003\340A\003\022a\n\030shielded_instance_config\030\036 " + + "\001(\0132:.google.cloud.notebooks.v1.Instance" + + ".ShieldedInstanceConfigB\003\340A\001\022\024\n\014no_publi" + + "c_ip\030\021 \001(\010\022\027\n\017no_proxy_access\030\022 \001(\010\022\017\n\007n" + + "etwork\030\023 \001(\t\022\016\n\006subnet\030\024 \001(\t\022?\n\006labels\030\025" + + " \003(\0132/.google.cloud.notebooks.v1.Instanc" + + "e.LabelsEntry\022C\n\010metadata\030\026 \003(\01321.google" + + ".cloud.notebooks.v1.Instance.MetadataEnt" + + "ry\022\021\n\004tags\030 \003(\tB\003\340A\001\022P\n\017upgrade_history" + + "\030\035 \003(\01327.google.cloud.notebooks.v1.Insta" + + "nce.UpgradeHistoryEntry\022B\n\010nic_type\030! \001(" + + "\0162+.google.cloud.notebooks.v1.Instance.N" + + "icTypeB\003\340A\001\022Q\n\024reservation_affinity\030\" \001(" + + "\0132..google.cloud.notebooks.v1.Reservatio" + + "nAffinityB\003\340A\001\0224\n\013create_time\030\027 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\0224\n\013update_t" + + "ime\030\030 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\032j\n\021AcceleratorConfig\022A\n\004type\030\001 \001(\01623." + + "google.cloud.notebooks.v1.Instance.Accel" + + "eratorType\022\022\n\ncore_count\030\002 \001(\003\032\266\002\n\004Disk\022" + + "\023\n\013auto_delete\030\001 \001(\010\022\014\n\004boot\030\002 \001(\010\022\023\n\013de" + + "vice_name\030\003 \001(\t\022\024\n\014disk_size_gb\030\004 \001(\003\022R\n" + + "\021guest_os_features\030\005 \003(\01327.google.cloud." + + "notebooks.v1.Instance.Disk.GuestOsFeatur" + + "e\022\r\n\005index\030\006 \001(\003\022\021\n\tinterface\030\007 \001(\t\022\014\n\004k" + + "ind\030\010 \001(\t\022\020\n\010licenses\030\t \003(\t\022\014\n\004mode\030\n \001(" + + "\t\022\016\n\006source\030\013 \001(\t\022\014\n\004type\030\014 \001(\t\032\036\n\016Guest" + + "OsFeature\022\014\n\004type\030\001 \001(\t\032n\n\026ShieldedInsta" + + "nceConfig\022\032\n\022enable_secure_boot\030\001 \001(\010\022\023\n" + + "\013enable_vtpm\030\002 \001(\010\022#\n\033enable_integrity_m" + + "onitoring\030\003 \001(\010\032\374\003\n\023UpgradeHistoryEntry\022" + + "\020\n\010snapshot\030\001 \001(\t\022\020\n\010vm_image\030\002 \001(\t\022\027\n\017c" + + "ontainer_image\030\003 \001(\t\022\021\n\tframework\030\004 \001(\t\022" + + "\017\n\007version\030\005 \001(\t\022L\n\005state\030\006 \001(\0162=.google" + + ".cloud.notebooks.v1.Instance.UpgradeHist" + + "oryEntry.State\022/\n\013create_time\030\007 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\022\030\n\014target_image\030" + + "\010 \001(\tB\002\030\001\022N\n\006action\030\t \001(\0162>.google.cloud" + + ".notebooks.v1.Instance.UpgradeHistoryEnt" + + "ry.Action\022\026\n\016target_version\030\n \001(\t\"F\n\005Sta" + + "te\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007STARTED\020\001\022\r" + + "\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\";\n\006Action\022\026\n\022A" + + "CTION_UNSPECIFIED\020\000\022\013\n\007UPGRADE\020\001\022\014\n\010ROLL" + + "BACK\020\002\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\235\002\n\017AcceleratorTy" + + "pe\022 \n\034ACCELERATOR_TYPE_UNSPECIFIED\020\000\022\024\n\020" + + "NVIDIA_TESLA_K80\020\001\022\025\n\021NVIDIA_TESLA_P100\020" + + "\002\022\025\n\021NVIDIA_TESLA_V100\020\003\022\023\n\017NVIDIA_TESLA" + + "_P4\020\004\022\023\n\017NVIDIA_TESLA_T4\020\005\022\025\n\021NVIDIA_TES" + + "LA_A100\020\013\022\027\n\023NVIDIA_TESLA_T4_VWS\020\010\022\031\n\025NV" + + "IDIA_TESLA_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\"\244\001\n\005State" + + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010STARTING\020\001\022\020\n" + + "\014PROVISIONING\020\002\022\n\n\006ACTIVE\020\003\022\014\n\010STOPPING\020" + + "\004\022\013\n\007STOPPED\020\005\022\013\n\007DELETED\020\006\022\r\n\tUPGRADING" + + "\020\007\022\020\n\014INITIALIZING\020\010\022\017\n\013REGISTERING\020\t\"S\n" + + "\010DiskType\022\031\n\025DISK_TYPE_UNSPECIFIED\020\000\022\017\n\013" + + "PD_STANDARD\020\001\022\n\n\006PD_SSD\020\002\022\017\n\013PD_BALANCED" + + "\020\003\"E\n\016DiskEncryption\022\037\n\033DISK_ENCRYPTION_" + + "UNSPECIFIED\020\000\022\010\n\004GMEK\020\001\022\010\n\004CMEK\020\002\">\n\007Nic" + + "Type\022\030\n\024UNSPECIFIED_NIC_TYPE\020\000\022\016\n\nVIRTIO" + + "_NET\020\001\022\t\n\005GVNIC\020\002:O\352AL\n!notebooks.google" + + "apis.com/Instance\022\'projects/{project}/in" + + "stances/{instance}B\r\n\013environmentB\313\001\n\035co" + + "m.google.cloud.notebooks.v1B\rInstancePro" + + "toP\001ZBgoogle.golang.org/genproto/googlea" + + "pis/cloud/notebooks/v1;notebooks\252\002\031Googl" + + "e.Cloud.Notebooks.V1\312\002\031Google\\Cloud\\Note" + + "books\\V1\352\002\034Google::Cloud::Notebooks::V1b" + + "\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.notebooks.v1.EnvironmentProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_notebooks_v1_ReservationAffinity_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_ReservationAffinity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ReservationAffinity_descriptor, + new java.lang.String[] { + "ConsumeReservationType", "Key", "Values", + }); + internal_static_google_cloud_notebooks_v1_Instance_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_notebooks_v1_Instance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Instance_descriptor, + new java.lang.String[] { + "Name", + "VmImage", + "ContainerImage", + "PostStartupScript", + "ProxyUri", + "InstanceOwners", + "ServiceAccount", + "ServiceAccountScopes", + "MachineType", + "AcceleratorConfig", + "State", + "InstallGpuDriver", + "CustomGpuDriverPath", + "BootDiskType", + "BootDiskSizeGb", + "DataDiskType", + "DataDiskSizeGb", + "NoRemoveDataDisk", + "DiskEncryption", + "KmsKey", + "Disks", + "ShieldedInstanceConfig", + "NoPublicIp", + "NoProxyAccess", + "Network", + "Subnet", + "Labels", + "Metadata", + "Tags", + "UpgradeHistory", + "NicType", + "ReservationAffinity", + "CreateTime", + "UpdateTime", + "Environment", + }); + internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor = + internal_static_google_cloud_notebooks_v1_Instance_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Instance_AcceleratorConfig_descriptor, + new java.lang.String[] { + "Type", "CoreCount", + }); + internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor = + internal_static_google_cloud_notebooks_v1_Instance_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_notebooks_v1_Instance_Disk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor, + new java.lang.String[] { + "AutoDelete", + "Boot", + "DeviceName", + "DiskSizeGb", + "GuestOsFeatures", + "Index", + "Interface", + "Kind", + "Licenses", + "Mode", + "Source", + "Type", + }); + internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor = + internal_static_google_cloud_notebooks_v1_Instance_Disk_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Instance_Disk_GuestOsFeature_descriptor, + new java.lang.String[] { + "Type", + }); + internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor = + internal_static_google_cloud_notebooks_v1_Instance_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Instance_ShieldedInstanceConfig_descriptor, + new java.lang.String[] { + "EnableSecureBoot", "EnableVtpm", "EnableIntegrityMonitoring", + }); + internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor = + internal_static_google_cloud_notebooks_v1_Instance_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Instance_UpgradeHistoryEntry_descriptor, + new java.lang.String[] { + "Snapshot", + "VmImage", + "ContainerImage", + "Framework", + "Version", + "State", + "CreateTime", + "TargetImage", + "Action", + "TargetVersion", + }); + internal_static_google_cloud_notebooks_v1_Instance_LabelsEntry_descriptor = + internal_static_google_cloud_notebooks_v1_Instance_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_notebooks_v1_Instance_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Instance_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_Instance_MetadataEntry_descriptor = + internal_static_google_cloud_notebooks_v1_Instance_descriptor.getNestedTypes().get(5); + internal_static_google_cloud_notebooks_v1_Instance_MetadataEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Instance_MetadataEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.notebooks.v1.EnvironmentProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableRequest.java new file mode 100644 index 00000000..37e051e5 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableRequest.java @@ -0,0 +1,644 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for checking if a notebook instance is upgradeable.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.IsInstanceUpgradeableRequest} + */ +public final class IsInstanceUpgradeableRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) + IsInstanceUpgradeableRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use IsInstanceUpgradeableRequest.newBuilder() to construct. + private IsInstanceUpgradeableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IsInstanceUpgradeableRequest() { + notebookInstance_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IsInstanceUpgradeableRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IsInstanceUpgradeableRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + notebookInstance_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest.class, + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest.Builder.class); + } + + public static final int NOTEBOOK_INSTANCE_FIELD_NUMBER = 1; + private volatile java.lang.Object notebookInstance_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The notebookInstance. + */ + @java.lang.Override + public java.lang.String getNotebookInstance() { + java.lang.Object ref = notebookInstance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookInstance_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for notebookInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookInstanceBytes() { + java.lang.Object ref = notebookInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNotebookInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, notebookInstance_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNotebookInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, notebookInstance_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest other = + (com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) obj; + + if (!getNotebookInstance().equals(other.getNotebookInstance())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NOTEBOOK_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookInstance().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for checking if a notebook instance is upgradeable.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.IsInstanceUpgradeableRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest.class, + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + notebookInstance_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest build() { + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest buildPartial() { + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest result = + new com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest(this); + result.notebookInstance_ = notebookInstance_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest other) { + if (other == com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest.getDefaultInstance()) + return this; + if (!other.getNotebookInstance().isEmpty()) { + notebookInstance_ = other.notebookInstance_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object notebookInstance_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The notebookInstance. + */ + public java.lang.String getNotebookInstance() { + java.lang.Object ref = notebookInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for notebookInstance. + */ + public com.google.protobuf.ByteString getNotebookInstanceBytes() { + java.lang.Object ref = notebookInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The notebookInstance to set. + * @return This builder for chaining. + */ + public Builder setNotebookInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + notebookInstance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNotebookInstance() { + + notebookInstance_ = getDefaultInstance().getNotebookInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for notebookInstance to set. + * @return This builder for chaining. + */ + public Builder setNotebookInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + notebookInstance_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) + private static final com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest(); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IsInstanceUpgradeableRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IsInstanceUpgradeableRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableRequestOrBuilder.java new file mode 100644 index 00000000..885b96ec --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface IsInstanceUpgradeableRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.IsInstanceUpgradeableRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The notebookInstance. + */ + java.lang.String getNotebookInstance(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for notebookInstance. + */ + com.google.protobuf.ByteString getNotebookInstanceBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableResponse.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableResponse.java new file mode 100644 index 00000000..c0ea5a83 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableResponse.java @@ -0,0 +1,1106 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Response for checking if a notebook instance is upgradeable.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.IsInstanceUpgradeableResponse} + */ +public final class IsInstanceUpgradeableResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) + IsInstanceUpgradeableResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use IsInstanceUpgradeableResponse.newBuilder() to construct. + private IsInstanceUpgradeableResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IsInstanceUpgradeableResponse() { + upgradeVersion_ = ""; + upgradeInfo_ = ""; + upgradeImage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IsInstanceUpgradeableResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IsInstanceUpgradeableResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + upgradeable_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + upgradeVersion_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + upgradeInfo_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + upgradeImage_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse.class, + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse.Builder.class); + } + + public static final int UPGRADEABLE_FIELD_NUMBER = 1; + private boolean upgradeable_; + /** + * + * + *
+   * If an instance is upgradeable.
+   * 
+ * + * bool upgradeable = 1; + * + * @return The upgradeable. + */ + @java.lang.Override + public boolean getUpgradeable() { + return upgradeable_; + } + + public static final int UPGRADE_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object upgradeVersion_; + /** + * + * + *
+   * The version this instance will be upgraded to if calling the upgrade
+   * endpoint. This field will only be populated if field upgradeable is true.
+   * 
+ * + * string upgrade_version = 2; + * + * @return The upgradeVersion. + */ + @java.lang.Override + public java.lang.String getUpgradeVersion() { + java.lang.Object ref = upgradeVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upgradeVersion_ = s; + return s; + } + } + /** + * + * + *
+   * The version this instance will be upgraded to if calling the upgrade
+   * endpoint. This field will only be populated if field upgradeable is true.
+   * 
+ * + * string upgrade_version = 2; + * + * @return The bytes for upgradeVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUpgradeVersionBytes() { + java.lang.Object ref = upgradeVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + upgradeVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPGRADE_INFO_FIELD_NUMBER = 3; + private volatile java.lang.Object upgradeInfo_; + /** + * + * + *
+   * Additional information about upgrade.
+   * 
+ * + * string upgrade_info = 3; + * + * @return The upgradeInfo. + */ + @java.lang.Override + public java.lang.String getUpgradeInfo() { + java.lang.Object ref = upgradeInfo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upgradeInfo_ = s; + return s; + } + } + /** + * + * + *
+   * Additional information about upgrade.
+   * 
+ * + * string upgrade_info = 3; + * + * @return The bytes for upgradeInfo. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUpgradeInfoBytes() { + java.lang.Object ref = upgradeInfo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + upgradeInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPGRADE_IMAGE_FIELD_NUMBER = 4; + private volatile java.lang.Object upgradeImage_; + /** + * + * + *
+   * The new image self link this instance will be upgraded to if calling the
+   * upgrade endpoint. This field will only be populated if field upgradeable
+   * is true.
+   * 
+ * + * string upgrade_image = 4; + * + * @return The upgradeImage. + */ + @java.lang.Override + public java.lang.String getUpgradeImage() { + java.lang.Object ref = upgradeImage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upgradeImage_ = s; + return s; + } + } + /** + * + * + *
+   * The new image self link this instance will be upgraded to if calling the
+   * upgrade endpoint. This field will only be populated if field upgradeable
+   * is true.
+   * 
+ * + * string upgrade_image = 4; + * + * @return The bytes for upgradeImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUpgradeImageBytes() { + java.lang.Object ref = upgradeImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + upgradeImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (upgradeable_ != false) { + output.writeBool(1, upgradeable_); + } + if (!getUpgradeVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, upgradeVersion_); + } + if (!getUpgradeInfoBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, upgradeInfo_); + } + if (!getUpgradeImageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, upgradeImage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (upgradeable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, upgradeable_); + } + if (!getUpgradeVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, upgradeVersion_); + } + if (!getUpgradeInfoBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, upgradeInfo_); + } + if (!getUpgradeImageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, upgradeImage_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse other = + (com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) obj; + + if (getUpgradeable() != other.getUpgradeable()) return false; + if (!getUpgradeVersion().equals(other.getUpgradeVersion())) return false; + if (!getUpgradeInfo().equals(other.getUpgradeInfo())) return false; + if (!getUpgradeImage().equals(other.getUpgradeImage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UPGRADEABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUpgradeable()); + hash = (37 * hash) + UPGRADE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getUpgradeVersion().hashCode(); + hash = (37 * hash) + UPGRADE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUpgradeInfo().hashCode(); + hash = (37 * hash) + UPGRADE_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getUpgradeImage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for checking if a notebook instance is upgradeable.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.IsInstanceUpgradeableResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse.class, + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + upgradeable_ = false; + + upgradeVersion_ = ""; + + upgradeInfo_ = ""; + + upgradeImage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse build() { + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse buildPartial() { + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse result = + new com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse(this); + result.upgradeable_ = upgradeable_; + result.upgradeVersion_ = upgradeVersion_; + result.upgradeInfo_ = upgradeInfo_; + result.upgradeImage_ = upgradeImage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) { + return mergeFrom((com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse other) { + if (other == com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse.getDefaultInstance()) + return this; + if (other.getUpgradeable() != false) { + setUpgradeable(other.getUpgradeable()); + } + if (!other.getUpgradeVersion().isEmpty()) { + upgradeVersion_ = other.upgradeVersion_; + onChanged(); + } + if (!other.getUpgradeInfo().isEmpty()) { + upgradeInfo_ = other.upgradeInfo_; + onChanged(); + } + if (!other.getUpgradeImage().isEmpty()) { + upgradeImage_ = other.upgradeImage_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean upgradeable_; + /** + * + * + *
+     * If an instance is upgradeable.
+     * 
+ * + * bool upgradeable = 1; + * + * @return The upgradeable. + */ + @java.lang.Override + public boolean getUpgradeable() { + return upgradeable_; + } + /** + * + * + *
+     * If an instance is upgradeable.
+     * 
+ * + * bool upgradeable = 1; + * + * @param value The upgradeable to set. + * @return This builder for chaining. + */ + public Builder setUpgradeable(boolean value) { + + upgradeable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If an instance is upgradeable.
+     * 
+ * + * bool upgradeable = 1; + * + * @return This builder for chaining. + */ + public Builder clearUpgradeable() { + + upgradeable_ = false; + onChanged(); + return this; + } + + private java.lang.Object upgradeVersion_ = ""; + /** + * + * + *
+     * The version this instance will be upgraded to if calling the upgrade
+     * endpoint. This field will only be populated if field upgradeable is true.
+     * 
+ * + * string upgrade_version = 2; + * + * @return The upgradeVersion. + */ + public java.lang.String getUpgradeVersion() { + java.lang.Object ref = upgradeVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upgradeVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The version this instance will be upgraded to if calling the upgrade
+     * endpoint. This field will only be populated if field upgradeable is true.
+     * 
+ * + * string upgrade_version = 2; + * + * @return The bytes for upgradeVersion. + */ + public com.google.protobuf.ByteString getUpgradeVersionBytes() { + java.lang.Object ref = upgradeVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + upgradeVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The version this instance will be upgraded to if calling the upgrade
+     * endpoint. This field will only be populated if field upgradeable is true.
+     * 
+ * + * string upgrade_version = 2; + * + * @param value The upgradeVersion to set. + * @return This builder for chaining. + */ + public Builder setUpgradeVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + upgradeVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The version this instance will be upgraded to if calling the upgrade
+     * endpoint. This field will only be populated if field upgradeable is true.
+     * 
+ * + * string upgrade_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearUpgradeVersion() { + + upgradeVersion_ = getDefaultInstance().getUpgradeVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The version this instance will be upgraded to if calling the upgrade
+     * endpoint. This field will only be populated if field upgradeable is true.
+     * 
+ * + * string upgrade_version = 2; + * + * @param value The bytes for upgradeVersion to set. + * @return This builder for chaining. + */ + public Builder setUpgradeVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + upgradeVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object upgradeInfo_ = ""; + /** + * + * + *
+     * Additional information about upgrade.
+     * 
+ * + * string upgrade_info = 3; + * + * @return The upgradeInfo. + */ + public java.lang.String getUpgradeInfo() { + java.lang.Object ref = upgradeInfo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upgradeInfo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Additional information about upgrade.
+     * 
+ * + * string upgrade_info = 3; + * + * @return The bytes for upgradeInfo. + */ + public com.google.protobuf.ByteString getUpgradeInfoBytes() { + java.lang.Object ref = upgradeInfo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + upgradeInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Additional information about upgrade.
+     * 
+ * + * string upgrade_info = 3; + * + * @param value The upgradeInfo to set. + * @return This builder for chaining. + */ + public Builder setUpgradeInfo(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + upgradeInfo_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Additional information about upgrade.
+     * 
+ * + * string upgrade_info = 3; + * + * @return This builder for chaining. + */ + public Builder clearUpgradeInfo() { + + upgradeInfo_ = getDefaultInstance().getUpgradeInfo(); + onChanged(); + return this; + } + /** + * + * + *
+     * Additional information about upgrade.
+     * 
+ * + * string upgrade_info = 3; + * + * @param value The bytes for upgradeInfo to set. + * @return This builder for chaining. + */ + public Builder setUpgradeInfoBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + upgradeInfo_ = value; + onChanged(); + return this; + } + + private java.lang.Object upgradeImage_ = ""; + /** + * + * + *
+     * The new image self link this instance will be upgraded to if calling the
+     * upgrade endpoint. This field will only be populated if field upgradeable
+     * is true.
+     * 
+ * + * string upgrade_image = 4; + * + * @return The upgradeImage. + */ + public java.lang.String getUpgradeImage() { + java.lang.Object ref = upgradeImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + upgradeImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The new image self link this instance will be upgraded to if calling the
+     * upgrade endpoint. This field will only be populated if field upgradeable
+     * is true.
+     * 
+ * + * string upgrade_image = 4; + * + * @return The bytes for upgradeImage. + */ + public com.google.protobuf.ByteString getUpgradeImageBytes() { + java.lang.Object ref = upgradeImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + upgradeImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The new image self link this instance will be upgraded to if calling the
+     * upgrade endpoint. This field will only be populated if field upgradeable
+     * is true.
+     * 
+ * + * string upgrade_image = 4; + * + * @param value The upgradeImage to set. + * @return This builder for chaining. + */ + public Builder setUpgradeImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + upgradeImage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The new image self link this instance will be upgraded to if calling the
+     * upgrade endpoint. This field will only be populated if field upgradeable
+     * is true.
+     * 
+ * + * string upgrade_image = 4; + * + * @return This builder for chaining. + */ + public Builder clearUpgradeImage() { + + upgradeImage_ = getDefaultInstance().getUpgradeImage(); + onChanged(); + return this; + } + /** + * + * + *
+     * The new image self link this instance will be upgraded to if calling the
+     * upgrade endpoint. This field will only be populated if field upgradeable
+     * is true.
+     * 
+ * + * string upgrade_image = 4; + * + * @param value The bytes for upgradeImage to set. + * @return This builder for chaining. + */ + public Builder setUpgradeImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + upgradeImage_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) + private static final com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse(); + } + + public static com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IsInstanceUpgradeableResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IsInstanceUpgradeableResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableResponseOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableResponseOrBuilder.java new file mode 100644 index 00000000..144afe4f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/IsInstanceUpgradeableResponseOrBuilder.java @@ -0,0 +1,119 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface IsInstanceUpgradeableResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.IsInstanceUpgradeableResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If an instance is upgradeable.
+   * 
+ * + * bool upgradeable = 1; + * + * @return The upgradeable. + */ + boolean getUpgradeable(); + + /** + * + * + *
+   * The version this instance will be upgraded to if calling the upgrade
+   * endpoint. This field will only be populated if field upgradeable is true.
+   * 
+ * + * string upgrade_version = 2; + * + * @return The upgradeVersion. + */ + java.lang.String getUpgradeVersion(); + /** + * + * + *
+   * The version this instance will be upgraded to if calling the upgrade
+   * endpoint. This field will only be populated if field upgradeable is true.
+   * 
+ * + * string upgrade_version = 2; + * + * @return The bytes for upgradeVersion. + */ + com.google.protobuf.ByteString getUpgradeVersionBytes(); + + /** + * + * + *
+   * Additional information about upgrade.
+   * 
+ * + * string upgrade_info = 3; + * + * @return The upgradeInfo. + */ + java.lang.String getUpgradeInfo(); + /** + * + * + *
+   * Additional information about upgrade.
+   * 
+ * + * string upgrade_info = 3; + * + * @return The bytes for upgradeInfo. + */ + com.google.protobuf.ByteString getUpgradeInfoBytes(); + + /** + * + * + *
+   * The new image self link this instance will be upgraded to if calling the
+   * upgrade endpoint. This field will only be populated if field upgradeable
+   * is true.
+   * 
+ * + * string upgrade_image = 4; + * + * @return The upgradeImage. + */ + java.lang.String getUpgradeImage(); + /** + * + * + *
+   * The new image self link this instance will be upgraded to if calling the
+   * upgrade endpoint. This field will only be populated if field upgradeable
+   * is true.
+   * 
+ * + * string upgrade_image = 4; + * + * @return The bytes for upgradeImage. + */ + com.google.protobuf.ByteString getUpgradeImageBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsRequest.java new file mode 100644 index 00000000..f25d5db2 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsRequest.java @@ -0,0 +1,913 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for listing environments.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListEnvironmentsRequest} + */ +public final class ListEnvironmentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListEnvironmentsRequest) + ListEnvironmentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsRequest.newBuilder() to construct. + private ListEnvironmentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListEnvironmentsRequest.class, + com.google.cloud.notebooks.v1.ListEnvironmentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format: `projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format: `projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A previous returned page token that can be used to continue listing from
+   * the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A previous returned page token that can be used to continue listing from
+   * the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListEnvironmentsRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListEnvironmentsRequest other = + (com.google.cloud.notebooks.v1.ListEnvironmentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.ListEnvironmentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for listing environments.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListEnvironmentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListEnvironmentsRequest) + com.google.cloud.notebooks.v1.ListEnvironmentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListEnvironmentsRequest.class, + com.google.cloud.notebooks.v1.ListEnvironmentsRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListEnvironmentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListEnvironmentsRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListEnvironmentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListEnvironmentsRequest build() { + com.google.cloud.notebooks.v1.ListEnvironmentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListEnvironmentsRequest buildPartial() { + com.google.cloud.notebooks.v1.ListEnvironmentsRequest result = + new com.google.cloud.notebooks.v1.ListEnvironmentsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListEnvironmentsRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ListEnvironmentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListEnvironmentsRequest other) { + if (other == com.google.cloud.notebooks.v1.ListEnvironmentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListEnvironmentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListEnvironmentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A previous returned page token that can be used to continue listing from
+     * the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing from
+     * the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing from
+     * the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing from
+     * the last result.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing from
+     * the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListEnvironmentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListEnvironmentsRequest) + private static final com.google.cloud.notebooks.v1.ListEnvironmentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListEnvironmentsRequest(); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListEnvironmentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsRequestOrBuilder.java new file mode 100644 index 00000000..f435d603 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsRequestOrBuilder.java @@ -0,0 +1,90 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListEnvironmentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListEnvironmentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: `projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format: `projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A previous returned page token that can be used to continue listing from
+   * the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A previous returned page token that can be used to continue listing from
+   * the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsResponse.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsResponse.java new file mode 100644 index 00000000..1a29f507 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsResponse.java @@ -0,0 +1,1415 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Response for listing environments.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListEnvironmentsResponse} + */ +public final class ListEnvironmentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListEnvironmentsResponse) + ListEnvironmentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsResponse.newBuilder() to construct. + private ListEnvironmentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsResponse() { + environments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + environments_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + environments_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Environment.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListEnvironmentsResponse.class, + com.google.cloud.notebooks.v1.ListEnvironmentsResponse.Builder.class); + } + + public static final int ENVIRONMENTS_FIELD_NUMBER = 1; + private java.util.List environments_; + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + @java.lang.Override + public java.util.List getEnvironmentsList() { + return environments_; + } + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + @java.lang.Override + public java.util.List + getEnvironmentsOrBuilderList() { + return environments_; + } + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + @java.lang.Override + public int getEnvironmentsCount() { + return environments_.size(); + } + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Environment getEnvironments(int index) { + return environments_.get(index); + } + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.EnvironmentOrBuilder getEnvironmentsOrBuilder(int index) { + return environments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A page token that can be used to continue listing from the last result
+   * in the next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token that can be used to continue listing from the last result
+   * in the next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < environments_.size(); i++) { + output.writeMessage(1, environments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < environments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, environments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListEnvironmentsResponse)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListEnvironmentsResponse other = + (com.google.cloud.notebooks.v1.ListEnvironmentsResponse) obj; + + if (!getEnvironmentsList().equals(other.getEnvironmentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEnvironmentsCount() > 0) { + hash = (37 * hash) + ENVIRONMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.ListEnvironmentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for listing environments.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListEnvironmentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListEnvironmentsResponse) + com.google.cloud.notebooks.v1.ListEnvironmentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListEnvironmentsResponse.class, + com.google.cloud.notebooks.v1.ListEnvironmentsResponse.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListEnvironmentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEnvironmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + environmentsBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListEnvironmentsResponse getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListEnvironmentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListEnvironmentsResponse build() { + com.google.cloud.notebooks.v1.ListEnvironmentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListEnvironmentsResponse buildPartial() { + com.google.cloud.notebooks.v1.ListEnvironmentsResponse result = + new com.google.cloud.notebooks.v1.ListEnvironmentsResponse(this); + int from_bitField0_ = bitField0_; + if (environmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.environments_ = environments_; + } else { + result.environments_ = environmentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListEnvironmentsResponse) { + return mergeFrom((com.google.cloud.notebooks.v1.ListEnvironmentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListEnvironmentsResponse other) { + if (other == com.google.cloud.notebooks.v1.ListEnvironmentsResponse.getDefaultInstance()) + return this; + if (environmentsBuilder_ == null) { + if (!other.environments_.isEmpty()) { + if (environments_.isEmpty()) { + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnvironmentsIsMutable(); + environments_.addAll(other.environments_); + } + onChanged(); + } + } else { + if (!other.environments_.isEmpty()) { + if (environmentsBuilder_.isEmpty()) { + environmentsBuilder_.dispose(); + environmentsBuilder_ = null; + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + environmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvironmentsFieldBuilder() + : null; + } else { + environmentsBuilder_.addAllMessages(other.environments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListEnvironmentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListEnvironmentsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List environments_ = + java.util.Collections.emptyList(); + + private void ensureEnvironmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + environments_ = + new java.util.ArrayList(environments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Environment, + com.google.cloud.notebooks.v1.Environment.Builder, + com.google.cloud.notebooks.v1.EnvironmentOrBuilder> + environmentsBuilder_; + + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public java.util.List getEnvironmentsList() { + if (environmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(environments_); + } else { + return environmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public int getEnvironmentsCount() { + if (environmentsBuilder_ == null) { + return environments_.size(); + } else { + return environmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public com.google.cloud.notebooks.v1.Environment getEnvironments(int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder setEnvironments(int index, com.google.cloud.notebooks.v1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.set(index, value); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder setEnvironments( + int index, com.google.cloud.notebooks.v1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.set(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder addEnvironments(com.google.cloud.notebooks.v1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(value); + onChanged(); + } else { + environmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder addEnvironments(int index, com.google.cloud.notebooks.v1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(index, value); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder addEnvironments( + com.google.cloud.notebooks.v1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder addEnvironments( + int index, com.google.cloud.notebooks.v1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder addAllEnvironments( + java.lang.Iterable values) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, environments_); + onChanged(); + } else { + environmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder clearEnvironments() { + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + environmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public Builder removeEnvironments(int index) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.remove(index); + onChanged(); + } else { + environmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public com.google.cloud.notebooks.v1.Environment.Builder getEnvironmentsBuilder(int index) { + return getEnvironmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public com.google.cloud.notebooks.v1.EnvironmentOrBuilder getEnvironmentsOrBuilder(int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public java.util.List + getEnvironmentsOrBuilderList() { + if (environmentsBuilder_ != null) { + return environmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(environments_); + } + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public com.google.cloud.notebooks.v1.Environment.Builder addEnvironmentsBuilder() { + return getEnvironmentsFieldBuilder() + .addBuilder(com.google.cloud.notebooks.v1.Environment.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public com.google.cloud.notebooks.v1.Environment.Builder addEnvironmentsBuilder(int index) { + return getEnvironmentsFieldBuilder() + .addBuilder(index, com.google.cloud.notebooks.v1.Environment.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned environments.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + public java.util.List + getEnvironmentsBuilderList() { + return getEnvironmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Environment, + com.google.cloud.notebooks.v1.Environment.Builder, + com.google.cloud.notebooks.v1.EnvironmentOrBuilder> + getEnvironmentsFieldBuilder() { + if (environmentsBuilder_ == null) { + environmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Environment, + com.google.cloud.notebooks.v1.Environment.Builder, + com.google.cloud.notebooks.v1.EnvironmentOrBuilder>( + environments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + environments_ = null; + } + return environmentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A page token that can be used to continue listing from the last result
+     * in the next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token that can be used to continue listing from the last result
+     * in the next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token that can be used to continue listing from the last result
+     * in the next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token that can be used to continue listing from the last result
+     * in the next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token that can be used to continue listing from the last result
+     * in the next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListEnvironmentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListEnvironmentsResponse) + private static final com.google.cloud.notebooks.v1.ListEnvironmentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListEnvironmentsResponse(); + } + + public static com.google.cloud.notebooks.v1.ListEnvironmentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListEnvironmentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsResponseOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsResponseOrBuilder.java new file mode 100644 index 00000000..e5e37208 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListEnvironmentsResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListEnvironmentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListEnvironmentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + java.util.List getEnvironmentsList(); + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + com.google.cloud.notebooks.v1.Environment getEnvironments(int index); + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + int getEnvironmentsCount(); + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + java.util.List + getEnvironmentsOrBuilderList(); + /** + * + * + *
+   * A list of returned environments.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + com.google.cloud.notebooks.v1.EnvironmentOrBuilder getEnvironmentsOrBuilder(int index); + + /** + * + * + *
+   * A page token that can be used to continue listing from the last result
+   * in the next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A page token that can be used to continue listing from the last result
+   * in the next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsRequest.java new file mode 100644 index 00000000..5f745b02 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsRequest.java @@ -0,0 +1,1305 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for listing scheduled notebook executions.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListExecutionsRequest} + */ +public final class ListExecutionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListExecutionsRequest) + ListExecutionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExecutionsRequest.newBuilder() to construct. + private ListExecutionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExecutionsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExecutionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListExecutionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListExecutionsRequest.class, + com.google.cloud.notebooks.v1.ListExecutionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Filter applied to resulting executions. Currently only supports filtering
+   * executions by a specified schedule_id.
+   * Format: "schedule_id=<Schedule_ID>"
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filter applied to resulting executions. Currently only supports filtering
+   * executions by a specified schedule_id.
+   * Format: "schedule_id=<Schedule_ID>"
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Sort by field.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort by field.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListExecutionsRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListExecutionsRequest other = + (com.google.cloud.notebooks.v1.ListExecutionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ListExecutionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for listing scheduled notebook executions.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListExecutionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListExecutionsRequest) + com.google.cloud.notebooks.v1.ListExecutionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListExecutionsRequest.class, + com.google.cloud.notebooks.v1.ListExecutionsRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListExecutionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListExecutionsRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListExecutionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListExecutionsRequest build() { + com.google.cloud.notebooks.v1.ListExecutionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListExecutionsRequest buildPartial() { + com.google.cloud.notebooks.v1.ListExecutionsRequest result = + new com.google.cloud.notebooks.v1.ListExecutionsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListExecutionsRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ListExecutionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListExecutionsRequest other) { + if (other == com.google.cloud.notebooks.v1.ListExecutionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListExecutionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListExecutionsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter applied to resulting executions. Currently only supports filtering
+     * executions by a specified schedule_id.
+     * Format: "schedule_id=<Schedule_ID>"
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filter applied to resulting executions. Currently only supports filtering
+     * executions by a specified schedule_id.
+     * Format: "schedule_id=<Schedule_ID>"
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filter applied to resulting executions. Currently only supports filtering
+     * executions by a specified schedule_id.
+     * Format: "schedule_id=<Schedule_ID>"
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter applied to resulting executions. Currently only supports filtering
+     * executions by a specified schedule_id.
+     * Format: "schedule_id=<Schedule_ID>"
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter applied to resulting executions. Currently only supports filtering
+     * executions by a specified schedule_id.
+     * Format: "schedule_id=<Schedule_ID>"
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort by field.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort by field.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort by field.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort by field.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort by field.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListExecutionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListExecutionsRequest) + private static final com.google.cloud.notebooks.v1.ListExecutionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListExecutionsRequest(); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExecutionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListExecutionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListExecutionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsRequestOrBuilder.java new file mode 100644 index 00000000..55e1f35d --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListExecutionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListExecutionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter applied to resulting executions. Currently only supports filtering
+   * executions by a specified schedule_id.
+   * Format: "schedule_id=<Schedule_ID>"
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter applied to resulting executions. Currently only supports filtering
+   * executions by a specified schedule_id.
+   * Format: "schedule_id=<Schedule_ID>"
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort by field.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort by field.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsResponse.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsResponse.java new file mode 100644 index 00000000..f77ea302 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsResponse.java @@ -0,0 +1,1437 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Response for listing scheduled notebook executions
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListExecutionsResponse} + */ +public final class ListExecutionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListExecutionsResponse) + ListExecutionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExecutionsResponse.newBuilder() to construct. + private ListExecutionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExecutionsResponse() { + executions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExecutionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListExecutionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + executions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + executions_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Execution.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + executions_ = java.util.Collections.unmodifiableList(executions_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListExecutionsResponse.class, + com.google.cloud.notebooks.v1.ListExecutionsResponse.Builder.class); + } + + public static final int EXECUTIONS_FIELD_NUMBER = 1; + private java.util.List executions_; + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + @java.lang.Override + public java.util.List getExecutionsList() { + return executions_; + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + @java.lang.Override + public java.util.List + getExecutionsOrBuilderList() { + return executions_; + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + @java.lang.Override + public int getExecutionsCount() { + return executions_.size(); + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution getExecutions(int index) { + return executions_.get(index); + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionOrBuilder getExecutionsOrBuilder(int index) { + return executions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Executions IDs that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+   *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Executions IDs that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+   *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Executions IDs that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+   *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Executions IDs that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+   *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < executions_.size(); i++) { + output.writeMessage(1, executions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < executions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, executions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListExecutionsResponse)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListExecutionsResponse other = + (com.google.cloud.notebooks.v1.ListExecutionsResponse) obj; + + if (!getExecutionsList().equals(other.getExecutionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExecutionsCount() > 0) { + hash = (37 * hash) + EXECUTIONS_FIELD_NUMBER; + hash = (53 * hash) + getExecutionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ListExecutionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for listing scheduled notebook executions
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListExecutionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListExecutionsResponse) + com.google.cloud.notebooks.v1.ListExecutionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListExecutionsResponse.class, + com.google.cloud.notebooks.v1.ListExecutionsResponse.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListExecutionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExecutionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (executionsBuilder_ == null) { + executions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + executionsBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListExecutionsResponse getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListExecutionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListExecutionsResponse build() { + com.google.cloud.notebooks.v1.ListExecutionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListExecutionsResponse buildPartial() { + com.google.cloud.notebooks.v1.ListExecutionsResponse result = + new com.google.cloud.notebooks.v1.ListExecutionsResponse(this); + int from_bitField0_ = bitField0_; + if (executionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + executions_ = java.util.Collections.unmodifiableList(executions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.executions_ = executions_; + } else { + result.executions_ = executionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListExecutionsResponse) { + return mergeFrom((com.google.cloud.notebooks.v1.ListExecutionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListExecutionsResponse other) { + if (other == com.google.cloud.notebooks.v1.ListExecutionsResponse.getDefaultInstance()) + return this; + if (executionsBuilder_ == null) { + if (!other.executions_.isEmpty()) { + if (executions_.isEmpty()) { + executions_ = other.executions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExecutionsIsMutable(); + executions_.addAll(other.executions_); + } + onChanged(); + } + } else { + if (!other.executions_.isEmpty()) { + if (executionsBuilder_.isEmpty()) { + executionsBuilder_.dispose(); + executionsBuilder_ = null; + executions_ = other.executions_; + bitField0_ = (bitField0_ & ~0x00000001); + executionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExecutionsFieldBuilder() + : null; + } else { + executionsBuilder_.addAllMessages(other.executions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListExecutionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListExecutionsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List executions_ = + java.util.Collections.emptyList(); + + private void ensureExecutionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + executions_ = new java.util.ArrayList(executions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder> + executionsBuilder_; + + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public java.util.List getExecutionsList() { + if (executionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(executions_); + } else { + return executionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public int getExecutionsCount() { + if (executionsBuilder_ == null) { + return executions_.size(); + } else { + return executionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public com.google.cloud.notebooks.v1.Execution getExecutions(int index) { + if (executionsBuilder_ == null) { + return executions_.get(index); + } else { + return executionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder setExecutions(int index, com.google.cloud.notebooks.v1.Execution value) { + if (executionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExecutionsIsMutable(); + executions_.set(index, value); + onChanged(); + } else { + executionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder setExecutions( + int index, com.google.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (executionsBuilder_ == null) { + ensureExecutionsIsMutable(); + executions_.set(index, builderForValue.build()); + onChanged(); + } else { + executionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder addExecutions(com.google.cloud.notebooks.v1.Execution value) { + if (executionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExecutionsIsMutable(); + executions_.add(value); + onChanged(); + } else { + executionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder addExecutions(int index, com.google.cloud.notebooks.v1.Execution value) { + if (executionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExecutionsIsMutable(); + executions_.add(index, value); + onChanged(); + } else { + executionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder addExecutions(com.google.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (executionsBuilder_ == null) { + ensureExecutionsIsMutable(); + executions_.add(builderForValue.build()); + onChanged(); + } else { + executionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder addExecutions( + int index, com.google.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (executionsBuilder_ == null) { + ensureExecutionsIsMutable(); + executions_.add(index, builderForValue.build()); + onChanged(); + } else { + executionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder addAllExecutions( + java.lang.Iterable values) { + if (executionsBuilder_ == null) { + ensureExecutionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, executions_); + onChanged(); + } else { + executionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder clearExecutions() { + if (executionsBuilder_ == null) { + executions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + executionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public Builder removeExecutions(int index) { + if (executionsBuilder_ == null) { + ensureExecutionsIsMutable(); + executions_.remove(index); + onChanged(); + } else { + executionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public com.google.cloud.notebooks.v1.Execution.Builder getExecutionsBuilder(int index) { + return getExecutionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public com.google.cloud.notebooks.v1.ExecutionOrBuilder getExecutionsOrBuilder(int index) { + if (executionsBuilder_ == null) { + return executions_.get(index); + } else { + return executionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public java.util.List + getExecutionsOrBuilderList() { + if (executionsBuilder_ != null) { + return executionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(executions_); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public com.google.cloud.notebooks.v1.Execution.Builder addExecutionsBuilder() { + return getExecutionsFieldBuilder() + .addBuilder(com.google.cloud.notebooks.v1.Execution.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public com.google.cloud.notebooks.v1.Execution.Builder addExecutionsBuilder(int index) { + return getExecutionsFieldBuilder() + .addBuilder(index, com.google.cloud.notebooks.v1.Execution.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + public java.util.List + getExecutionsBuilderList() { + return getExecutionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder> + getExecutionsFieldBuilder() { + if (executionsBuilder_ == null) { + executionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder>( + executions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + executions_ = null; + } + return executionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Executions IDs that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+     *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListExecutionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListExecutionsResponse) + private static final com.google.cloud.notebooks.v1.ListExecutionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListExecutionsResponse(); + } + + public static com.google.cloud.notebooks.v1.ListExecutionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExecutionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListExecutionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListExecutionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsResponseOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsResponseOrBuilder.java new file mode 100644 index 00000000..6a69cd6f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListExecutionsResponseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListExecutionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListExecutionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + java.util.List getExecutionsList(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + com.google.cloud.notebooks.v1.Execution getExecutions(int index); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + int getExecutionsCount(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + java.util.List + getExecutionsOrBuilderList(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + com.google.cloud.notebooks.v1.ExecutionOrBuilder getExecutionsOrBuilder(int index); + + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Executions IDs that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+   *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Executions IDs that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+   *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Executions IDs that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+   *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Executions IDs that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/executions/imagenet_test1',
+   *  'projects/{project_id}/location/{location}/executions/classifier_train1'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesRequest.java new file mode 100644 index 00000000..0392006c --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesRequest.java @@ -0,0 +1,919 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for listing notebook instances.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListInstancesRequest} + */ +public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListInstancesRequest) + ListInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesRequest.newBuilder() to construct. + private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstancesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListInstancesRequest.class, + com.google.cloud.notebooks.v1.ListInstancesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListInstancesRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListInstancesRequest other = + (com.google.cloud.notebooks.v1.ListInstancesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ListInstancesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for listing notebook instances.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListInstancesRequest) + com.google.cloud.notebooks.v1.ListInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListInstancesRequest.class, + com.google.cloud.notebooks.v1.ListInstancesRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListInstancesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListInstancesRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListInstancesRequest build() { + com.google.cloud.notebooks.v1.ListInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListInstancesRequest buildPartial() { + com.google.cloud.notebooks.v1.ListInstancesRequest result = + new com.google.cloud.notebooks.v1.ListInstancesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListInstancesRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ListInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListInstancesRequest other) { + if (other == com.google.cloud.notebooks.v1.ListInstancesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListInstancesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListInstancesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListInstancesRequest) + private static final com.google.cloud.notebooks.v1.ListInstancesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListInstancesRequest(); + } + + public static com.google.cloud.notebooks.v1.ListInstancesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstancesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListInstancesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesRequestOrBuilder.java new file mode 100644 index 00000000..793f3af7 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesResponse.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesResponse.java new file mode 100644 index 00000000..a725b897 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesResponse.java @@ -0,0 +1,1437 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Response for listing notebook instances.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListInstancesResponse} + */ +public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListInstancesResponse) + ListInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesResponse.newBuilder() to construct. + private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesResponse() { + instances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstancesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instances_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Instance.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListInstancesResponse.class, + com.google.cloud.notebooks.v1.ListInstancesResponse.Builder.class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + private java.util.List instances_; + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List + getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1-a', 'us-central1-b'].
+   * A ListInstancesResponse will only contain either instances or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1-a', 'us-central1-b'].
+   * A ListInstancesResponse will only contain either instances or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1-a', 'us-central1-b'].
+   * A ListInstancesResponse will only contain either instances or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1-a', 'us-central1-b'].
+   * A ListInstancesResponse will only contain either instances or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(1, instances_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListInstancesResponse)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListInstancesResponse other = + (com.google.cloud.notebooks.v1.ListInstancesResponse) obj; + + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ListInstancesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for listing notebook instances.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListInstancesResponse) + com.google.cloud.notebooks.v1.ListInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListInstancesResponse.class, + com.google.cloud.notebooks.v1.ListInstancesResponse.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListInstancesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + instancesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListInstancesResponse getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListInstancesResponse build() { + com.google.cloud.notebooks.v1.ListInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListInstancesResponse buildPartial() { + com.google.cloud.notebooks.v1.ListInstancesResponse result = + new com.google.cloud.notebooks.v1.ListInstancesResponse(this); + int from_bitField0_ = bitField0_; + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListInstancesResponse) { + return mergeFrom((com.google.cloud.notebooks.v1.ListInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListInstancesResponse other) { + if (other == com.google.cloud.notebooks.v1.ListInstancesResponse.getDefaultInstance()) + return this; + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListInstancesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListInstancesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance, + com.google.cloud.notebooks.v1.Instance.Builder, + com.google.cloud.notebooks.v1.InstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public com.google.cloud.notebooks.v1.Instance getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder setInstances(int index, com.google.cloud.notebooks.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder setInstances( + int index, com.google.cloud.notebooks.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.notebooks.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder addInstances(int index, com.google.cloud.notebooks.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.notebooks.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder addInstances( + int index, com.google.cloud.notebooks.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder addAllInstances( + java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public com.google.cloud.notebooks.v1.Instance.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public com.google.cloud.notebooks.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public com.google.cloud.notebooks.v1.Instance.Builder addInstancesBuilder() { + return getInstancesFieldBuilder() + .addBuilder(com.google.cloud.notebooks.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public com.google.cloud.notebooks.v1.Instance.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.cloud.notebooks.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + public java.util.List + getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance, + com.google.cloud.notebooks.v1.Instance.Builder, + com.google.cloud.notebooks.v1.InstanceOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance, + com.google.cloud.notebooks.v1.Instance.Builder, + com.google.cloud.notebooks.v1.InstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1-a', 'us-central1-b'].
+     * A ListInstancesResponse will only contain either instances or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListInstancesResponse) + private static final com.google.cloud.notebooks.v1.ListInstancesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListInstancesResponse(); + } + + public static com.google.cloud.notebooks.v1.ListInstancesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstancesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListInstancesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesResponseOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesResponseOrBuilder.java new file mode 100644 index 00000000..c0aa1403 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListInstancesResponseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListInstancesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + com.google.cloud.notebooks.v1.Instance getInstances(int index); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + int getInstancesCount(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + java.util.List + getInstancesOrBuilderList(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + com.google.cloud.notebooks.v1.InstanceOrBuilder getInstancesOrBuilder(int index); + + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1-a', 'us-central1-b'].
+   * A ListInstancesResponse will only contain either instances or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1-a', 'us-central1-b'].
+   * A ListInstancesResponse will only contain either instances or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1-a', 'us-central1-b'].
+   * A ListInstancesResponse will only contain either instances or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1-a', 'us-central1-b'].
+   * A ListInstancesResponse will only contain either instances or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesRequest.java new file mode 100644 index 00000000..c8f97b59 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesRequest.java @@ -0,0 +1,933 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for listing Managed Notebook Runtimes.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListRuntimesRequest} + */ +public final class ListRuntimesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListRuntimesRequest) + ListRuntimesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRuntimesRequest.newBuilder() to construct. + private ListRuntimesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRuntimesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRuntimesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListRuntimesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListRuntimesRequest.class, + com.google.cloud.notebooks.v1.ListRuntimesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListRuntimesRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListRuntimesRequest other = + (com.google.cloud.notebooks.v1.ListRuntimesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ListRuntimesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for listing Managed Notebook Runtimes.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListRuntimesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListRuntimesRequest) + com.google.cloud.notebooks.v1.ListRuntimesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListRuntimesRequest.class, + com.google.cloud.notebooks.v1.ListRuntimesRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListRuntimesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListRuntimesRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListRuntimesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListRuntimesRequest build() { + com.google.cloud.notebooks.v1.ListRuntimesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListRuntimesRequest buildPartial() { + com.google.cloud.notebooks.v1.ListRuntimesRequest result = + new com.google.cloud.notebooks.v1.ListRuntimesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListRuntimesRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ListRuntimesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListRuntimesRequest other) { + if (other == com.google.cloud.notebooks.v1.ListRuntimesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListRuntimesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListRuntimesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListRuntimesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListRuntimesRequest) + private static final com.google.cloud.notebooks.v1.ListRuntimesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListRuntimesRequest(); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRuntimesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListRuntimesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListRuntimesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesRequestOrBuilder.java new file mode 100644 index 00000000..f5628a85 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListRuntimesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListRuntimesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesResponse.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesResponse.java new file mode 100644 index 00000000..0705de84 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesResponse.java @@ -0,0 +1,1436 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Response for listing Managed Notebook Runtimes.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListRuntimesResponse} + */ +public final class ListRuntimesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListRuntimesResponse) + ListRuntimesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListRuntimesResponse.newBuilder() to construct. + private ListRuntimesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListRuntimesResponse() { + runtimes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListRuntimesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListRuntimesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + runtimes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + runtimes_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Runtime.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + runtimes_ = java.util.Collections.unmodifiableList(runtimes_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListRuntimesResponse.class, + com.google.cloud.notebooks.v1.ListRuntimesResponse.Builder.class); + } + + public static final int RUNTIMES_FIELD_NUMBER = 1; + private java.util.List runtimes_; + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + @java.lang.Override + public java.util.List getRuntimesList() { + return runtimes_; + } + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + @java.lang.Override + public java.util.List + getRuntimesOrBuilderList() { + return runtimes_; + } + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + @java.lang.Override + public int getRuntimesCount() { + return runtimes_.size(); + } + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime getRuntimes(int index) { + return runtimes_.get(index); + } + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeOrBuilder getRuntimesOrBuilder(int index) { + return runtimes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1', 'us-central1'].
+   * A ListRuntimesResponse will only contain either runtimes or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1', 'us-central1'].
+   * A ListRuntimesResponse will only contain either runtimes or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1', 'us-central1'].
+   * A ListRuntimesResponse will only contain either runtimes or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1', 'us-central1'].
+   * A ListRuntimesResponse will only contain either runtimes or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < runtimes_.size(); i++) { + output.writeMessage(1, runtimes_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < runtimes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, runtimes_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListRuntimesResponse)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListRuntimesResponse other = + (com.google.cloud.notebooks.v1.ListRuntimesResponse) obj; + + if (!getRuntimesList().equals(other.getRuntimesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRuntimesCount() > 0) { + hash = (37 * hash) + RUNTIMES_FIELD_NUMBER; + hash = (53 * hash) + getRuntimesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ListRuntimesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for listing Managed Notebook Runtimes.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListRuntimesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListRuntimesResponse) + com.google.cloud.notebooks.v1.ListRuntimesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListRuntimesResponse.class, + com.google.cloud.notebooks.v1.ListRuntimesResponse.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListRuntimesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRuntimesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (runtimesBuilder_ == null) { + runtimes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + runtimesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListRuntimesResponse getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListRuntimesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListRuntimesResponse build() { + com.google.cloud.notebooks.v1.ListRuntimesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListRuntimesResponse buildPartial() { + com.google.cloud.notebooks.v1.ListRuntimesResponse result = + new com.google.cloud.notebooks.v1.ListRuntimesResponse(this); + int from_bitField0_ = bitField0_; + if (runtimesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + runtimes_ = java.util.Collections.unmodifiableList(runtimes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.runtimes_ = runtimes_; + } else { + result.runtimes_ = runtimesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListRuntimesResponse) { + return mergeFrom((com.google.cloud.notebooks.v1.ListRuntimesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListRuntimesResponse other) { + if (other == com.google.cloud.notebooks.v1.ListRuntimesResponse.getDefaultInstance()) + return this; + if (runtimesBuilder_ == null) { + if (!other.runtimes_.isEmpty()) { + if (runtimes_.isEmpty()) { + runtimes_ = other.runtimes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRuntimesIsMutable(); + runtimes_.addAll(other.runtimes_); + } + onChanged(); + } + } else { + if (!other.runtimes_.isEmpty()) { + if (runtimesBuilder_.isEmpty()) { + runtimesBuilder_.dispose(); + runtimesBuilder_ = null; + runtimes_ = other.runtimes_; + bitField0_ = (bitField0_ & ~0x00000001); + runtimesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRuntimesFieldBuilder() + : null; + } else { + runtimesBuilder_.addAllMessages(other.runtimes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListRuntimesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListRuntimesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List runtimes_ = + java.util.Collections.emptyList(); + + private void ensureRuntimesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + runtimes_ = new java.util.ArrayList(runtimes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Runtime, + com.google.cloud.notebooks.v1.Runtime.Builder, + com.google.cloud.notebooks.v1.RuntimeOrBuilder> + runtimesBuilder_; + + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public java.util.List getRuntimesList() { + if (runtimesBuilder_ == null) { + return java.util.Collections.unmodifiableList(runtimes_); + } else { + return runtimesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public int getRuntimesCount() { + if (runtimesBuilder_ == null) { + return runtimes_.size(); + } else { + return runtimesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public com.google.cloud.notebooks.v1.Runtime getRuntimes(int index) { + if (runtimesBuilder_ == null) { + return runtimes_.get(index); + } else { + return runtimesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder setRuntimes(int index, com.google.cloud.notebooks.v1.Runtime value) { + if (runtimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimesIsMutable(); + runtimes_.set(index, value); + onChanged(); + } else { + runtimesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder setRuntimes( + int index, com.google.cloud.notebooks.v1.Runtime.Builder builderForValue) { + if (runtimesBuilder_ == null) { + ensureRuntimesIsMutable(); + runtimes_.set(index, builderForValue.build()); + onChanged(); + } else { + runtimesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder addRuntimes(com.google.cloud.notebooks.v1.Runtime value) { + if (runtimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimesIsMutable(); + runtimes_.add(value); + onChanged(); + } else { + runtimesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder addRuntimes(int index, com.google.cloud.notebooks.v1.Runtime value) { + if (runtimesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimesIsMutable(); + runtimes_.add(index, value); + onChanged(); + } else { + runtimesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder addRuntimes(com.google.cloud.notebooks.v1.Runtime.Builder builderForValue) { + if (runtimesBuilder_ == null) { + ensureRuntimesIsMutable(); + runtimes_.add(builderForValue.build()); + onChanged(); + } else { + runtimesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder addRuntimes( + int index, com.google.cloud.notebooks.v1.Runtime.Builder builderForValue) { + if (runtimesBuilder_ == null) { + ensureRuntimesIsMutable(); + runtimes_.add(index, builderForValue.build()); + onChanged(); + } else { + runtimesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder addAllRuntimes( + java.lang.Iterable values) { + if (runtimesBuilder_ == null) { + ensureRuntimesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, runtimes_); + onChanged(); + } else { + runtimesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder clearRuntimes() { + if (runtimesBuilder_ == null) { + runtimes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + runtimesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public Builder removeRuntimes(int index) { + if (runtimesBuilder_ == null) { + ensureRuntimesIsMutable(); + runtimes_.remove(index); + onChanged(); + } else { + runtimesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public com.google.cloud.notebooks.v1.Runtime.Builder getRuntimesBuilder(int index) { + return getRuntimesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public com.google.cloud.notebooks.v1.RuntimeOrBuilder getRuntimesOrBuilder(int index) { + if (runtimesBuilder_ == null) { + return runtimes_.get(index); + } else { + return runtimesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public java.util.List + getRuntimesOrBuilderList() { + if (runtimesBuilder_ != null) { + return runtimesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(runtimes_); + } + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public com.google.cloud.notebooks.v1.Runtime.Builder addRuntimesBuilder() { + return getRuntimesFieldBuilder() + .addBuilder(com.google.cloud.notebooks.v1.Runtime.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public com.google.cloud.notebooks.v1.Runtime.Builder addRuntimesBuilder(int index) { + return getRuntimesFieldBuilder() + .addBuilder(index, com.google.cloud.notebooks.v1.Runtime.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned Runtimes.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + public java.util.List getRuntimesBuilderList() { + return getRuntimesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Runtime, + com.google.cloud.notebooks.v1.Runtime.Builder, + com.google.cloud.notebooks.v1.RuntimeOrBuilder> + getRuntimesFieldBuilder() { + if (runtimesBuilder_ == null) { + runtimesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Runtime, + com.google.cloud.notebooks.v1.Runtime.Builder, + com.google.cloud.notebooks.v1.RuntimeOrBuilder>( + runtimes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + runtimes_ = null; + } + return runtimesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached. For example,
+     * ['us-west1', 'us-central1'].
+     * A ListRuntimesResponse will only contain either runtimes or unreachables,
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListRuntimesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListRuntimesResponse) + private static final com.google.cloud.notebooks.v1.ListRuntimesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListRuntimesResponse(); + } + + public static com.google.cloud.notebooks.v1.ListRuntimesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRuntimesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListRuntimesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListRuntimesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesResponseOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesResponseOrBuilder.java new file mode 100644 index 00000000..033190ea --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListRuntimesResponseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListRuntimesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListRuntimesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + java.util.List getRuntimesList(); + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + com.google.cloud.notebooks.v1.Runtime getRuntimes(int index); + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + int getRuntimesCount(); + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + java.util.List + getRuntimesOrBuilderList(); + /** + * + * + *
+   * A list of returned Runtimes.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + com.google.cloud.notebooks.v1.RuntimeOrBuilder getRuntimesOrBuilder(int index); + + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1', 'us-central1'].
+   * A ListRuntimesResponse will only contain either runtimes or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1', 'us-central1'].
+   * A ListRuntimesResponse will only contain either runtimes or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1', 'us-central1'].
+   * A ListRuntimesResponse will only contain either runtimes or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached. For example,
+   * ['us-west1', 'us-central1'].
+   * A ListRuntimesResponse will only contain either runtimes or unreachables,
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesRequest.java new file mode 100644 index 00000000..4f139291 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesRequest.java @@ -0,0 +1,1291 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for listing scheduled notebook job.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListSchedulesRequest} + */ +public final class ListSchedulesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListSchedulesRequest) + ListSchedulesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSchedulesRequest.newBuilder() to construct. + private ListSchedulesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSchedulesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSchedulesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListSchedulesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListSchedulesRequest.class, + com.google.cloud.notebooks.v1.ListSchedulesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Filter applied to resulting schedules.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filter applied to resulting schedules.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Field to order results by.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Field to order results by.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListSchedulesRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListSchedulesRequest other = + (com.google.cloud.notebooks.v1.ListSchedulesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ListSchedulesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for listing scheduled notebook job.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListSchedulesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListSchedulesRequest) + com.google.cloud.notebooks.v1.ListSchedulesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListSchedulesRequest.class, + com.google.cloud.notebooks.v1.ListSchedulesRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListSchedulesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListSchedulesRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListSchedulesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListSchedulesRequest build() { + com.google.cloud.notebooks.v1.ListSchedulesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListSchedulesRequest buildPartial() { + com.google.cloud.notebooks.v1.ListSchedulesRequest result = + new com.google.cloud.notebooks.v1.ListSchedulesRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListSchedulesRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ListSchedulesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListSchedulesRequest other) { + if (other == com.google.cloud.notebooks.v1.ListSchedulesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListSchedulesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListSchedulesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum return size of the list call.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A previous returned page token that can be used to continue listing
+     * from the last result.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter applied to resulting schedules.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filter applied to resulting schedules.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filter applied to resulting schedules.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter applied to resulting schedules.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter applied to resulting schedules.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to order results by.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Field to order results by.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Field to order results by.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to order results by.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to order results by.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListSchedulesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListSchedulesRequest) + private static final com.google.cloud.notebooks.v1.ListSchedulesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListSchedulesRequest(); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSchedulesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListSchedulesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListSchedulesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesRequestOrBuilder.java new file mode 100644 index 00000000..d3ddb4dc --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListSchedulesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListSchedulesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum return size of the list call.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A previous returned page token that can be used to continue listing
+   * from the last result.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter applied to resulting schedules.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter applied to resulting schedules.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to order results by.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to order results by.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesResponse.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesResponse.java new file mode 100644 index 00000000..d37756ca --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesResponse.java @@ -0,0 +1,1437 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Response for listing scheduled notebook job.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListSchedulesResponse} + */ +public final class ListSchedulesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ListSchedulesResponse) + ListSchedulesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSchedulesResponse.newBuilder() to construct. + private ListSchedulesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSchedulesResponse() { + schedules_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSchedulesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListSchedulesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + schedules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + schedules_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Schedule.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + unreachable_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + schedules_ = java.util.Collections.unmodifiableList(schedules_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListSchedulesResponse.class, + com.google.cloud.notebooks.v1.ListSchedulesResponse.Builder.class); + } + + public static final int SCHEDULES_FIELD_NUMBER = 1; + private java.util.List schedules_; + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + @java.lang.Override + public java.util.List getSchedulesList() { + return schedules_; + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + @java.lang.Override + public java.util.List + getSchedulesOrBuilderList() { + return schedules_; + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + @java.lang.Override + public int getSchedulesCount() { + return schedules_.size(); + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Schedule getSchedules(int index) { + return schedules_.get(index); + } + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ScheduleOrBuilder getSchedulesOrBuilder(int index) { + return schedules_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Schedules that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+   *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Schedules that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+   *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Schedules that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+   *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Schedules that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+   *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < schedules_.size(); i++) { + output.writeMessage(1, schedules_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < schedules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, schedules_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ListSchedulesResponse)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ListSchedulesResponse other = + (com.google.cloud.notebooks.v1.ListSchedulesResponse) obj; + + if (!getSchedulesList().equals(other.getSchedulesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSchedulesCount() > 0) { + hash = (37 * hash) + SCHEDULES_FIELD_NUMBER; + hash = (53 * hash) + getSchedulesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ListSchedulesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for listing scheduled notebook job.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ListSchedulesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ListSchedulesResponse) + com.google.cloud.notebooks.v1.ListSchedulesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ListSchedulesResponse.class, + com.google.cloud.notebooks.v1.ListSchedulesResponse.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ListSchedulesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSchedulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (schedulesBuilder_ == null) { + schedules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + schedulesBuilder_.clear(); + } + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListSchedulesResponse getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ListSchedulesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListSchedulesResponse build() { + com.google.cloud.notebooks.v1.ListSchedulesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListSchedulesResponse buildPartial() { + com.google.cloud.notebooks.v1.ListSchedulesResponse result = + new com.google.cloud.notebooks.v1.ListSchedulesResponse(this); + int from_bitField0_ = bitField0_; + if (schedulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + schedules_ = java.util.Collections.unmodifiableList(schedules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.schedules_ = schedules_; + } else { + result.schedules_ = schedulesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ListSchedulesResponse) { + return mergeFrom((com.google.cloud.notebooks.v1.ListSchedulesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ListSchedulesResponse other) { + if (other == com.google.cloud.notebooks.v1.ListSchedulesResponse.getDefaultInstance()) + return this; + if (schedulesBuilder_ == null) { + if (!other.schedules_.isEmpty()) { + if (schedules_.isEmpty()) { + schedules_ = other.schedules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSchedulesIsMutable(); + schedules_.addAll(other.schedules_); + } + onChanged(); + } + } else { + if (!other.schedules_.isEmpty()) { + if (schedulesBuilder_.isEmpty()) { + schedulesBuilder_.dispose(); + schedulesBuilder_ = null; + schedules_ = other.schedules_; + bitField0_ = (bitField0_ & ~0x00000001); + schedulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSchedulesFieldBuilder() + : null; + } else { + schedulesBuilder_.addAllMessages(other.schedules_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ListSchedulesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ListSchedulesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List schedules_ = + java.util.Collections.emptyList(); + + private void ensureSchedulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + schedules_ = new java.util.ArrayList(schedules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Schedule, + com.google.cloud.notebooks.v1.Schedule.Builder, + com.google.cloud.notebooks.v1.ScheduleOrBuilder> + schedulesBuilder_; + + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public java.util.List getSchedulesList() { + if (schedulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(schedules_); + } else { + return schedulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public int getSchedulesCount() { + if (schedulesBuilder_ == null) { + return schedules_.size(); + } else { + return schedulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public com.google.cloud.notebooks.v1.Schedule getSchedules(int index) { + if (schedulesBuilder_ == null) { + return schedules_.get(index); + } else { + return schedulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder setSchedules(int index, com.google.cloud.notebooks.v1.Schedule value) { + if (schedulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchedulesIsMutable(); + schedules_.set(index, value); + onChanged(); + } else { + schedulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder setSchedules( + int index, com.google.cloud.notebooks.v1.Schedule.Builder builderForValue) { + if (schedulesBuilder_ == null) { + ensureSchedulesIsMutable(); + schedules_.set(index, builderForValue.build()); + onChanged(); + } else { + schedulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder addSchedules(com.google.cloud.notebooks.v1.Schedule value) { + if (schedulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchedulesIsMutable(); + schedules_.add(value); + onChanged(); + } else { + schedulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder addSchedules(int index, com.google.cloud.notebooks.v1.Schedule value) { + if (schedulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchedulesIsMutable(); + schedules_.add(index, value); + onChanged(); + } else { + schedulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder addSchedules(com.google.cloud.notebooks.v1.Schedule.Builder builderForValue) { + if (schedulesBuilder_ == null) { + ensureSchedulesIsMutable(); + schedules_.add(builderForValue.build()); + onChanged(); + } else { + schedulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder addSchedules( + int index, com.google.cloud.notebooks.v1.Schedule.Builder builderForValue) { + if (schedulesBuilder_ == null) { + ensureSchedulesIsMutable(); + schedules_.add(index, builderForValue.build()); + onChanged(); + } else { + schedulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder addAllSchedules( + java.lang.Iterable values) { + if (schedulesBuilder_ == null) { + ensureSchedulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, schedules_); + onChanged(); + } else { + schedulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder clearSchedules() { + if (schedulesBuilder_ == null) { + schedules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + schedulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public Builder removeSchedules(int index) { + if (schedulesBuilder_ == null) { + ensureSchedulesIsMutable(); + schedules_.remove(index); + onChanged(); + } else { + schedulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public com.google.cloud.notebooks.v1.Schedule.Builder getSchedulesBuilder(int index) { + return getSchedulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public com.google.cloud.notebooks.v1.ScheduleOrBuilder getSchedulesOrBuilder(int index) { + if (schedulesBuilder_ == null) { + return schedules_.get(index); + } else { + return schedulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public java.util.List + getSchedulesOrBuilderList() { + if (schedulesBuilder_ != null) { + return schedulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(schedules_); + } + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public com.google.cloud.notebooks.v1.Schedule.Builder addSchedulesBuilder() { + return getSchedulesFieldBuilder() + .addBuilder(com.google.cloud.notebooks.v1.Schedule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public com.google.cloud.notebooks.v1.Schedule.Builder addSchedulesBuilder(int index) { + return getSchedulesFieldBuilder() + .addBuilder(index, com.google.cloud.notebooks.v1.Schedule.getDefaultInstance()); + } + /** + * + * + *
+     * A list of returned instances.
+     * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + public java.util.List + getSchedulesBuilderList() { + return getSchedulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Schedule, + com.google.cloud.notebooks.v1.Schedule.Builder, + com.google.cloud.notebooks.v1.ScheduleOrBuilder> + getSchedulesFieldBuilder() { + if (schedulesBuilder_ == null) { + schedulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Schedule, + com.google.cloud.notebooks.v1.Schedule.Builder, + com.google.cloud.notebooks.v1.ScheduleOrBuilder>( + schedules_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + schedules_ = null; + } + return schedulesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Page token that can be used to continue listing from the last result in the
+     * next list call.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Schedules that could not be reached. For example,
+     * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+     *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ListSchedulesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ListSchedulesResponse) + private static final com.google.cloud.notebooks.v1.ListSchedulesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ListSchedulesResponse(); + } + + public static com.google.cloud.notebooks.v1.ListSchedulesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSchedulesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListSchedulesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ListSchedulesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesResponseOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesResponseOrBuilder.java new file mode 100644 index 00000000..abe89074 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ListSchedulesResponseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ListSchedulesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ListSchedulesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + java.util.List getSchedulesList(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + com.google.cloud.notebooks.v1.Schedule getSchedules(int index); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + int getSchedulesCount(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + java.util.List + getSchedulesOrBuilderList(); + /** + * + * + *
+   * A list of returned instances.
+   * 
+ * + * repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + com.google.cloud.notebooks.v1.ScheduleOrBuilder getSchedulesOrBuilder(int index); + + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Page token that can be used to continue listing from the last result in the
+   * next list call.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Schedules that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+   *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Schedules that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+   *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Schedules that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+   *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Schedules that could not be reached. For example,
+   * ['projects/{project_id}/location/{location}/schedules/monthly_digest',
+   *  'projects/{project_id}/location/{location}/schedules/weekly_sentiment'].
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDisk.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDisk.java new file mode 100644 index 00000000..a2fc4cb7 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDisk.java @@ -0,0 +1,3972 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * An Local attached disk resource.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.LocalDisk} + */ +public final class LocalDisk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.LocalDisk) + LocalDiskOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocalDisk.newBuilder() to construct. + private LocalDisk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocalDisk() { + deviceName_ = ""; + guestOsFeatures_ = java.util.Collections.emptyList(); + interface_ = ""; + kind_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + mode_ = ""; + source_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocalDisk(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LocalDisk( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + autoDelete_ = input.readBool(); + break; + } + case 16: + { + boot_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + deviceName_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + guestOsFeatures_ = + new java.util.ArrayList< + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature>(); + mutable_bitField0_ |= 0x00000001; + } + guestOsFeatures_.add( + input.readMessage( + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.parser(), + extensionRegistry)); + break; + } + case 40: + { + index_ = input.readInt32(); + break; + } + case 50: + { + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder subBuilder = null; + if (initializeParams_ != null) { + subBuilder = initializeParams_.toBuilder(); + } + initializeParams_ = + input.readMessage( + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(initializeParams_); + initializeParams_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + interface_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + kind_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + licenses_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + licenses_.add(s); + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + mode_ = s; + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + source_ = s; + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + licenses_ = licenses_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.LocalDisk.class, + com.google.cloud.notebooks.v1.LocalDisk.Builder.class); + } + + public interface RuntimeGuestOsFeatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The ID of a supported feature. Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Valid values:
+     * * FEATURE_TYPE_UNSPECIFIED
+     * * MULTI_IP_SUBNET
+     * * SECURE_BOOT
+     * * UEFI_COMPATIBLE
+     * * VIRTIO_SCSI_MULTIQUEUE
+     * * WINDOWS
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * The ID of a supported feature. Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Valid values:
+     * * FEATURE_TYPE_UNSPECIFIED
+     * * MULTI_IP_SUBNET
+     * * SECURE_BOOT
+     * * UEFI_COMPATIBLE
+     * * VIRTIO_SCSI_MULTIQUEUE
+     * * WINDOWS
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + } + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * Read [Enabling guest operating system
+   * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+   * to see a list of available options.
+   * Guest OS features for boot disk.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature} + */ + public static final class RuntimeGuestOsFeature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + RuntimeGuestOsFeatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeGuestOsFeature.newBuilder() to construct. + private RuntimeGuestOsFeature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeGuestOsFeature() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeGuestOsFeature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RuntimeGuestOsFeature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.class, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + * + * + *
+     * The ID of a supported feature. Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Valid values:
+     * * FEATURE_TYPE_UNSPECIFIED
+     * * MULTI_IP_SUBNET
+     * * SECURE_BOOT
+     * * UEFI_COMPATIBLE
+     * * VIRTIO_SCSI_MULTIQUEUE
+     * * WINDOWS
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * The ID of a supported feature. Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Valid values:
+     * * FEATURE_TYPE_UNSPECIFIED
+     * * MULTI_IP_SUBNET
+     * * SECURE_BOOT
+     * * UEFI_COMPATIBLE
+     * * VIRTIO_SCSI_MULTIQUEUE
+     * * WINDOWS
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature other = + (com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) obj; + + if (!getType().equals(other.getType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * Read [Enabling guest operating system
+     * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+     * to see a list of available options.
+     * Guest OS features for boot disk.
+     * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.class, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature build() { + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature buildPartial() { + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature result = + new com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature(this); + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) { + return mergeFrom((com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature other) { + if (other + == com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.getDefaultInstance()) + return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * FEATURE_TYPE_UNSPECIFIED
+       * * MULTI_IP_SUBNET
+       * * SECURE_BOOT
+       * * UEFI_COMPATIBLE
+       * * VIRTIO_SCSI_MULTIQUEUE
+       * * WINDOWS
+       * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * FEATURE_TYPE_UNSPECIFIED
+       * * MULTI_IP_SUBNET
+       * * SECURE_BOOT
+       * * UEFI_COMPATIBLE
+       * * VIRTIO_SCSI_MULTIQUEUE
+       * * WINDOWS
+       * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * FEATURE_TYPE_UNSPECIFIED
+       * * MULTI_IP_SUBNET
+       * * SECURE_BOOT
+       * * UEFI_COMPATIBLE
+       * * VIRTIO_SCSI_MULTIQUEUE
+       * * WINDOWS
+       * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * FEATURE_TYPE_UNSPECIFIED
+       * * MULTI_IP_SUBNET
+       * * SECURE_BOOT
+       * * UEFI_COMPATIBLE
+       * * VIRTIO_SCSI_MULTIQUEUE
+       * * WINDOWS
+       * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of a supported feature. Read [Enabling guest operating system
+       * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features)
+       * to see a list of available options.
+       * Valid values:
+       * * FEATURE_TYPE_UNSPECIFIED
+       * * MULTI_IP_SUBNET
+       * * SECURE_BOOT
+       * * UEFI_COMPATIBLE
+       * * VIRTIO_SCSI_MULTIQUEUE
+       * * WINDOWS
+       * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature) + private static final com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature(); + } + + public static com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeGuestOsFeature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RuntimeGuestOsFeature(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int AUTO_DELETE_FIELD_NUMBER = 1; + private boolean autoDelete_; + /** + * + * + *
+   * Optional. Output only. Specifies whether the disk will be auto-deleted when the
+   * instance is deleted (but not when the disk is detached from the instance).
+   * 
+ * + * bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + + public static final int BOOT_FIELD_NUMBER = 2; + private boolean boot_; + /** + * + * + *
+   * Optional. Output only. Indicates that this is a boot disk. The virtual machine
+   * will use the first partition of the disk for its root filesystem.
+   * 
+ * + * bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object deviceName_; + /** + * + * + *
+   * Optional. Output only. Specifies a unique device name
+   * of your choice that is reflected into the
+   * /dev/disk/by-id/google-* tree of a Linux operating system running within
+   * the instance. This name can be used to reference the device for mounting,
+   * resizing, and so on, from within the instance.
+   * If not specified, the server chooses a default device name to apply to this
+   * disk, in the form persistent-disk-x, where x is a number assigned by Google
+   * Compute Engine. This field is only applicable for persistent disks.
+   * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deviceName. + */ + @java.lang.Override + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Output only. Specifies a unique device name
+   * of your choice that is reflected into the
+   * /dev/disk/by-id/google-* tree of a Linux operating system running within
+   * the instance. This name can be used to reference the device for mounting,
+   * resizing, and so on, from within the instance.
+   * If not specified, the server chooses a default device name to apply to this
+   * disk, in the form persistent-disk-x, where x is a number assigned by Google
+   * Compute Engine. This field is only applicable for persistent disks.
+   * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GUEST_OS_FEATURES_FIELD_NUMBER = 4; + private java.util.List + guestOsFeatures_; + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getGuestOsFeaturesList() { + return guestOsFeatures_; + } + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList() { + return guestOsFeatures_; + } + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getGuestOsFeaturesCount() { + return guestOsFeatures_.size(); + } + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature getGuestOsFeatures( + int index) { + return guestOsFeatures_.get(index); + } + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index) { + return guestOsFeatures_.get(index); + } + + public static final int INDEX_FIELD_NUMBER = 5; + private int index_; + /** + * + * + *
+   * Output only. A zero-based index to this disk, where 0 is reserved for the
+   * boot disk. If you have many disks attached to an instance, each disk would
+   * have a unique index number.
+   * 
+ * + * int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + + public static final int INITIALIZE_PARAMS_FIELD_NUMBER = 6; + private com.google.cloud.notebooks.v1.LocalDiskInitializeParams initializeParams_; + /** + * + * + *
+   * Input only. Specifies the parameters for a new disk that will be created
+   * alongside the new instance. Use initialization parameters to create boot
+   * disks or local SSDs attached to the new instance.
+   * This property is mutually exclusive with the source property; you can only
+   * define one or the other, but not both.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the initializeParams field is set. + */ + @java.lang.Override + public boolean hasInitializeParams() { + return initializeParams_ != null; + } + /** + * + * + *
+   * Input only. Specifies the parameters for a new disk that will be created
+   * alongside the new instance. Use initialization parameters to create boot
+   * disks or local SSDs attached to the new instance.
+   * This property is mutually exclusive with the source property; you can only
+   * define one or the other, but not both.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The initializeParams. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams getInitializeParams() { + return initializeParams_ == null + ? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance() + : initializeParams_; + } + /** + * + * + *
+   * Input only. Specifies the parameters for a new disk that will be created
+   * alongside the new instance. Use initialization parameters to create boot
+   * disks or local SSDs attached to the new instance.
+   * This property is mutually exclusive with the source property; you can only
+   * define one or the other, but not both.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder + getInitializeParamsOrBuilder() { + return getInitializeParams(); + } + + public static final int INTERFACE_FIELD_NUMBER = 7; + private volatile java.lang.Object interface_; + /** + * + * + *
+   * Specifies the disk interface to use for attaching this disk, which is
+   * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+   * SCSI and the request will fail if you attempt to attach a persistent disk
+   * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+   * performance characteristics of SCSI over NVMe, see Local SSD performance.
+   * Valid values:
+   *     NVME
+   *     SCSI
+   * 
+ * + * string interface = 7; + * + * @return The interface. + */ + @java.lang.Override + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the disk interface to use for attaching this disk, which is
+   * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+   * SCSI and the request will fail if you attempt to attach a persistent disk
+   * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+   * performance characteristics of SCSI over NVMe, see Local SSD performance.
+   * Valid values:
+   *     NVME
+   *     SCSI
+   * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 8; + private volatile java.lang.Object kind_; + /** + * + * + *
+   * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+   * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+   * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSES_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList licenses_; + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_; + } + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + + public static final int MODE_FIELD_NUMBER = 10; + private volatile java.lang.Object mode_; + /** + * + * + *
+   * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+   * not specified, the default is to attach the disk in READ_WRITE mode.
+   * Valid values:
+   *     READ_ONLY
+   *     READ_WRITE
+   * 
+ * + * string mode = 10; + * + * @return The mode. + */ + @java.lang.Override + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } + } + /** + * + * + *
+   * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+   * not specified, the default is to attach the disk in READ_WRITE mode.
+   * Valid values:
+   *     READ_ONLY
+   *     READ_WRITE
+   * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 11; + private volatile java.lang.Object source_; + /** + * + * + *
+   * Specifies a valid partial or full URL to an existing Persistent Disk
+   * resource.
+   * 
+ * + * string source = 11; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies a valid partial or full URL to an existing Persistent Disk
+   * resource.
+   * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 12; + private volatile java.lang.Object type_; + /** + * + * + *
+   * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+   * specified, the default is PERSISTENT.
+   * Valid values:
+   *     PERSISTENT
+   *     SCRATCH
+   * 
+ * + * string type = 12; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+   * specified, the default is PERSISTENT.
+   * Valid values:
+   *     PERSISTENT
+   *     SCRATCH
+   * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (autoDelete_ != false) { + output.writeBool(1, autoDelete_); + } + if (boot_ != false) { + output.writeBool(2, boot_); + } + if (!getDeviceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceName_); + } + for (int i = 0; i < guestOsFeatures_.size(); i++) { + output.writeMessage(4, guestOsFeatures_.get(i)); + } + if (index_ != 0) { + output.writeInt32(5, index_); + } + if (initializeParams_ != null) { + output.writeMessage(6, getInitializeParams()); + } + if (!getInterfaceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, interface_); + } + if (!getKindBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, kind_); + } + for (int i = 0; i < licenses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, licenses_.getRaw(i)); + } + if (!getModeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, mode_); + } + if (!getSourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, source_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (autoDelete_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, autoDelete_); + } + if (boot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, boot_); + } + if (!getDeviceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceName_); + } + for (int i = 0; i < guestOsFeatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, guestOsFeatures_.get(i)); + } + if (index_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, index_); + } + if (initializeParams_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getInitializeParams()); + } + if (!getInterfaceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, interface_); + } + if (!getKindBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, kind_); + } + { + int dataSize = 0; + for (int i = 0; i < licenses_.size(); i++) { + dataSize += computeStringSizeNoTag(licenses_.getRaw(i)); + } + size += dataSize; + size += 1 * getLicensesList().size(); + } + if (!getModeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, mode_); + } + if (!getSourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, source_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.LocalDisk)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.LocalDisk other = (com.google.cloud.notebooks.v1.LocalDisk) obj; + + if (getAutoDelete() != other.getAutoDelete()) return false; + if (getBoot() != other.getBoot()) return false; + if (!getDeviceName().equals(other.getDeviceName())) return false; + if (!getGuestOsFeaturesList().equals(other.getGuestOsFeaturesList())) return false; + if (getIndex() != other.getIndex()) return false; + if (hasInitializeParams() != other.hasInitializeParams()) return false; + if (hasInitializeParams()) { + if (!getInitializeParams().equals(other.getInitializeParams())) return false; + } + if (!getInterface().equals(other.getInterface())) return false; + if (!getKind().equals(other.getKind())) return false; + if (!getLicensesList().equals(other.getLicensesList())) return false; + if (!getMode().equals(other.getMode())) return false; + if (!getSource().equals(other.getSource())) return false; + if (!getType().equals(other.getType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUTO_DELETE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoDelete()); + hash = (37 * hash) + BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoot()); + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + if (getGuestOsFeaturesCount() > 0) { + hash = (37 * hash) + GUEST_OS_FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getGuestOsFeaturesList().hashCode(); + } + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + if (hasInitializeParams()) { + hash = (37 * hash) + INITIALIZE_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getInitializeParams().hashCode(); + } + hash = (37 * hash) + INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getInterface().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + if (getLicensesCount() > 0) { + hash = (37 * hash) + LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getLicensesList().hashCode(); + } + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDisk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.LocalDisk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An Local attached disk resource.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.LocalDisk} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.LocalDisk) + com.google.cloud.notebooks.v1.LocalDiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.LocalDisk.class, + com.google.cloud.notebooks.v1.LocalDisk.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.LocalDisk.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGuestOsFeaturesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + autoDelete_ = false; + + boot_ = false; + + deviceName_ = ""; + + if (guestOsFeaturesBuilder_ == null) { + guestOsFeatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + guestOsFeaturesBuilder_.clear(); + } + index_ = 0; + + if (initializeParamsBuilder_ == null) { + initializeParams_ = null; + } else { + initializeParams_ = null; + initializeParamsBuilder_ = null; + } + interface_ = ""; + + kind_ = ""; + + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + mode_ = ""; + + source_ = ""; + + type_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.LocalDisk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk build() { + com.google.cloud.notebooks.v1.LocalDisk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk buildPartial() { + com.google.cloud.notebooks.v1.LocalDisk result = + new com.google.cloud.notebooks.v1.LocalDisk(this); + int from_bitField0_ = bitField0_; + result.autoDelete_ = autoDelete_; + result.boot_ = boot_; + result.deviceName_ = deviceName_; + if (guestOsFeaturesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.guestOsFeatures_ = guestOsFeatures_; + } else { + result.guestOsFeatures_ = guestOsFeaturesBuilder_.build(); + } + result.index_ = index_; + if (initializeParamsBuilder_ == null) { + result.initializeParams_ = initializeParams_; + } else { + result.initializeParams_ = initializeParamsBuilder_.build(); + } + result.interface_ = interface_; + result.kind_ = kind_; + if (((bitField0_ & 0x00000002) != 0)) { + licenses_ = licenses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.licenses_ = licenses_; + result.mode_ = mode_; + result.source_ = source_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.LocalDisk) { + return mergeFrom((com.google.cloud.notebooks.v1.LocalDisk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.LocalDisk other) { + if (other == com.google.cloud.notebooks.v1.LocalDisk.getDefaultInstance()) return this; + if (other.getAutoDelete() != false) { + setAutoDelete(other.getAutoDelete()); + } + if (other.getBoot() != false) { + setBoot(other.getBoot()); + } + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + onChanged(); + } + if (guestOsFeaturesBuilder_ == null) { + if (!other.guestOsFeatures_.isEmpty()) { + if (guestOsFeatures_.isEmpty()) { + guestOsFeatures_ = other.guestOsFeatures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.addAll(other.guestOsFeatures_); + } + onChanged(); + } + } else { + if (!other.guestOsFeatures_.isEmpty()) { + if (guestOsFeaturesBuilder_.isEmpty()) { + guestOsFeaturesBuilder_.dispose(); + guestOsFeaturesBuilder_ = null; + guestOsFeatures_ = other.guestOsFeatures_; + bitField0_ = (bitField0_ & ~0x00000001); + guestOsFeaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGuestOsFeaturesFieldBuilder() + : null; + } else { + guestOsFeaturesBuilder_.addAllMessages(other.guestOsFeatures_); + } + } + } + if (other.getIndex() != 0) { + setIndex(other.getIndex()); + } + if (other.hasInitializeParams()) { + mergeInitializeParams(other.getInitializeParams()); + } + if (!other.getInterface().isEmpty()) { + interface_ = other.interface_; + onChanged(); + } + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + onChanged(); + } + if (!other.licenses_.isEmpty()) { + if (licenses_.isEmpty()) { + licenses_ = other.licenses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLicensesIsMutable(); + licenses_.addAll(other.licenses_); + } + onChanged(); + } + if (!other.getMode().isEmpty()) { + mode_ = other.mode_; + onChanged(); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.LocalDisk parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.LocalDisk) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean autoDelete_; + /** + * + * + *
+     * Optional. Output only. Specifies whether the disk will be auto-deleted when the
+     * instance is deleted (but not when the disk is detached from the instance).
+     * 
+ * + * bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + /** + * + * + *
+     * Optional. Output only. Specifies whether the disk will be auto-deleted when the
+     * instance is deleted (but not when the disk is detached from the instance).
+     * 
+ * + * bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The autoDelete to set. + * @return This builder for chaining. + */ + public Builder setAutoDelete(boolean value) { + + autoDelete_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output only. Specifies whether the disk will be auto-deleted when the
+     * instance is deleted (but not when the disk is detached from the instance).
+     * 
+ * + * bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAutoDelete() { + + autoDelete_ = false; + onChanged(); + return this; + } + + private boolean boot_; + /** + * + * + *
+     * Optional. Output only. Indicates that this is a boot disk. The virtual machine
+     * will use the first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + /** + * + * + *
+     * Optional. Output only. Indicates that this is a boot disk. The virtual machine
+     * will use the first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The boot to set. + * @return This builder for chaining. + */ + public Builder setBoot(boolean value) { + + boot_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output only. Indicates that this is a boot disk. The virtual machine
+     * will use the first partition of the disk for its root filesystem.
+     * 
+ * + * bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBoot() { + + boot_ = false; + onChanged(); + return this; + } + + private java.lang.Object deviceName_ = ""; + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deviceName. + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deviceName. + */ + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeviceName() { + + deviceName_ = getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output only. Specifies a unique device name
+     * of your choice that is reflected into the
+     * /dev/disk/by-id/google-* tree of a Linux operating system running within
+     * the instance. This name can be used to reference the device for mounting,
+     * resizing, and so on, from within the instance.
+     * If not specified, the server chooses a default device name to apply to this
+     * disk, in the form persistent-disk-x, where x is a number assigned by Google
+     * Compute Engine. This field is only applicable for persistent disks.
+     * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceName_ = value; + onChanged(); + return this; + } + + private java.util.List + guestOsFeatures_ = java.util.Collections.emptyList(); + + private void ensureGuestOsFeaturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + guestOsFeatures_ = + new java.util.ArrayList( + guestOsFeatures_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + guestOsFeaturesBuilder_; + + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getGuestOsFeaturesList() { + if (guestOsFeaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestOsFeatures_); + } else { + return guestOsFeaturesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getGuestOsFeaturesCount() { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.size(); + } else { + return guestOsFeaturesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature getGuestOsFeatures( + int index) { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.get(index); + } else { + return guestOsFeaturesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGuestOsFeatures( + int index, com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.set(index, value); + onChanged(); + } else { + guestOsFeaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGuestOsFeatures( + int index, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.set(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addGuestOsFeatures( + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(value); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addGuestOsFeatures( + int index, com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature value) { + if (guestOsFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(index, value); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addGuestOsFeatures( + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addGuestOsFeatures( + int index, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder builderForValue) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllGuestOsFeatures( + java.lang.Iterable + values) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeatures_); + onChanged(); + } else { + guestOsFeaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGuestOsFeatures() { + if (guestOsFeaturesBuilder_ == null) { + guestOsFeatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + guestOsFeaturesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeGuestOsFeatures(int index) { + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.remove(index); + onChanged(); + } else { + guestOsFeaturesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + getGuestOsFeaturesBuilder(int index) { + return getGuestOsFeaturesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index) { + if (guestOsFeaturesBuilder_ == null) { + return guestOsFeatures_.get(index); + } else { + return guestOsFeaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + getGuestOsFeaturesOrBuilderList() { + if (guestOsFeaturesBuilder_ != null) { + return guestOsFeaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestOsFeatures_); + } + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + addGuestOsFeaturesBuilder() { + return getGuestOsFeaturesFieldBuilder() + .addBuilder( + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder + addGuestOsFeaturesBuilder(int index) { + return getGuestOsFeaturesFieldBuilder() + .addBuilder( + index, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Indicates a list of features to enable on the guest operating system.
+     * Applicable only for bootable images. Read  Enabling guest operating
+     * system features to see a list of available options.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getGuestOsFeaturesBuilderList() { + return getGuestOsFeaturesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder> + getGuestOsFeaturesFieldBuilder() { + if (guestOsFeaturesBuilder_ == null) { + guestOsFeaturesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature.Builder, + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder>( + guestOsFeatures_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + guestOsFeatures_ = null; + } + return guestOsFeaturesBuilder_; + } + + private int index_; + /** + * + * + *
+     * Output only. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk would
+     * have a unique index number.
+     * 
+ * + * int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * + * + *
+     * Output only. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk would
+     * have a unique index number.
+     * 
+ * + * int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk. If you have many disks attached to an instance, each disk would
+     * have a unique index number.
+     * 
+ * + * int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.LocalDiskInitializeParams initializeParams_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDiskInitializeParams, + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder, + com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder> + initializeParamsBuilder_; + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the initializeParams field is set. + */ + public boolean hasInitializeParams() { + return initializeParamsBuilder_ != null || initializeParams_ != null; + } + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The initializeParams. + */ + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams getInitializeParams() { + if (initializeParamsBuilder_ == null) { + return initializeParams_ == null + ? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance() + : initializeParams_; + } else { + return initializeParamsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setInitializeParams( + com.google.cloud.notebooks.v1.LocalDiskInitializeParams value) { + if (initializeParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + initializeParams_ = value; + onChanged(); + } else { + initializeParamsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setInitializeParams( + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder builderForValue) { + if (initializeParamsBuilder_ == null) { + initializeParams_ = builderForValue.build(); + onChanged(); + } else { + initializeParamsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeInitializeParams( + com.google.cloud.notebooks.v1.LocalDiskInitializeParams value) { + if (initializeParamsBuilder_ == null) { + if (initializeParams_ != null) { + initializeParams_ = + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.newBuilder(initializeParams_) + .mergeFrom(value) + .buildPartial(); + } else { + initializeParams_ = value; + } + onChanged(); + } else { + initializeParamsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearInitializeParams() { + if (initializeParamsBuilder_ == null) { + initializeParams_ = null; + onChanged(); + } else { + initializeParams_ = null; + initializeParamsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder + getInitializeParamsBuilder() { + + onChanged(); + return getInitializeParamsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder + getInitializeParamsOrBuilder() { + if (initializeParamsBuilder_ != null) { + return initializeParamsBuilder_.getMessageOrBuilder(); + } else { + return initializeParams_ == null + ? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance() + : initializeParams_; + } + } + /** + * + * + *
+     * Input only. Specifies the parameters for a new disk that will be created
+     * alongside the new instance. Use initialization parameters to create boot
+     * disks or local SSDs attached to the new instance.
+     * This property is mutually exclusive with the source property; you can only
+     * define one or the other, but not both.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDiskInitializeParams, + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder, + com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder> + getInitializeParamsFieldBuilder() { + if (initializeParamsBuilder_ == null) { + initializeParamsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDiskInitializeParams, + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder, + com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder>( + getInitializeParams(), getParentForChildren(), isClean()); + initializeParams_ = null; + } + return initializeParamsBuilder_; + } + + private java.lang.Object interface_ = ""; + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @return The interface. + */ + public java.lang.String getInterface() { + java.lang.Object ref = interface_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interface_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + public com.google.protobuf.ByteString getInterfaceBytes() { + java.lang.Object ref = interface_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + interface_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @param value The interface to set. + * @return This builder for chaining. + */ + public Builder setInterface(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + interface_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @return This builder for chaining. + */ + public Builder clearInterface() { + + interface_ = getDefaultInstance().getInterface(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the disk interface to use for attaching this disk, which is
+     * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+     * SCSI and the request will fail if you attempt to attach a persistent disk
+     * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+     * performance characteristics of SCSI over NVMe, see Local SSD performance.
+     * Valid values:
+     *     NVME
+     *     SCSI
+     * 
+ * + * string interface = 7; + * + * @param value The bytes for interface to set. + * @return This builder for chaining. + */ + public Builder setInterfaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + interface_ = value; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+     * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+     * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+     * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+     * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + + kind_ = getDefaultInstance().getKind(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+     * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kind_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList licenses_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureLicensesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The licenses to set. + * @return This builder for chaining. + */ + public Builder setLicenses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The licenses to add. + * @return This builder for chaining. + */ + public Builder addLicenses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The licenses to add. + * @return This builder for chaining. + */ + public Builder addAllLicenses(java.lang.Iterable values) { + ensureLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenses_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLicenses() { + licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Any valid publicly visible licenses.
+     * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the licenses to add. + * @return This builder for chaining. + */ + public Builder addLicensesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLicensesIsMutable(); + licenses_.add(value); + onChanged(); + return this; + } + + private java.lang.Object mode_ = ""; + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = getDefaultInstance().getMode(); + onChanged(); + return this; + } + /** + * + * + *
+     * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+     * not specified, the default is to attach the disk in READ_WRITE mode.
+     * Valid values:
+     *     READ_ONLY
+     *     READ_WRITE
+     * 
+ * + * string mode = 10; + * + * @param value The bytes for mode to set. + * @return This builder for chaining. + */ + public Builder setModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mode_ = value; + onChanged(); + return this; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies a valid partial or full URL to an existing Persistent Disk
+     * resource.
+     * 
+ * + * string source = 11; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + source_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+     * specified, the default is PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+     * specified, the default is PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+     * specified, the default is PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+     * specified, the default is PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+     * specified, the default is PERSISTENT.
+     * Valid values:
+     *     PERSISTENT
+     *     SCRATCH
+     * 
+ * + * string type = 12; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.LocalDisk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.LocalDisk) + private static final com.google.cloud.notebooks.v1.LocalDisk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.LocalDisk(); + } + + public static com.google.cloud.notebooks.v1.LocalDisk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocalDisk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocalDisk(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskInitializeParams.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskInitializeParams.java new file mode 100644 index 00000000..7963e2bd --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskInitializeParams.java @@ -0,0 +1,1632 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Input only. Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new runtime.
+ * This property is mutually exclusive with the source property; you can only
+ * define one or the other, but not both.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.LocalDiskInitializeParams} + */ +public final class LocalDiskInitializeParams extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.LocalDiskInitializeParams) + LocalDiskInitializeParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use LocalDiskInitializeParams.newBuilder() to construct. + private LocalDiskInitializeParams(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LocalDiskInitializeParams() { + description_ = ""; + diskName_ = ""; + diskType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LocalDiskInitializeParams(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LocalDiskInitializeParams( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + diskName_ = s; + break; + } + case 24: + { + diskSizeGb_ = input.readInt64(); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + diskType_ = rawValue; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.class, + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder.class); + } + + /** + * + * + *
+   * Possible disk types.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType} + */ + public enum DiskType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Disk type not set.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + DISK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Standard persistent disk type.
+     * 
+ * + * PD_STANDARD = 1; + */ + PD_STANDARD(1), + /** + * + * + *
+     * SSD persistent disk type.
+     * 
+ * + * PD_SSD = 2; + */ + PD_SSD(2), + /** + * + * + *
+     * Balanced persistent disk type.
+     * 
+ * + * PD_BALANCED = 3; + */ + PD_BALANCED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Disk type not set.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + public static final int DISK_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Standard persistent disk type.
+     * 
+ * + * PD_STANDARD = 1; + */ + public static final int PD_STANDARD_VALUE = 1; + /** + * + * + *
+     * SSD persistent disk type.
+     * 
+ * + * PD_SSD = 2; + */ + public static final int PD_SSD_VALUE = 2; + /** + * + * + *
+     * Balanced persistent disk type.
+     * 
+ * + * PD_BALANCED = 3; + */ + public static final int PD_BALANCED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DiskType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DiskType forNumber(int value) { + switch (value) { + case 0: + return DISK_TYPE_UNSPECIFIED; + case 1: + return PD_STANDARD; + case 2: + return PD_SSD; + case 3: + return PD_BALANCED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DiskType findValueByNumber(int number) { + return DiskType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DiskType[] VALUES = values(); + + public static DiskType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DiskType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType) + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. Provide this property when creating the disk.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Provide this property when creating the disk.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object diskName_; + /** + * + * + *
+   * Optional. Specifies the disk name. If not specified, the default is to use the name
+   * of the instance. If the disk with the instance name exists already in the
+   * given zone/region, a new name will be automatically generated.
+   * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskName. + */ + @java.lang.Override + public java.lang.String getDiskName() { + java.lang.Object ref = diskName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Specifies the disk name. If not specified, the default is to use the name
+   * of the instance. If the disk with the instance name exists already in the
+   * given zone/region, a new name will be automatically generated.
+   * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for diskName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDiskNameBytes() { + java.lang.Object ref = diskName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_SIZE_GB_FIELD_NUMBER = 3; + private long diskSizeGb_; + /** + * + * + *
+   * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
+   * will be the same size as the image (usually 10GB). If specified, the size
+   * must be equal to or larger than 10GB. Default 100 GB.
+   * 
+ * + * int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + + public static final int DISK_TYPE_FIELD_NUMBER = 4; + private int diskType_; + /** + * + * + *
+   * Input only. The type of the boot disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for diskType. + */ + @java.lang.Override + public int getDiskTypeValue() { + return diskType_; + } + /** + * + * + *
+   * Input only. The type of the boot disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diskType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType getDiskType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType result = + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType.valueOf(diskType_); + return result == null + ? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType.UNRECOGNIZED + : result; + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (!getDiskNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, diskName_); + } + if (diskSizeGb_ != 0L) { + output.writeInt64(3, diskSizeGb_); + } + if (diskType_ + != com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType.DISK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, diskType_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (!getDiskNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, diskName_); + } + if (diskSizeGb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, diskSizeGb_); + } + if (diskType_ + != com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType.DISK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, diskType_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.LocalDiskInitializeParams)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.LocalDiskInitializeParams other = + (com.google.cloud.notebooks.v1.LocalDiskInitializeParams) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getDiskName().equals(other.getDiskName())) return false; + if (getDiskSizeGb() != other.getDiskSizeGb()) return false; + if (diskType_ != other.diskType_) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DISK_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDiskName().hashCode(); + hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb()); + hash = (37 * hash) + DISK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + diskType_; + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.LocalDiskInitializeParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Input only. Specifies the parameters for a new disk that will be created
+   * alongside the new instance. Use initialization parameters to create boot
+   * disks or local SSDs attached to the new runtime.
+   * This property is mutually exclusive with the source property; you can only
+   * define one or the other, but not both.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.LocalDiskInitializeParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.LocalDiskInitializeParams) + com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.class, + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.LocalDiskInitializeParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + description_ = ""; + + diskName_ = ""; + + diskSizeGb_ = 0L; + + diskType_ = 0; + + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams build() { + com.google.cloud.notebooks.v1.LocalDiskInitializeParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams buildPartial() { + com.google.cloud.notebooks.v1.LocalDiskInitializeParams result = + new com.google.cloud.notebooks.v1.LocalDiskInitializeParams(this); + int from_bitField0_ = bitField0_; + result.description_ = description_; + result.diskName_ = diskName_; + result.diskSizeGb_ = diskSizeGb_; + result.diskType_ = diskType_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.LocalDiskInitializeParams) { + return mergeFrom((com.google.cloud.notebooks.v1.LocalDiskInitializeParams) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.LocalDiskInitializeParams other) { + if (other == com.google.cloud.notebooks.v1.LocalDiskInitializeParams.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getDiskName().isEmpty()) { + diskName_ = other.diskName_; + onChanged(); + } + if (other.getDiskSizeGb() != 0L) { + setDiskSizeGb(other.getDiskSizeGb()); + } + if (other.diskType_ != 0) { + setDiskTypeValue(other.getDiskTypeValue()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.LocalDiskInitializeParams parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.LocalDiskInitializeParams) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Provide this property when creating the disk.
+     * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object diskName_ = ""; + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use the name
+     * of the instance. If the disk with the instance name exists already in the
+     * given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskName. + */ + public java.lang.String getDiskName() { + java.lang.Object ref = diskName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use the name
+     * of the instance. If the disk with the instance name exists already in the
+     * given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for diskName. + */ + public com.google.protobuf.ByteString getDiskNameBytes() { + java.lang.Object ref = diskName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use the name
+     * of the instance. If the disk with the instance name exists already in the
+     * given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The diskName to set. + * @return This builder for chaining. + */ + public Builder setDiskName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + diskName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use the name
+     * of the instance. If the disk with the instance name exists already in the
+     * given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDiskName() { + + diskName_ = getDefaultInstance().getDiskName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to use the name
+     * of the instance. If the disk with the instance name exists already in the
+     * given zone/region, a new name will be automatically generated.
+     * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for diskName to set. + * @return This builder for chaining. + */ + public Builder setDiskNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + diskName_ = value; + onChanged(); + return this; + } + + private long diskSizeGb_; + /** + * + * + *
+     * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
+     * will be the same size as the image (usually 10GB). If specified, the size
+     * must be equal to or larger than 10GB. Default 100 GB.
+     * 
+ * + * int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + /** + * + * + *
+     * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
+     * will be the same size as the image (usually 10GB). If specified, the size
+     * must be equal to or larger than 10GB. Default 100 GB.
+     * 
+ * + * int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The diskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setDiskSizeGb(long value) { + + diskSizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
+     * will be the same size as the image (usually 10GB). If specified, the size
+     * must be equal to or larger than 10GB. Default 100 GB.
+     * 
+ * + * int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDiskSizeGb() { + + diskSizeGb_ = 0L; + onChanged(); + return this; + } + + private int diskType_ = 0; + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for diskType. + */ + @java.lang.Override + public int getDiskTypeValue() { + return diskType_; + } + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for diskType to set. + * @return This builder for chaining. + */ + public Builder setDiskTypeValue(int value) { + + diskType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diskType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType getDiskType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType result = + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType.valueOf(diskType_); + return result == null + ? com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @param value The diskType to set. + * @return This builder for chaining. + */ + public Builder setDiskType( + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType value) { + if (value == null) { + throw new NullPointerException(); + } + + diskType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The type of the boot disk attached to this instance, defaults to
+     * standard persistent disk (`PD_STANDARD`).
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDiskType() { + + diskType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be later modified by the
+     * disks.setLabels method. This field is only applicable for persistent disks.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.LocalDiskInitializeParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.LocalDiskInitializeParams) + private static final com.google.cloud.notebooks.v1.LocalDiskInitializeParams DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.LocalDiskInitializeParams(); + } + + public static com.google.cloud.notebooks.v1.LocalDiskInitializeParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocalDiskInitializeParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LocalDiskInitializeParams(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskInitializeParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskInitializeParamsOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskInitializeParamsOrBuilder.java new file mode 100644 index 00000000..1edc65de --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskInitializeParamsOrBuilder.java @@ -0,0 +1,184 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface LocalDiskInitializeParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.LocalDiskInitializeParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Provide this property when creating the disk.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Provide this property when creating the disk.
+   * 
+ * + * string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Specifies the disk name. If not specified, the default is to use the name
+   * of the instance. If the disk with the instance name exists already in the
+   * given zone/region, a new name will be automatically generated.
+   * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskName. + */ + java.lang.String getDiskName(); + /** + * + * + *
+   * Optional. Specifies the disk name. If not specified, the default is to use the name
+   * of the instance. If the disk with the instance name exists already in the
+   * given zone/region, a new name will be automatically generated.
+   * 
+ * + * string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for diskName. + */ + com.google.protobuf.ByteString getDiskNameBytes(); + + /** + * + * + *
+   * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk
+   * will be the same size as the image (usually 10GB). If specified, the size
+   * must be equal to or larger than 10GB. Default 100 GB.
+   * 
+ * + * int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + long getDiskSizeGb(); + + /** + * + * + *
+   * Input only. The type of the boot disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for diskType. + */ + int getDiskTypeValue(); + /** + * + * + *
+   * Input only. The type of the boot disk attached to this instance, defaults to
+   * standard persistent disk (`PD_STANDARD`).
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The diskType. + */ + com.google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType getDiskType(); + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be later modified by the
+   * disks.setLabels method. This field is only applicable for persistent disks.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskOrBuilder.java new file mode 100644 index 00000000..354704f1 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocalDiskOrBuilder.java @@ -0,0 +1,442 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface LocalDiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.LocalDisk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Output only. Specifies whether the disk will be auto-deleted when the
+   * instance is deleted (but not when the disk is detached from the instance).
+   * 
+ * + * bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The autoDelete. + */ + boolean getAutoDelete(); + + /** + * + * + *
+   * Optional. Output only. Indicates that this is a boot disk. The virtual machine
+   * will use the first partition of the disk for its root filesystem.
+   * 
+ * + * bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The boot. + */ + boolean getBoot(); + + /** + * + * + *
+   * Optional. Output only. Specifies a unique device name
+   * of your choice that is reflected into the
+   * /dev/disk/by-id/google-* tree of a Linux operating system running within
+   * the instance. This name can be used to reference the device for mounting,
+   * resizing, and so on, from within the instance.
+   * If not specified, the server chooses a default device name to apply to this
+   * disk, in the form persistent-disk-x, where x is a number assigned by Google
+   * Compute Engine. This field is only applicable for persistent disks.
+   * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deviceName. + */ + java.lang.String getDeviceName(); + /** + * + * + *
+   * Optional. Output only. Specifies a unique device name
+   * of your choice that is reflected into the
+   * /dev/disk/by-id/google-* tree of a Linux operating system running within
+   * the instance. This name can be used to reference the device for mounting,
+   * resizing, and so on, from within the instance.
+   * If not specified, the server chooses a default device name to apply to this
+   * disk, in the form persistent-disk-x, where x is a number assigned by Google
+   * Compute Engine. This field is only applicable for persistent disks.
+   * 
+ * + * string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deviceName. + */ + com.google.protobuf.ByteString getDeviceNameBytes(); + + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getGuestOsFeaturesList(); + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature getGuestOsFeatures(int index); + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getGuestOsFeaturesCount(); + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getGuestOsFeaturesOrBuilderList(); + /** + * + * + *
+   * Output only. Indicates a list of features to enable on the guest operating system.
+   * Applicable only for bootable images. Read  Enabling guest operating
+   * system features to see a list of available options.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeatureOrBuilder + getGuestOsFeaturesOrBuilder(int index); + + /** + * + * + *
+   * Output only. A zero-based index to this disk, where 0 is reserved for the
+   * boot disk. If you have many disks attached to an instance, each disk would
+   * have a unique index number.
+   * 
+ * + * int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The index. + */ + int getIndex(); + + /** + * + * + *
+   * Input only. Specifies the parameters for a new disk that will be created
+   * alongside the new instance. Use initialization parameters to create boot
+   * disks or local SSDs attached to the new instance.
+   * This property is mutually exclusive with the source property; you can only
+   * define one or the other, but not both.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the initializeParams field is set. + */ + boolean hasInitializeParams(); + /** + * + * + *
+   * Input only. Specifies the parameters for a new disk that will be created
+   * alongside the new instance. Use initialization parameters to create boot
+   * disks or local SSDs attached to the new instance.
+   * This property is mutually exclusive with the source property; you can only
+   * define one or the other, but not both.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The initializeParams. + */ + com.google.cloud.notebooks.v1.LocalDiskInitializeParams getInitializeParams(); + /** + * + * + *
+   * Input only. Specifies the parameters for a new disk that will be created
+   * alongside the new instance. Use initialization parameters to create boot
+   * disks or local SSDs attached to the new instance.
+   * This property is mutually exclusive with the source property; you can only
+   * define one or the other, but not both.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.cloud.notebooks.v1.LocalDiskInitializeParamsOrBuilder getInitializeParamsOrBuilder(); + + /** + * + * + *
+   * Specifies the disk interface to use for attaching this disk, which is
+   * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+   * SCSI and the request will fail if you attempt to attach a persistent disk
+   * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+   * performance characteristics of SCSI over NVMe, see Local SSD performance.
+   * Valid values:
+   *     NVME
+   *     SCSI
+   * 
+ * + * string interface = 7; + * + * @return The interface. + */ + java.lang.String getInterface(); + /** + * + * + *
+   * Specifies the disk interface to use for attaching this disk, which is
+   * either SCSI or NVME. The default is SCSI. Persistent disks must always use
+   * SCSI and the request will fail if you attempt to attach a persistent disk
+   * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For
+   * performance characteristics of SCSI over NVMe, see Local SSD performance.
+   * Valid values:
+   *     NVME
+   *     SCSI
+   * 
+ * + * string interface = 7; + * + * @return The bytes for interface. + */ + com.google.protobuf.ByteString getInterfaceBytes(); + + /** + * + * + *
+   * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+   * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + java.lang.String getKind(); + /** + * + * + *
+   * Output only. Type of the resource. Always compute#attachedDisk for attached disks.
+   * 
+ * + * string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the licenses. + */ + java.util.List getLicensesList(); + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of licenses. + */ + int getLicensesCount(); + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + java.lang.String getLicenses(int index); + /** + * + * + *
+   * Output only. Any valid publicly visible licenses.
+   * 
+ * + * repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + com.google.protobuf.ByteString getLicensesBytes(int index); + + /** + * + * + *
+   * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+   * not specified, the default is to attach the disk in READ_WRITE mode.
+   * Valid values:
+   *     READ_ONLY
+   *     READ_WRITE
+   * 
+ * + * string mode = 10; + * + * @return The mode. + */ + java.lang.String getMode(); + /** + * + * + *
+   * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
+   * not specified, the default is to attach the disk in READ_WRITE mode.
+   * Valid values:
+   *     READ_ONLY
+   *     READ_WRITE
+   * 
+ * + * string mode = 10; + * + * @return The bytes for mode. + */ + com.google.protobuf.ByteString getModeBytes(); + + /** + * + * + *
+   * Specifies a valid partial or full URL to an existing Persistent Disk
+   * resource.
+   * 
+ * + * string source = 11; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+   * Specifies a valid partial or full URL to an existing Persistent Disk
+   * resource.
+   * 
+ * + * string source = 11; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+   * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+   * specified, the default is PERSISTENT.
+   * Valid values:
+   *     PERSISTENT
+   *     SCRATCH
+   * 
+ * + * string type = 12; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
+   * specified, the default is PERSISTENT.
+   * Valid values:
+   *     PERSISTENT
+   *     SCRATCH
+   * 
+ * + * string type = 12; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocationName.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocationName.java new file mode 100644 index 00000000..297d8a99 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebooksProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebooksProto.java new file mode 100644 index 00000000..0f4f934a --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ManagedNotebooksProto.java @@ -0,0 +1,278 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public final class ManagedNotebooksProto { + private ManagedNotebooksProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/notebooks/v1/managed_serv" + + "ice.proto\022\031google.cloud.notebooks.v1\032\034go" + + "ogle/api/annotations.proto\032\027google/api/c" + + "lient.proto\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\032%google/" + + "cloud/notebooks/v1/event.proto\032\'google/c" + + "loud/notebooks/v1/runtime.proto\032#google/" + + "longrunning/operations.proto\"v\n\023ListRunt" + + "imesRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 not" + + "ebooks.googleapis.com/Runtime\022\021\n\tpage_si" + + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"z\n\024ListRunt" + + "imesResponse\0224\n\010runtimes\030\001 \003(\0132\".google." + + "cloud.notebooks.v1.Runtime\022\027\n\017next_page_" + + "token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"K\n\021GetR" + + "untimeRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n not" + + "ebooks.googleapis.com/Runtime\"\243\001\n\024Create" + + "RuntimeRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\n " + + "notebooks.googleapis.com/Runtime\022\027\n\nrunt" + + "ime_id\030\002 \001(\tB\003\340A\002\0228\n\007runtime\030\003 \001(\0132\".goo" + + "gle.cloud.notebooks.v1.RuntimeB\003\340A\002\"N\n\024D" + + "eleteRuntimeRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A" + + "\"\n notebooks.googleapis.com/Runtime\"(\n\023S" + + "tartRuntimeRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"\'\n" + + "\022StopRuntimeRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"\220" + + "\001\n\024SwitchRuntimeRequest\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\002\022\024\n\014machine_type\030\002 \001(\t\022O\n\022accelerator_" + + "config\030\003 \001(\01323.google.cloud.notebooks.v1" + + ".RuntimeAcceleratorConfig\"(\n\023ResetRuntim" + + "eRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"\235\001\n\031ReportRu" + + "ntimeEventRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n" + + " notebooks.googleapis.com/Runtime\022\022\n\005vm_" + + "id\030\002 \001(\tB\003\340A\002\0224\n\005event\030\003 \001(\0132 .google.cl" + + "oud.notebooks.v1.EventB\003\340A\0022\310\016\n\026ManagedN" + + "otebookService\022\256\001\n\014ListRuntimes\022..google" + + ".cloud.notebooks.v1.ListRuntimesRequest\032" + + "/.google.cloud.notebooks.v1.ListRuntimes" + + "Response\"=\202\323\344\223\002.\022,/v1/{parent=projects/*" + + "/locations/*}/runtimes\332A\006parent\022\233\001\n\nGetR" + + "untime\022,.google.cloud.notebooks.v1.GetRu" + + "ntimeRequest\032\".google.cloud.notebooks.v1" + + ".Runtime\";\202\323\344\223\002.\022,/v1/{name=projects/*/l" + + "ocations/*/runtimes/*}\332A\004name\022\331\001\n\rCreate" + + "Runtime\022/.google.cloud.notebooks.v1.Crea" + + "teRuntimeRequest\032\035.google.longrunning.Op" + + "eration\"x\202\323\344\223\0027\",/v1/{parent=projects/*/" + + "locations/*}/runtimes:\007runtime\332A\031parent," + + "runtime_id,runtime\312A\034\n\007Runtime\022\021Operatio" + + "nMetadata\022\311\001\n\rDeleteRuntime\022/.google.clo" + + "ud.notebooks.v1.DeleteRuntimeRequest\032\035.g" + + "oogle.longrunning.Operation\"h\202\323\344\223\002.*,/v1" + + "/{name=projects/*/locations/*/runtimes/*" + + "}\332A\004name\312A*\n\025google.protobuf.Empty\022\021Oper" + + "ationMetadata\022\302\001\n\014StartRuntime\022..google." + + "cloud.notebooks.v1.StartRuntimeRequest\032\035" + + ".google.longrunning.Operation\"c\202\323\344\223\0027\"2/" + + "v1/{name=projects/*/locations/*/runtimes" + + "/*}:start:\001*\332A\004name\312A\034\n\007Runtime\022\021Operati" + + "onMetadata\022\277\001\n\013StopRuntime\022-.google.clou" + + "d.notebooks.v1.StopRuntimeRequest\032\035.goog" + + "le.longrunning.Operation\"b\202\323\344\223\0026\"1/v1/{n" + + "ame=projects/*/locations/*/runtimes/*}:s" + + "top:\001*\332A\004name\312A\034\n\007Runtime\022\021OperationMeta" + + "data\022\305\001\n\rSwitchRuntime\022/.google.cloud.no" + + "tebooks.v1.SwitchRuntimeRequest\032\035.google" + + ".longrunning.Operation\"d\202\323\344\223\0028\"3/v1/{nam" + + "e=projects/*/locations/*/runtimes/*}:swi" + + "tch:\001*\332A\004name\312A\034\n\007Runtime\022\021OperationMeta" + + "data\022\302\001\n\014ResetRuntime\022..google.cloud.not" + + "ebooks.v1.ResetRuntimeRequest\032\035.google.l" + + "ongrunning.Operation\"c\202\323\344\223\0027\"2/v1/{name=" + + "projects/*/locations/*/runtimes/*}:reset" + + ":\001*\332A\004name\312A\034\n\007Runtime\022\021OperationMetadat" + + "a\022\324\001\n\022ReportRuntimeEvent\0224.google.cloud." + + "notebooks.v1.ReportRuntimeEventRequest\032\035" + + ".google.longrunning.Operation\"i\202\323\344\223\002=\"8/" + + "v1/{name=projects/*/locations/*/runtimes" + + "/*}:reportEvent:\001*\332A\004name\312A\034\n\007Runtime\022\021O" + + "perationMetadata\032L\312A\030notebooks.googleapi" + + "s.com\322A.https://www.googleapis.com/auth/" + + "cloud-platformB\323\001\n\035com.google.cloud.note" + + "books.v1B\025ManagedNotebooksProtoP\001ZBgoogl" + + "e.golang.org/genproto/googleapis/cloud/n" + + "otebooks/v1;notebooks\252\002\031Google.Cloud.Not" + + "ebooks.V1\312\002\031Google\\Cloud\\Notebooks\\V1\352\002\034" + + "Google::Cloud::Notebooks::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.notebooks.v1.EventProto.getDescriptor(), + com.google.cloud.notebooks.v1.RuntimeProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + }); + internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListRuntimesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListRuntimesResponse_descriptor, + new java.lang.String[] { + "Runtimes", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_GetRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_CreateRuntimeRequest_descriptor, + new java.lang.String[] { + "Parent", "RuntimeId", "Runtime", + }); + internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_DeleteRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", "MachineType", "AcceleratorConfig", + }); + internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_descriptor, + new java.lang.String[] { + "Name", "VmId", "Event", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.notebooks.v1.EventProto.getDescriptor(); + com.google.cloud.notebooks.v1.RuntimeProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/NotebooksProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/NotebooksProto.java new file mode 100644 index 00000000..4b501fc3 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/NotebooksProto.java @@ -0,0 +1,891 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public final class NotebooksProto { + private NotebooksProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_GetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_GetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_StartInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_StartInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_StopInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_StopInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_MetadataEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_HealthInfoEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_HealthInfoEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_GetScheduleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_GetScheduleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_GetExecutionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_GetExecutionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/cloud/notebooks/v1/service.prot" + + "o\022\031google.cloud.notebooks.v1\032\034google/api" + + "/annotations.proto\032\027google/api/client.pr" + + "oto\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\032+google/cloud/no" + + "tebooks/v1/environment.proto\032)google/clo" + + "ud/notebooks/v1/execution.proto\032(google/" + + "cloud/notebooks/v1/instance.proto\032/googl" + + "e/cloud/notebooks/v1/instance_config.pro" + + "to\032(google/cloud/notebooks/v1/schedule.p" + + "roto\032#google/longrunning/operations.prot" + + "o\032\037google/protobuf/timestamp.proto\"\357\001\n\021O" + + "perationMetadata\022/\n\013create_time\030\001 \001(\0132\032." + + "google.protobuf.Timestamp\022,\n\010end_time\030\002 " + + "\001(\0132\032.google.protobuf.Timestamp\022\016\n\006targe" + + "t\030\003 \001(\t\022\014\n\004verb\030\004 \001(\t\022\026\n\016status_message\030" + + "\005 \001(\t\022\036\n\026requested_cancellation\030\006 \001(\010\022\023\n" + + "\013api_version\030\007 \001(\t\022\020\n\010endpoint\030\010 \001(\t\"R\n\024" + + "ListInstancesRequest\022\023\n\006parent\030\001 \001(\tB\003\340A" + + "\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\"}\n\025ListInstancesResponse\0226\n\tinstances\030\001" + + " \003(\0132#.google.cloud.notebooks.v1.Instanc" + + "e\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachabl" + + "e\030\003 \003(\t\"\'\n\022GetInstanceRequest\022\021\n\004name\030\001 " + + "\001(\tB\003\340A\002\"\202\001\n\025CreateInstanceRequest\022\023\n\006pa" + + "rent\030\001 \001(\tB\003\340A\002\022\030\n\013instance_id\030\002 \001(\tB\003\340A" + + "\002\022:\n\010instance\030\003 \001(\0132#.google.cloud.noteb" + + "ooks.v1.InstanceB\003\340A\002\"H\n\027RegisterInstanc" + + "eRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\030\n\013instanc" + + "e_id\030\002 \001(\tB\003\340A\002\"\223\001\n\035SetInstanceAccelerat" + + "orRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022F\n\004type\030\002 \001" + + "(\01623.google.cloud.notebooks.v1.Instance." + + "AcceleratorTypeB\003\340A\002\022\027\n\ncore_count\030\003 \001(\003" + + "B\003\340A\002\"M\n\035SetInstanceMachineTypeRequest\022\021" + + "\n\004name\030\001 \001(\tB\003\340A\002\022\031\n\014machine_type\030\002 \001(\tB" + + "\003\340A\002\"k\n\033UpdateInstanceConfigRequest\022\021\n\004n" + + "ame\030\001 \001(\tB\003\340A\002\0229\n\006config\030\002 \001(\0132).google." + + "cloud.notebooks.v1.InstanceConfig\"\255\001\n\030Se" + + "tInstanceLabelsRequest\022\021\n\004name\030\001 \001(\tB\003\340A" + + "\002\022O\n\006labels\030\002 \003(\0132?.google.cloud.noteboo" + + "ks.v1.SetInstanceLabelsRequest.LabelsEnt" + + "ry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"\226\001\n#UpdateShieldedInstanceConf" + + "igRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\\\n\030shielded" + + "_instance_config\030\002 \001(\0132:.google.cloud.no" + + "tebooks.v1.Instance.ShieldedInstanceConf" + + "ig\"*\n\025DeleteInstanceRequest\022\021\n\004name\030\001 \001(" + + "\tB\003\340A\002\")\n\024StartInstanceRequest\022\021\n\004name\030\001" + + " \001(\tB\003\340A\002\"(\n\023StopInstanceRequest\022\021\n\004name" + + "\030\001 \001(\tB\003\340A\002\")\n\024ResetInstanceRequest\022\021\n\004n" + + "ame\030\001 \001(\tB\003\340A\002\"\311\001\n\031ReportInstanceInfoReq" + + "uest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\022\n\005vm_id\030\002 \001(\tB\003" + + "\340A\002\022T\n\010metadata\030\003 \003(\0132B.google.cloud.not" + + "ebooks.v1.ReportInstanceInfoRequest.Meta" + + "dataEntry\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\">\n\034IsInstanceUpgradea" + + "bleRequest\022\036\n\021notebook_instance\030\001 \001(\tB\003\340" + + "A\002\"z\n\035IsInstanceUpgradeableResponse\022\023\n\013u" + + "pgradeable\030\001 \001(\010\022\027\n\017upgrade_version\030\002 \001(" + + "\t\022\024\n\014upgrade_info\030\003 \001(\t\022\025\n\rupgrade_image" + + "\030\004 \001(\t\"S\n\030GetInstanceHealthRequest\0227\n\004na" + + "me\030\001 \001(\tB)\340A\002\372A#\n!notebooks.googleapis.c" + + "om/Instance\"\204\003\n\031GetInstanceHealthRespons" + + "e\022[\n\014health_state\030\001 \001(\0162@.google.cloud.n" + + "otebooks.v1.GetInstanceHealthResponse.He" + + "althStateB\003\340A\003\022^\n\013health_info\030\002 \003(\0132D.go" + + "ogle.cloud.notebooks.v1.GetInstanceHealt" + + "hResponse.HealthInfoEntryB\003\340A\003\0321\n\017Health" + + "InfoEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001\"w\n\013HealthState\022\034\n\030HEALTH_STATE_UNSPECI" + + "FIED\020\000\022\013\n\007HEALTHY\020\001\022\r\n\tUNHEALTHY\020\002\022\027\n\023AG" + + "ENT_NOT_INSTALLED\020\003\022\025\n\021AGENT_NOT_RUNNING" + + "\020\004\"+\n\026UpgradeInstanceRequest\022\021\n\004name\030\001 \001" + + "(\tB\003\340A\002\"J\n\027RollbackInstanceRequest\022\021\n\004na" + + "me\030\001 \001(\tB\003\340A\002\022\034\n\017target_snapshot\030\002 \001(\tB\003" + + "\340A\002\"G\n\036UpgradeInstanceInternalRequest\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022\022\n\005vm_id\030\002 \001(\tB\003\340A\002\"U\n\027" + + "ListEnvironmentsRequest\022\023\n\006parent\030\001 \001(\tB" + + "\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\"\206\001\n\030ListEnvironmentsResponse\022<\n\014envi" + + "ronments\030\001 \003(\0132&.google.cloud.notebooks." + + "v1.Environment\022\027\n\017next_page_token\030\002 \001(\t\022" + + "\023\n\013unreachable\030\003 \003(\t\"*\n\025GetEnvironmentRe" + + "quest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"\216\001\n\030CreateEnvir" + + "onmentRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\033\n\016en" + + "vironment_id\030\002 \001(\tB\003\340A\002\022@\n\013environment\030\003" + + " \001(\0132&.google.cloud.notebooks.v1.Environ" + + "mentB\003\340A\002\"-\n\030DeleteEnvironmentRequest\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\"\232\001\n\024ListSchedulesReques" + + "t\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!notebooks.goo" + + "gleapis.com/Schedule\022\021\n\tpage_size\030\002 \001(\005\022" + + "\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010o" + + "rder_by\030\005 \001(\t\"}\n\025ListSchedulesResponse\0226" + + "\n\tschedules\030\001 \003(\0132#.google.cloud.noteboo" + + "ks.v1.Schedule\022\027\n\017next_page_token\030\002 \001(\t\022" + + "\023\n\013unreachable\030\003 \003(\t\"M\n\022GetScheduleReque" + + "st\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!notebooks.goog" + + "leapis.com/Schedule\"P\n\025DeleteScheduleReq" + + "uest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!notebooks.go" + + "ogleapis.com/Schedule\"\250\001\n\025CreateSchedule" + + "Request\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!noteboo" + + "ks.googleapis.com/Schedule\022\030\n\013schedule_i" + + "d\030\002 \001(\tB\003\340A\002\022:\n\010schedule\030\003 \001(\0132#.google." + + "cloud.notebooks.v1.ScheduleB\003\340A\002\"Q\n\026Trig" + + "gerScheduleRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#" + + "\n!notebooks.googleapis.com/Schedule\"\234\001\n\025" + + "ListExecutionsRequest\022:\n\006parent\030\001 \001(\tB*\340" + + "A\002\372A$\n\"notebooks.googleapis.com/Executio" + + "n\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\200\001\n\026L" + + "istExecutionsResponse\0228\n\nexecutions\030\001 \003(" + + "\0132$.google.cloud.notebooks.v1.Execution\022" + + "\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030" + + "\003 \003(\t\"O\n\023GetExecutionRequest\0228\n\004name\030\001 \001" + + "(\tB*\340A\002\372A$\n\"notebooks.googleapis.com/Exe" + + "cution\"R\n\026DeleteExecutionRequest\0228\n\004name" + + "\030\001 \001(\tB*\340A\002\372A$\n\"notebooks.googleapis.com" + + "/Execution\"\255\001\n\026CreateExecutionRequest\022:\n" + + "\006parent\030\001 \001(\tB*\340A\002\372A$\n\"notebooks.googlea" + + "pis.com/Execution\022\031\n\014execution_id\030\002 \001(\tB" + + "\003\340A\002\022<\n\texecution\030\003 \001(\0132$.google.cloud.n" + + "otebooks.v1.ExecutionB\003\340A\0022\3513\n\017NotebookS" + + "ervice\022\262\001\n\rListInstances\022/.google.cloud." + + "notebooks.v1.ListInstancesRequest\0320.goog" + + "le.cloud.notebooks.v1.ListInstancesRespo" + + "nse\">\202\323\344\223\002/\022-/v1/{parent=projects/*/loca" + + "tions/*}/instances\332A\006parent\022\237\001\n\013GetInsta" + + "nce\022-.google.cloud.notebooks.v1.GetInsta" + + "nceRequest\032#.google.cloud.notebooks.v1.I" + + "nstance\"<\202\323\344\223\002/\022-/v1/{name=projects/*/lo" + + "cations/*/instances/*}\332A\004name\022\340\001\n\016Create" + + "Instance\0220.google.cloud.notebooks.v1.Cre" + + "ateInstanceRequest\032\035.google.longrunning." + + "Operation\"}\202\323\344\223\0029\"-/v1/{parent=projects/" + + "*/locations/*}/instances:\010instance\332A\033par" + + "ent,instance,instance_id\312A\035\n\010Instance\022\021O" + + "perationMetadata\022\310\001\n\020RegisterInstance\0222." + + "google.cloud.notebooks.v1.RegisterInstan" + + "ceRequest\032\035.google.longrunning.Operation" + + "\"a\202\323\344\223\002;\"6/v1/{parent=projects/*/locatio" + + "ns/*}/instances:register:\001*\312A\035\n\010Instance" + + "\022\021OperationMetadata\022\332\001\n\026SetInstanceAccel" + + "erator\0228.google.cloud.notebooks.v1.SetIn" + + "stanceAcceleratorRequest\032\035.google.longru" + + "nning.Operation\"g\202\323\344\223\002A2.google.c" + + "loud.notebooks.v1.UpdateShieldedInstance" + + "ConfigRequest\032\035.google.longrunning.Opera" + + "tion\"u\202\323\344\223\002O2J/v1/{name=projects/*/locat" + + "ions/*/instances/*}:updateShieldedInstan" + + "ceConfig:\001*\312A\035\n\010Instance\022\021OperationMetad" + + "ata\022\313\001\n\021SetInstanceLabels\0223.google.cloud" + + ".notebooks.v1.SetInstanceLabelsRequest\032\035" + + ".google.longrunning.Operation\"b\202\323\344\223\002<27/" + + "v1/{name=projects/*/locations/*/instance" + + "s/*}:setLabels:\001*\312A\035\n\010Instance\022\021Operatio" + + "nMetadata\022\314\001\n\016DeleteInstance\0220.google.cl" + + "oud.notebooks.v1.DeleteInstanceRequest\032\035" + + ".google.longrunning.Operation\"i\202\323\344\223\002/*-/" + + "v1/{name=projects/*/locations/*/instance" + + "s/*}\332A\004name\312A*\n\025google.protobuf.Empty\022\021O" + + "perationMetadata\022\277\001\n\rStartInstance\022/.goo" + + "gle.cloud.notebooks.v1.StartInstanceRequ" + + "est\032\035.google.longrunning.Operation\"^\202\323\344\223" + + "\0028\"3/v1/{name=projects/*/locations/*/ins" + + "tances/*}:start:\001*\312A\035\n\010Instance\022\021Operati" + + "onMetadata\022\274\001\n\014StopInstance\022..google.clo" + + "ud.notebooks.v1.StopInstanceRequest\032\035.go" + + "ogle.longrunning.Operation\"]\202\323\344\223\0027\"2/v1/" + + "{name=projects/*/locations/*/instances/*" + + "}:stop:\001*\312A\035\n\010Instance\022\021OperationMetadat" + + "a\022\277\001\n\rResetInstance\022/.google.cloud.noteb" + + "ooks.v1.ResetInstanceRequest\032\035.google.lo" + + "ngrunning.Operation\"^\202\323\344\223\0028\"3/v1/{name=p" + + "rojects/*/locations/*/instances/*}:reset" + + ":\001*\312A\035\n\010Instance\022\021OperationMetadata\022\312\001\n\022" + + "ReportInstanceInfo\0224.google.cloud.notebo" + + "oks.v1.ReportInstanceInfoRequest\032\035.googl" + + "e.longrunning.Operation\"_\202\323\344\223\0029\"4/v1/{na" + + "me=projects/*/locations/*/instances/*}:r" + + "eport:\001*\312A\035\n\010Instance\022\021OperationMetadata" + + "\022\334\001\n\025IsInstanceUpgradeable\0227.google.clou" + + "d.notebooks.v1.IsInstanceUpgradeableRequ" + + "est\0328.google.cloud.notebooks.v1.IsInstan" + + "ceUpgradeableResponse\"P\202\323\344\223\002J\022H/v1/{note" + + "book_instance=projects/*/locations/*/ins" + + "tances/*}:isUpgradeable\022\316\001\n\021GetInstanceH" + + "ealth\0223.google.cloud.notebooks.v1.GetIns" + + "tanceHealthRequest\0324.google.cloud.notebo" + + "oks.v1.GetInstanceHealthResponse\"N\202\323\344\223\002A" + + "\022?/v1/{name=projects/*/locations/*/insta" + + "nces/*}:getInstanceHealth\332A\004name\022\305\001\n\017Upg" + + "radeInstance\0221.google.cloud.notebooks.v1" + + ".UpgradeInstanceRequest\032\035.google.longrun" + + "ning.Operation\"`\202\323\344\223\002:\"5/v1/{name=projec" + + "ts/*/locations/*/instances/*}:upgrade:\001*" + + "\312A\035\n\010Instance\022\021OperationMetadata\022\310\001\n\020Rol" + + "lbackInstance\0222.google.cloud.notebooks.v" + + "1.RollbackInstanceRequest\032\035.google.longr" + + "unning.Operation\"a\202\323\344\223\002;\"6/v1/{name=proj" + + "ects/*/locations/*/instances/*}:rollback" + + ":\001*\312A\035\n\010Instance\022\021OperationMetadata\022\335\001\n\027" + + "UpgradeInstanceInternal\0229.google.cloud.n" + + "otebooks.v1.UpgradeInstanceInternalReque" + + "st\032\035.google.longrunning.Operation\"h\202\323\344\223\002" + + "B\"=/v1/{name=projects/*/locations/*/inst" + + "ances/*}:upgradeInternal:\001*\312A\035\n\010Instance" + + "\022\021OperationMetadata\022\276\001\n\020ListEnvironments" + + "\0222.google.cloud.notebooks.v1.ListEnviron" + + "mentsRequest\0323.google.cloud.notebooks.v1" + + ".ListEnvironmentsResponse\"A\202\323\344\223\0022\0220/v1/{" + + "parent=projects/*/locations/*}/environme" + + "nts\332A\006parent\022\253\001\n\016GetEnvironment\0220.google" + + ".cloud.notebooks.v1.GetEnvironmentReques" + + "t\032&.google.cloud.notebooks.v1.Environmen" + + "t\"?\202\323\344\223\0022\0220/v1/{name=projects/*/location" + + "s/*/environments/*}\332A\004name\022\366\001\n\021CreateEnv" + + "ironment\0223.google.cloud.notebooks.v1.Cre" + + "ateEnvironmentRequest\032\035.google.longrunni" + + "ng.Operation\"\214\001\202\323\344\223\002?\"0/v1/{parent=proje" + + "cts/*/locations/*}/environments:\013environ" + + "ment\332A!parent,environment,environment_id" + + "\312A \n\013Environment\022\021OperationMetadata\022\325\001\n\021" + + "DeleteEnvironment\0223.google.cloud.noteboo" + + "ks.v1.DeleteEnvironmentRequest\032\035.google." + + "longrunning.Operation\"l\202\323\344\223\0022*0/v1/{name" + + "=projects/*/locations/*/environments/*}\332" + + "A\004name\312A*\n\025google.protobuf.Empty\022\021Operat" + + "ionMetadata\022\262\001\n\rListSchedules\022/.google.c" + + "loud.notebooks.v1.ListSchedulesRequest\0320" + + ".google.cloud.notebooks.v1.ListSchedules" + + "Response\">\202\323\344\223\002/\022-/v1/{parent=projects/*" + + "/locations/*}/schedules\332A\006parent\022\237\001\n\013Get" + + "Schedule\022-.google.cloud.notebooks.v1.Get" + + "ScheduleRequest\032#.google.cloud.notebooks" + + ".v1.Schedule\"<\202\323\344\223\002/\022-/v1/{name=projects" + + "/*/locations/*/schedules/*}\332A\004name\022\314\001\n\016D" + + "eleteSchedule\0220.google.cloud.notebooks.v" + + "1.DeleteScheduleRequest\032\035.google.longrun" + + "ning.Operation\"i\202\323\344\223\002/*-/v1/{name=projec" + + "ts/*/locations/*/schedules/*}\332A\004name\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadat" + + "a\022\340\001\n\016CreateSchedule\0220.google.cloud.note" + + "books.v1.CreateScheduleRequest\032\035.google." + + "longrunning.Operation\"}\202\323\344\223\0029\"-/v1/{pare" + + "nt=projects/*/locations/*}/schedules:\010sc" + + "hedule\332A\033parent,schedule,schedule_id\312A\035\n" + + "\010Schedule\022\021OperationMetadata\022\305\001\n\017Trigger" + + "Schedule\0221.google.cloud.notebooks.v1.Tri" + + "ggerScheduleRequest\032\035.google.longrunning" + + ".Operation\"`\202\323\344\223\002:\"5/v1/{name=projects/*" + + "/locations/*/schedules/*}:trigger:\001*\312A\035\n" + + "\010Schedule\022\021OperationMetadata\022\266\001\n\016ListExe" + + "cutions\0220.google.cloud.notebooks.v1.List" + + "ExecutionsRequest\0321.google.cloud.noteboo" + + "ks.v1.ListExecutionsResponse\"?\202\323\344\223\0020\022./v" + + "1/{parent=projects/*/locations/*}/execut" + + "ions\332A\006parent\022\243\001\n\014GetExecution\022..google." + + "cloud.notebooks.v1.GetExecutionRequest\032$" + + ".google.cloud.notebooks.v1.Execution\"=\202\323" + + "\344\223\0020\022./v1/{name=projects/*/locations/*/e" + + "xecutions/*}\332A\004name\022\317\001\n\017DeleteExecution\022" + + "1.google.cloud.notebooks.v1.DeleteExecut" + + "ionRequest\032\035.google.longrunning.Operatio" + + "n\"j\202\323\344\223\0020*./v1/{name=projects/*/location" + + "s/*/executions/*}\332A\004name\312A*\n\025google.prot" + + "obuf.Empty\022\021OperationMetadata\022\350\001\n\017Create" + + "Execution\0221.google.cloud.notebooks.v1.Cr" + + "eateExecutionRequest\032\035.google.longrunnin" + + "g.Operation\"\202\001\202\323\344\223\002;\"./v1/{parent=projec" + + "ts/*/locations/*}/executions:\texecution\332" + + "A\035parent,execution,execution_id\312A\036\n\tExec" + + "ution\022\021OperationMetadata\032L\312A\030notebooks.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformB\314\001\n\035com.google.cl" + + "oud.notebooks.v1B\016NotebooksProtoP\001ZBgoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "notebooks/v1;notebooks\252\002\031Google.Cloud.No" + + "tebooks.V1\312\002\031Google\\Cloud\\Notebooks\\V1\352\002" + + "\034Google::Cloud::Notebooks::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.notebooks.v1.EnvironmentProto.getDescriptor(), + com.google.cloud.notebooks.v1.ExecutionProto.getDescriptor(), + com.google.cloud.notebooks.v1.InstanceProto.getDescriptor(), + com.google.cloud.notebooks.v1.InstanceConfigProto.getDescriptor(), + com.google.cloud.notebooks.v1.ScheduleProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_notebooks_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + "Endpoint", + }); + internal_static_google_cloud_notebooks_v1_ListInstancesRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_notebooks_v1_ListInstancesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListInstancesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_notebooks_v1_ListInstancesResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_notebooks_v1_ListInstancesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListInstancesResponse_descriptor, + new java.lang.String[] { + "Instances", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_notebooks_v1_GetInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_notebooks_v1_GetInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_GetInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_CreateInstanceRequest_descriptor, + new java.lang.String[] { + "Parent", "InstanceId", "Instance", + }); + internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_descriptor, + new java.lang.String[] { + "Parent", "InstanceId", + }); + internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_descriptor, + new java.lang.String[] { + "Name", "Type", "CoreCount", + }); + internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_descriptor, + new java.lang.String[] { + "Name", "MachineType", + }); + internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_descriptor, + new java.lang.String[] { + "Name", "Config", + }); + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_descriptor, + new java.lang.String[] { + "Name", "Labels", + }); + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_LabelsEntry_descriptor = + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_descriptor, + new java.lang.String[] { + "Name", "ShieldedInstanceConfig", + }); + internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_DeleteInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_StartInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_notebooks_v1_StartInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_StartInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_StopInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_notebooks_v1_StopInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_StopInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_descriptor, + new java.lang.String[] { + "Name", "VmId", "Metadata", + }); + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_MetadataEntry_descriptor = + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_MetadataEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_MetadataEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableRequest_descriptor, + new java.lang.String[] { + "NotebookInstance", + }); + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_IsInstanceUpgradeableResponse_descriptor, + new java.lang.String[] { + "Upgradeable", "UpgradeVersion", "UpgradeInfo", "UpgradeImage", + }); + internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_GetInstanceHealthRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_descriptor, + new java.lang.String[] { + "HealthState", "HealthInfo", + }); + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_HealthInfoEntry_descriptor = + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_HealthInfoEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_GetInstanceHealthResponse_HealthInfoEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_descriptor, + new java.lang.String[] { + "Name", "TargetSnapshot", + }); + internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_descriptor, + new java.lang.String[] { + "Name", "VmId", + }); + internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListEnvironmentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListEnvironmentsResponse_descriptor, + new java.lang.String[] { + "Environments", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_GetEnvironmentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_CreateEnvironmentRequest_descriptor, + new java.lang.String[] { + "Parent", "EnvironmentId", "Environment", + }); + internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_DeleteEnvironmentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListSchedulesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListSchedulesResponse_descriptor, + new java.lang.String[] { + "Schedules", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_notebooks_v1_GetScheduleRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_notebooks_v1_GetScheduleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_GetScheduleRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_DeleteScheduleRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_CreateScheduleRequest_descriptor, + new java.lang.String[] { + "Parent", "ScheduleId", "Schedule", + }); + internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListExecutionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_ListExecutionsResponse_descriptor, + new java.lang.String[] { + "Executions", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_notebooks_v1_GetExecutionRequest_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_notebooks_v1_GetExecutionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_GetExecutionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_DeleteExecutionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_CreateExecutionRequest_descriptor, + new java.lang.String[] { + "Parent", "ExecutionId", "Execution", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.notebooks.v1.EnvironmentProto.getDescriptor(); + com.google.cloud.notebooks.v1.ExecutionProto.getDescriptor(); + com.google.cloud.notebooks.v1.InstanceProto.getDescriptor(); + com.google.cloud.notebooks.v1.InstanceConfigProto.getDescriptor(); + com.google.cloud.notebooks.v1.ScheduleProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/OperationMetadata.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/OperationMetadata.java new file mode 100644 index 00000000..48d61412 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/OperationMetadata.java @@ -0,0 +1,1993 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + endpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + verb_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + statusMessage_ = s; + break; + } + case 48: + { + requestedCancellation_ = input.readBool(); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiVersion_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + endpoint_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.OperationMetadata.class, + com.google.cloud.notebooks.v1.OperationMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TARGET_FIELD_NUMBER = 3; + private volatile java.lang.Object target_; + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + private volatile java.lang.Object verb_; + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object statusMessage_; + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_; + /** + * + * + *
+   * Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object apiVersion_; + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_FIELD_NUMBER = 8; + private volatile java.lang.Object endpoint_; + /** + * + * + *
+   * API endpoint name of this operation.
+   * 
+ * + * string endpoint = 8; + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * API endpoint name of this operation.
+   * 
+ * + * string endpoint = 8; + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!getVerbBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!getStatusMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + if (!getEndpointBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, endpoint_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!getVerbBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!getStatusMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!getApiVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + if (!getEndpointBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, endpoint_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.OperationMetadata other = + (com.google.cloud.notebooks.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.OperationMetadata) + com.google.cloud.notebooks.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.OperationMetadata.class, + com.google.cloud.notebooks.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + target_ = ""; + + verb_ = ""; + + statusMessage_ = ""; + + requestedCancellation_ = false; + + apiVersion_ = ""; + + endpoint_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.OperationMetadata build() { + com.google.cloud.notebooks.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.OperationMetadata buildPartial() { + com.google.cloud.notebooks.v1.OperationMetadata result = + new com.google.cloud.notebooks.v1.OperationMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.target_ = target_; + result.verb_ = verb_; + result.statusMessage_ = statusMessage_; + result.requestedCancellation_ = requestedCancellation_; + result.apiVersion_ = apiVersion_; + result.endpoint_ = endpoint_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.notebooks.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.OperationMetadata other) { + if (other == com.google.cloud.notebooks.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + onChanged(); + } + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + * + * + *
+     * Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + verb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + + verb_ = getDefaultInstance().getVerb(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + verb_ = value; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + statusMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + + statusMessage_ = getDefaultInstance().getStatusMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + statusMessage_ = value; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + + apiVersion_ = getDefaultInstance().getApiVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * API version used to start the operation.
+     * 
+ * + * string api_version = 7; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * API endpoint name of this operation.
+     * 
+ * + * string endpoint = 8; + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * API endpoint name of this operation.
+     * 
+ * + * string endpoint = 8; + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * API endpoint name of this operation.
+     * 
+ * + * string endpoint = 8; + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * API endpoint name of this operation.
+     * 
+ * + * string endpoint = 8; + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + + endpoint_ = getDefaultInstance().getEndpoint(); + onChanged(); + return this; + } + /** + * + * + *
+     * API endpoint name of this operation.
+     * 
+ * + * string endpoint = 8; + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endpoint_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.OperationMetadata) + private static final com.google.cloud.notebooks.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.OperationMetadata(); + } + + public static com.google.cloud.notebooks.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..0c28eaff --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,236 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * API version used to start the operation.
+   * 
+ * + * string api_version = 7; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); + + /** + * + * + *
+   * API endpoint name of this operation.
+   * 
+ * + * string endpoint = 8; + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * API endpoint name of this operation.
+   * 
+ * + * string endpoint = 8; + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RegisterInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RegisterInstanceRequest.java new file mode 100644 index 00000000..f3d485c7 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RegisterInstanceRequest.java @@ -0,0 +1,844 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for registering a notebook instance.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RegisterInstanceRequest} + */ +public final class RegisterInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.RegisterInstanceRequest) + RegisterInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RegisterInstanceRequest.newBuilder() to construct. + private RegisterInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RegisterInstanceRequest() { + parent_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RegisterInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RegisterInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RegisterInstanceRequest.class, + com.google.cloud.notebooks.v1.RegisterInstanceRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceId_; + /** + * + * + *
+   * Required. User defined unique ID of this instance. The `instance_id` must
+   * be 1 to 63 characters long and contain only lowercase letters,
+   * numeric characters, and dashes. The first character must be a lowercase
+   * letter and the last character cannot be a dash.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. User defined unique ID of this instance. The `instance_id` must
+   * be 1 to 63 characters long and contain only lowercase letters,
+   * numeric characters, and dashes. The first character must be a lowercase
+   * letter and the last character cannot be a dash.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getInstanceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getInstanceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.RegisterInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.RegisterInstanceRequest other = + (com.google.cloud.notebooks.v1.RegisterInstanceRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.RegisterInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for registering a notebook instance.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RegisterInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.RegisterInstanceRequest) + com.google.cloud.notebooks.v1.RegisterInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RegisterInstanceRequest.class, + com.google.cloud.notebooks.v1.RegisterInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.RegisterInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + instanceId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RegisterInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RegisterInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.RegisterInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RegisterInstanceRequest build() { + com.google.cloud.notebooks.v1.RegisterInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RegisterInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.RegisterInstanceRequest result = + new com.google.cloud.notebooks.v1.RegisterInstanceRequest(this); + result.parent_ = parent_; + result.instanceId_ = instanceId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.RegisterInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.RegisterInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.RegisterInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.RegisterInstanceRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.RegisterInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.RegisterInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Required. User defined unique ID of this instance. The `instance_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. User defined unique ID of this instance. The `instance_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. User defined unique ID of this instance. The `instance_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User defined unique ID of this instance. The `instance_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + + instanceId_ = getDefaultInstance().getInstanceId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. User defined unique ID of this instance. The `instance_id` must
+     * be 1 to 63 characters long and contain only lowercase letters,
+     * numeric characters, and dashes. The first character must be a lowercase
+     * letter and the last character cannot be a dash.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.RegisterInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.RegisterInstanceRequest) + private static final com.google.cloud.notebooks.v1.RegisterInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.RegisterInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.RegisterInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RegisterInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RegisterInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RegisterInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RegisterInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RegisterInstanceRequestOrBuilder.java new file mode 100644 index 00000000..01b5260f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RegisterInstanceRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface RegisterInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.RegisterInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User defined unique ID of this instance. The `instance_id` must
+   * be 1 to 63 characters long and contain only lowercase letters,
+   * numeric characters, and dashes. The first character must be a lowercase
+   * letter and the last character cannot be a dash.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Required. User defined unique ID of this instance. The `instance_id` must
+   * be 1 to 63 characters long and contain only lowercase letters,
+   * numeric characters, and dashes. The first character must be a lowercase
+   * letter and the last character cannot be a dash.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportInstanceInfoRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportInstanceInfoRequest.java new file mode 100644 index 00000000..044b7d81 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportInstanceInfoRequest.java @@ -0,0 +1,1169 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for notebook instances to report information to Notebooks API.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ReportInstanceInfoRequest} + */ +public final class ReportInstanceInfoRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ReportInstanceInfoRequest) + ReportInstanceInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportInstanceInfoRequest.newBuilder() to construct. + private ReportInstanceInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportInstanceInfoRequest() { + name_ = ""; + vmId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportInstanceInfoRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReportInstanceInfoRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmId_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metadata_ = + com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest.class, + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object vmId_; + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + @java.lang.Override + public java.lang.String getVmId() { + java.lang.Object ref = vmId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmIdBytes() { + java.lang.Object ref = vmId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 3; + + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + @java.lang.Override + public java.lang.String getMetadataOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getVmIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vmId_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getVmIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vmId_); + } + for (java.util.Map.Entry entry : + internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry metadata__ = + MetadataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, metadata__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ReportInstanceInfoRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest other = + (com.google.cloud.notebooks.v1.ReportInstanceInfoRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVmId().equals(other.getVmId())) return false; + if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VM_ID_FIELD_NUMBER; + hash = (53 * hash) + getVmId().hashCode(); + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for notebook instances to report information to Notebooks API.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ReportInstanceInfoRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ReportInstanceInfoRequest) + com.google.cloud.notebooks.v1.ReportInstanceInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableMetadata(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest.class, + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ReportInstanceInfoRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + vmId_ = ""; + + internalGetMutableMetadata().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportInstanceInfoRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReportInstanceInfoRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ReportInstanceInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReportInstanceInfoRequest build() { + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReportInstanceInfoRequest buildPartial() { + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest result = + new com.google.cloud.notebooks.v1.ReportInstanceInfoRequest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.vmId_ = vmId_; + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ReportInstanceInfoRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ReportInstanceInfoRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ReportInstanceInfoRequest other) { + if (other == com.google.cloud.notebooks.v1.ReportInstanceInfoRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVmId().isEmpty()) { + vmId_ = other.vmId_; + onChanged(); + } + internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ReportInstanceInfoRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ReportInstanceInfoRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object vmId_ = ""; + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + public java.lang.String getVmId() { + java.lang.Object ref = vmId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + public com.google.protobuf.ByteString getVmIdBytes() { + java.lang.Object ref = vmId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vmId to set. + * @return This builder for chaining. + */ + public Builder setVmId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVmId() { + + vmId_ = getDefaultInstance().getVmId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vmId to set. + * @return This builder for chaining. + */ + public Builder setVmIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + private com.google.protobuf.MapField + internalGetMutableMetadata() { + onChanged(); + ; + if (metadata_ == null) { + metadata_ = + com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+     * The metadata reported to Notebooks API. This will be merged to the instance
+     * metadata store
+     * 
+ * + * map<string, string> metadata = 3; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+     * The metadata reported to Notebooks API. This will be merged to the instance
+     * metadata store
+     * 
+ * + * map<string, string> metadata = 3; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+     * The metadata reported to Notebooks API. This will be merged to the instance
+     * metadata store
+     * 
+ * + * map<string, string> metadata = 3; + */ + @java.lang.Override + public java.lang.String getMetadataOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The metadata reported to Notebooks API. This will be merged to the instance
+     * metadata store
+     * 
+ * + * map<string, string> metadata = 3; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + internalGetMutableMetadata().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The metadata reported to Notebooks API. This will be merged to the instance
+     * metadata store
+     * 
+ * + * map<string, string> metadata = 3; + */ + public Builder removeMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableMetadata().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetadata() { + return internalGetMutableMetadata().getMutableMap(); + } + /** + * + * + *
+     * The metadata reported to Notebooks API. This will be merged to the instance
+     * metadata store
+     * 
+ * + * map<string, string> metadata = 3; + */ + public Builder putMetadata(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableMetadata().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The metadata reported to Notebooks API. This will be merged to the instance
+     * metadata store
+     * 
+ * + * map<string, string> metadata = 3; + */ + public Builder putAllMetadata(java.util.Map values) { + internalGetMutableMetadata().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ReportInstanceInfoRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ReportInstanceInfoRequest) + private static final com.google.cloud.notebooks.v1.ReportInstanceInfoRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ReportInstanceInfoRequest(); + } + + public static com.google.cloud.notebooks.v1.ReportInstanceInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportInstanceInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReportInstanceInfoRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReportInstanceInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportInstanceInfoRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportInstanceInfoRequestOrBuilder.java new file mode 100644 index 00000000..c8bfab63 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportInstanceInfoRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ReportInstanceInfoRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ReportInstanceInfoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + java.lang.String getVmId(); + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + com.google.protobuf.ByteString getVmIdBytes(); + + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + int getMetadataCount(); + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + boolean containsMetadata(java.lang.String key); + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetadata(); + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + java.util.Map getMetadataMap(); + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * The metadata reported to Notebooks API. This will be merged to the instance
+   * metadata store
+   * 
+ * + * map<string, string> metadata = 3; + */ + java.lang.String getMetadataOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportRuntimeEventRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportRuntimeEventRequest.java new file mode 100644 index 00000000..c6d5d8a9 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportRuntimeEventRequest.java @@ -0,0 +1,1127 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for reporting a Managed Notebook Event.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ReportRuntimeEventRequest} + */ +public final class ReportRuntimeEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ReportRuntimeEventRequest) + ReportRuntimeEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportRuntimeEventRequest.newBuilder() to construct. + private ReportRuntimeEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportRuntimeEventRequest() { + name_ = ""; + vmId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReportRuntimeEventRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReportRuntimeEventRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmId_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.Event.Builder subBuilder = null; + if (event_ != null) { + subBuilder = event_.toBuilder(); + } + event_ = + input.readMessage( + com.google.cloud.notebooks.v1.Event.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(event_); + event_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest.class, + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object vmId_; + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + @java.lang.Override + public java.lang.String getVmId() { + java.lang.Object ref = vmId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmIdBytes() { + java.lang.Object ref = vmId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.Event event_; + /** + * + * + *
+   * Required. The Event to be reported.
+   * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return event_ != null; + } + /** + * + * + *
+   * Required. The Event to be reported.
+   * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The event. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Event getEvent() { + return event_ == null ? com.google.cloud.notebooks.v1.Event.getDefaultInstance() : event_; + } + /** + * + * + *
+   * Required. The Event to be reported.
+   * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.EventOrBuilder getEventOrBuilder() { + return getEvent(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getVmIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vmId_); + } + if (event_ != null) { + output.writeMessage(3, getEvent()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getVmIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vmId_); + } + if (event_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEvent()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ReportRuntimeEventRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest other = + (com.google.cloud.notebooks.v1.ReportRuntimeEventRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVmId().equals(other.getVmId())) return false; + if (hasEvent() != other.hasEvent()) return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VM_ID_FIELD_NUMBER; + hash = (53 * hash) + getVmId().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for reporting a Managed Notebook Event.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ReportRuntimeEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ReportRuntimeEventRequest) + com.google.cloud.notebooks.v1.ReportRuntimeEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest.class, + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ReportRuntimeEventRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + vmId_ = ""; + + if (eventBuilder_ == null) { + event_ = null; + } else { + event_ = null; + eventBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ReportRuntimeEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReportRuntimeEventRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ReportRuntimeEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReportRuntimeEventRequest build() { + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReportRuntimeEventRequest buildPartial() { + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest result = + new com.google.cloud.notebooks.v1.ReportRuntimeEventRequest(this); + result.name_ = name_; + result.vmId_ = vmId_; + if (eventBuilder_ == null) { + result.event_ = event_; + } else { + result.event_ = eventBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ReportRuntimeEventRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ReportRuntimeEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ReportRuntimeEventRequest other) { + if (other == com.google.cloud.notebooks.v1.ReportRuntimeEventRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVmId().isEmpty()) { + vmId_ = other.vmId_; + onChanged(); + } + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ReportRuntimeEventRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ReportRuntimeEventRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object vmId_ = ""; + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + public java.lang.String getVmId() { + java.lang.Object ref = vmId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + public com.google.protobuf.ByteString getVmIdBytes() { + java.lang.Object ref = vmId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vmId to set. + * @return This builder for chaining. + */ + public Builder setVmId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVmId() { + + vmId_ = getDefaultInstance().getVmId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vmId to set. + * @return This builder for chaining. + */ + public Builder setVmIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.Event event_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Event, + com.google.cloud.notebooks.v1.Event.Builder, + com.google.cloud.notebooks.v1.EventOrBuilder> + eventBuilder_; + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return eventBuilder_ != null || event_ != null; + } + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The event. + */ + public com.google.cloud.notebooks.v1.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? com.google.cloud.notebooks.v1.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEvent(com.google.cloud.notebooks.v1.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + onChanged(); + } else { + eventBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEvent(com.google.cloud.notebooks.v1.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + onChanged(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEvent(com.google.cloud.notebooks.v1.Event value) { + if (eventBuilder_ == null) { + if (event_ != null) { + event_ = + com.google.cloud.notebooks.v1.Event.newBuilder(event_) + .mergeFrom(value) + .buildPartial(); + } else { + event_ = value; + } + onChanged(); + } else { + eventBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEvent() { + if (eventBuilder_ == null) { + event_ = null; + onChanged(); + } else { + event_ = null; + eventBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.Event.Builder getEventBuilder() { + + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? com.google.cloud.notebooks.v1.Event.getDefaultInstance() : event_; + } + } + /** + * + * + *
+     * Required. The Event to be reported.
+     * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Event, + com.google.cloud.notebooks.v1.Event.Builder, + com.google.cloud.notebooks.v1.EventOrBuilder> + getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Event, + com.google.cloud.notebooks.v1.Event.Builder, + com.google.cloud.notebooks.v1.EventOrBuilder>( + getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ReportRuntimeEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ReportRuntimeEventRequest) + private static final com.google.cloud.notebooks.v1.ReportRuntimeEventRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ReportRuntimeEventRequest(); + } + + public static com.google.cloud.notebooks.v1.ReportRuntimeEventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportRuntimeEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReportRuntimeEventRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReportRuntimeEventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportRuntimeEventRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportRuntimeEventRequestOrBuilder.java new file mode 100644 index 00000000..a5470912 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReportRuntimeEventRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface ReportRuntimeEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ReportRuntimeEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + java.lang.String getVmId(); + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + com.google.protobuf.ByteString getVmIdBytes(); + + /** + * + * + *
+   * Required. The Event to be reported.
+   * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the event field is set. + */ + boolean hasEvent(); + /** + * + * + *
+   * Required. The Event to be reported.
+   * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The event. + */ + com.google.cloud.notebooks.v1.Event getEvent(); + /** + * + * + *
+   * Required. The Event to be reported.
+   * 
+ * + * .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.notebooks.v1.EventOrBuilder getEventOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReservationAffinity.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReservationAffinity.java new file mode 100644 index 00000000..ad158571 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReservationAffinity.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/instance.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Reservation Affinity for consuming Zonal reservation.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ReservationAffinity} + */ +public final class ReservationAffinity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ReservationAffinity) + ReservationAffinityOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReservationAffinity.newBuilder() to construct. + private ReservationAffinity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReservationAffinity() { + consumeReservationType_ = 0; + key_ = ""; + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReservationAffinity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReservationAffinity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + consumeReservationType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = values_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_ReservationAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_ReservationAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ReservationAffinity.class, + com.google.cloud.notebooks.v1.ReservationAffinity.Builder.class); + } + + /** + * + * + *
+   * Indicates whether to consume capacity from an reservation or not.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.ReservationAffinity.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Do not consume from any allocated capacity.
+     * 
+ * + * NO_RESERVATION = 1; + */ + NO_RESERVATION(1), + /** + * + * + *
+     * Consume any reservation available.
+     * 
+ * + * ANY_RESERVATION = 2; + */ + ANY_RESERVATION(2), + /** + * + * + *
+     * Must consume from a specific reservation. Must specify key value fields
+     * for specifying the reservations.
+     * 
+ * + * SPECIFIC_RESERVATION = 3; + */ + SPECIFIC_RESERVATION(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Do not consume from any allocated capacity.
+     * 
+ * + * NO_RESERVATION = 1; + */ + public static final int NO_RESERVATION_VALUE = 1; + /** + * + * + *
+     * Consume any reservation available.
+     * 
+ * + * ANY_RESERVATION = 2; + */ + public static final int ANY_RESERVATION_VALUE = 2; + /** + * + * + *
+     * Must consume from a specific reservation. Must specify key value fields
+     * for specifying the reservations.
+     * 
+ * + * SPECIFIC_RESERVATION = 3; + */ + public static final int SPECIFIC_RESERVATION_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return NO_RESERVATION; + case 2: + return ANY_RESERVATION; + case 3: + return SPECIFIC_RESERVATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ReservationAffinity.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.ReservationAffinity.Type) + } + + public static final int CONSUME_RESERVATION_TYPE_FIELD_NUMBER = 1; + private int consumeReservationType_; + /** + * + * + *
+   * Optional. Type of reservation to consume
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for consumeReservationType. + */ + @java.lang.Override + public int getConsumeReservationTypeValue() { + return consumeReservationType_; + } + /** + * + * + *
+   * Optional. Type of reservation to consume
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The consumeReservationType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ReservationAffinity.Type getConsumeReservationType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.ReservationAffinity.Type result = + com.google.cloud.notebooks.v1.ReservationAffinity.Type.valueOf(consumeReservationType_); + return result == null + ? com.google.cloud.notebooks.v1.ReservationAffinity.Type.UNRECOGNIZED + : result; + } + + public static final int KEY_FIELD_NUMBER = 2; + private volatile java.lang.Object key_; + /** + * + * + *
+   * Optional. Corresponds to the label key of reservation resource.
+   * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Corresponds to the label key of reservation resource.
+   * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList values_; + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (consumeReservationType_ + != com.google.cloud.notebooks.v1.ReservationAffinity.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, consumeReservationType_); + } + if (!getKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); + } + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, values_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consumeReservationType_ + != com.google.cloud.notebooks.v1.ReservationAffinity.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, consumeReservationType_); + } + if (!getKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); + } + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ReservationAffinity)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ReservationAffinity other = + (com.google.cloud.notebooks.v1.ReservationAffinity) obj; + + if (consumeReservationType_ != other.consumeReservationType_) return false; + if (!getKey().equals(other.getKey())) return false; + if (!getValuesList().equals(other.getValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONSUME_RESERVATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + consumeReservationType_; + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ReservationAffinity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Reservation Affinity for consuming Zonal reservation.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ReservationAffinity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ReservationAffinity) + com.google.cloud.notebooks.v1.ReservationAffinityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_ReservationAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_ReservationAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ReservationAffinity.class, + com.google.cloud.notebooks.v1.ReservationAffinity.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ReservationAffinity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + consumeReservationType_ = 0; + + key_ = ""; + + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.InstanceProto + .internal_static_google_cloud_notebooks_v1_ReservationAffinity_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReservationAffinity getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReservationAffinity build() { + com.google.cloud.notebooks.v1.ReservationAffinity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReservationAffinity buildPartial() { + com.google.cloud.notebooks.v1.ReservationAffinity result = + new com.google.cloud.notebooks.v1.ReservationAffinity(this); + int from_bitField0_ = bitField0_; + result.consumeReservationType_ = consumeReservationType_; + result.key_ = key_; + if (((bitField0_ & 0x00000001) != 0)) { + values_ = values_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ReservationAffinity) { + return mergeFrom((com.google.cloud.notebooks.v1.ReservationAffinity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ReservationAffinity other) { + if (other == com.google.cloud.notebooks.v1.ReservationAffinity.getDefaultInstance()) + return this; + if (other.consumeReservationType_ != 0) { + setConsumeReservationTypeValue(other.getConsumeReservationTypeValue()); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ReservationAffinity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ReservationAffinity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int consumeReservationType_ = 0; + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for consumeReservationType. + */ + @java.lang.Override + public int getConsumeReservationTypeValue() { + return consumeReservationType_; + } + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for consumeReservationType to set. + * @return This builder for chaining. + */ + public Builder setConsumeReservationTypeValue(int value) { + + consumeReservationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The consumeReservationType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ReservationAffinity.Type getConsumeReservationType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.ReservationAffinity.Type result = + com.google.cloud.notebooks.v1.ReservationAffinity.Type.valueOf(consumeReservationType_); + return result == null + ? com.google.cloud.notebooks.v1.ReservationAffinity.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The consumeReservationType to set. + * @return This builder for chaining. + */ + public Builder setConsumeReservationType( + com.google.cloud.notebooks.v1.ReservationAffinity.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + consumeReservationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of reservation to consume
+     * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearConsumeReservationType() { + + consumeReservationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label key of reservation resource.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList values_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Corresponds to the label values of reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ReservationAffinity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ReservationAffinity) + private static final com.google.cloud.notebooks.v1.ReservationAffinity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ReservationAffinity(); + } + + public static com.google.cloud.notebooks.v1.ReservationAffinity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReservationAffinity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReservationAffinity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ReservationAffinity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReservationAffinityOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReservationAffinityOrBuilder.java new file mode 100644 index 00000000..2a35608e --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ReservationAffinityOrBuilder.java @@ -0,0 +1,130 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/instance.proto + +package com.google.cloud.notebooks.v1; + +public interface ReservationAffinityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ReservationAffinity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Type of reservation to consume
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for consumeReservationType. + */ + int getConsumeReservationTypeValue(); + /** + * + * + *
+   * Optional. Type of reservation to consume
+   * 
+ * + * + * .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The consumeReservationType. + */ + com.google.cloud.notebooks.v1.ReservationAffinity.Type getConsumeReservationType(); + + /** + * + * + *
+   * Optional. Corresponds to the label key of reservation resource.
+   * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * Optional. Corresponds to the label key of reservation resource.
+   * 
+ * + * string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+   * Optional. Corresponds to the label values of reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetInstanceRequest.java new file mode 100644 index 00000000..e8e50d92 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetInstanceRequest.java @@ -0,0 +1,643 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for reseting a notebook instance
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ResetInstanceRequest} + */ +public final class ResetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ResetInstanceRequest) + ResetInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResetInstanceRequest.newBuilder() to construct. + private ResetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResetInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResetInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ResetInstanceRequest.class, + com.google.cloud.notebooks.v1.ResetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ResetInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ResetInstanceRequest other = + (com.google.cloud.notebooks.v1.ResetInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ResetInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for reseting a notebook instance
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ResetInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ResetInstanceRequest) + com.google.cloud.notebooks.v1.ResetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ResetInstanceRequest.class, + com.google.cloud.notebooks.v1.ResetInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ResetInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ResetInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ResetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ResetInstanceRequest build() { + com.google.cloud.notebooks.v1.ResetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ResetInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.ResetInstanceRequest result = + new com.google.cloud.notebooks.v1.ResetInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ResetInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ResetInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ResetInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.ResetInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ResetInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ResetInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ResetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ResetInstanceRequest) + private static final com.google.cloud.notebooks.v1.ResetInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ResetInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.ResetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResetInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResetInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ResetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetInstanceRequestOrBuilder.java new file mode 100644 index 00000000..a77db1c5 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface ResetInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ResetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetRuntimeRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetRuntimeRequest.java new file mode 100644 index 00000000..b3f55080 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetRuntimeRequest.java @@ -0,0 +1,643 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for reseting a Managed Notebook Runtime.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ResetRuntimeRequest} + */ +public final class ResetRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.ResetRuntimeRequest) + ResetRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResetRuntimeRequest.newBuilder() to construct. + private ResetRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResetRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResetRuntimeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResetRuntimeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ResetRuntimeRequest.class, + com.google.cloud.notebooks.v1.ResetRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.ResetRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.ResetRuntimeRequest other = + (com.google.cloud.notebooks.v1.ResetRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.ResetRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for reseting a Managed Notebook Runtime.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.ResetRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.ResetRuntimeRequest) + com.google.cloud.notebooks.v1.ResetRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.ResetRuntimeRequest.class, + com.google.cloud.notebooks.v1.ResetRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.ResetRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_ResetRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ResetRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.ResetRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ResetRuntimeRequest build() { + com.google.cloud.notebooks.v1.ResetRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ResetRuntimeRequest buildPartial() { + com.google.cloud.notebooks.v1.ResetRuntimeRequest result = + new com.google.cloud.notebooks.v1.ResetRuntimeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.ResetRuntimeRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.ResetRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.ResetRuntimeRequest other) { + if (other == com.google.cloud.notebooks.v1.ResetRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.ResetRuntimeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.ResetRuntimeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.ResetRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.ResetRuntimeRequest) + private static final com.google.cloud.notebooks.v1.ResetRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.ResetRuntimeRequest(); + } + + public static com.google.cloud.notebooks.v1.ResetRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResetRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResetRuntimeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.ResetRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetRuntimeRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetRuntimeRequestOrBuilder.java new file mode 100644 index 00000000..0002c38b --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ResetRuntimeRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface ResetRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.ResetRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RollbackInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RollbackInstanceRequest.java new file mode 100644 index 00000000..1b8f13ab --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RollbackInstanceRequest.java @@ -0,0 +1,830 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for rollbacking a notebook instance
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RollbackInstanceRequest} + */ +public final class RollbackInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.RollbackInstanceRequest) + RollbackInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RollbackInstanceRequest.newBuilder() to construct. + private RollbackInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RollbackInstanceRequest() { + name_ = ""; + targetSnapshot_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RollbackInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RollbackInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetSnapshot_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RollbackInstanceRequest.class, + com.google.cloud.notebooks.v1.RollbackInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_SNAPSHOT_FIELD_NUMBER = 2; + private volatile java.lang.Object targetSnapshot_; + /** + * + * + *
+   * Required. The snapshot for rollback.
+   * Example: "projects/test-project/global/snapshots/krwlzipynril".
+   * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetSnapshot. + */ + @java.lang.Override + public java.lang.String getTargetSnapshot() { + java.lang.Object ref = targetSnapshot_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetSnapshot_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The snapshot for rollback.
+   * Example: "projects/test-project/global/snapshots/krwlzipynril".
+   * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetSnapshot. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetSnapshotBytes() { + java.lang.Object ref = targetSnapshot_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetSnapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getTargetSnapshotBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetSnapshot_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getTargetSnapshotBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetSnapshot_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.RollbackInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.RollbackInstanceRequest other = + (com.google.cloud.notebooks.v1.RollbackInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTargetSnapshot().equals(other.getTargetSnapshot())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TARGET_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getTargetSnapshot().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.RollbackInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for rollbacking a notebook instance
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RollbackInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.RollbackInstanceRequest) + com.google.cloud.notebooks.v1.RollbackInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RollbackInstanceRequest.class, + com.google.cloud.notebooks.v1.RollbackInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.RollbackInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + targetSnapshot_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_RollbackInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RollbackInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.RollbackInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RollbackInstanceRequest build() { + com.google.cloud.notebooks.v1.RollbackInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RollbackInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.RollbackInstanceRequest result = + new com.google.cloud.notebooks.v1.RollbackInstanceRequest(this); + result.name_ = name_; + result.targetSnapshot_ = targetSnapshot_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.RollbackInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.RollbackInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.RollbackInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.RollbackInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getTargetSnapshot().isEmpty()) { + targetSnapshot_ = other.targetSnapshot_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.RollbackInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.RollbackInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetSnapshot_ = ""; + /** + * + * + *
+     * Required. The snapshot for rollback.
+     * Example: "projects/test-project/global/snapshots/krwlzipynril".
+     * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetSnapshot. + */ + public java.lang.String getTargetSnapshot() { + java.lang.Object ref = targetSnapshot_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetSnapshot_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The snapshot for rollback.
+     * Example: "projects/test-project/global/snapshots/krwlzipynril".
+     * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetSnapshot. + */ + public com.google.protobuf.ByteString getTargetSnapshotBytes() { + java.lang.Object ref = targetSnapshot_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetSnapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The snapshot for rollback.
+     * Example: "projects/test-project/global/snapshots/krwlzipynril".
+     * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The targetSnapshot to set. + * @return This builder for chaining. + */ + public Builder setTargetSnapshot(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetSnapshot_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The snapshot for rollback.
+     * Example: "projects/test-project/global/snapshots/krwlzipynril".
+     * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTargetSnapshot() { + + targetSnapshot_ = getDefaultInstance().getTargetSnapshot(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The snapshot for rollback.
+     * Example: "projects/test-project/global/snapshots/krwlzipynril".
+     * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for targetSnapshot to set. + * @return This builder for chaining. + */ + public Builder setTargetSnapshotBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetSnapshot_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.RollbackInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.RollbackInstanceRequest) + private static final com.google.cloud.notebooks.v1.RollbackInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.RollbackInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.RollbackInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollbackInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RollbackInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RollbackInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RollbackInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RollbackInstanceRequestOrBuilder.java new file mode 100644 index 00000000..b015b944 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RollbackInstanceRequestOrBuilder.java @@ -0,0 +1,79 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface RollbackInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.RollbackInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The snapshot for rollback.
+   * Example: "projects/test-project/global/snapshots/krwlzipynril".
+   * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetSnapshot. + */ + java.lang.String getTargetSnapshot(); + /** + * + * + *
+   * Required. The snapshot for rollback.
+   * Example: "projects/test-project/global/snapshots/krwlzipynril".
+   * 
+ * + * string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetSnapshot. + */ + com.google.protobuf.ByteString getTargetSnapshotBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Runtime.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Runtime.java new file mode 100644 index 00000000..5b82c16f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Runtime.java @@ -0,0 +1,3273 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of a Runtime for a managed notebook instance.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Runtime} + */ +public final class Runtime extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Runtime) + RuntimeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Runtime.newBuilder() to construct. + private Runtime(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Runtime() { + name_ = ""; + state_ = 0; + healthState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Runtime(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Runtime( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.notebooks.v1.VirtualMachine.Builder subBuilder = null; + if (runtimeTypeCase_ == 2) { + subBuilder = + ((com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_).toBuilder(); + } + runtimeType_ = + input.readMessage( + com.google.cloud.notebooks.v1.VirtualMachine.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_); + runtimeType_ = subBuilder.buildPartial(); + } + runtimeTypeCase_ = 2; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + healthState_ = rawValue; + break; + } + case 42: + { + com.google.cloud.notebooks.v1.RuntimeAccessConfig.Builder subBuilder = null; + if (accessConfig_ != null) { + subBuilder = accessConfig_.toBuilder(); + } + accessConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.RuntimeAccessConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(accessConfig_); + accessConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder subBuilder = null; + if (softwareConfig_ != null) { + subBuilder = softwareConfig_.toBuilder(); + } + softwareConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(softwareConfig_); + softwareConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.notebooks.v1.RuntimeMetrics.Builder subBuilder = null; + if (metrics_ != null) { + subBuilder = metrics_.toBuilder(); + } + metrics_ = + input.readMessage( + com.google.cloud.notebooks.v1.RuntimeMetrics.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metrics_); + metrics_ = subBuilder.buildPartial(); + } + + break; + } + case 162: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 170: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_Runtime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_Runtime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Runtime.class, + com.google.cloud.notebooks.v1.Runtime.Builder.class); + } + + /** + * + * + *
+   * The definition of the states of this runtime.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Runtime.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The compute layer is starting the runtime. It is not ready for use.
+     * 
+ * + * STARTING = 1; + */ + STARTING(1), + /** + * + * + *
+     * The compute layer is installing required frameworks and registering the
+     * runtime with notebook proxy. It cannot be used.
+     * 
+ * + * PROVISIONING = 2; + */ + PROVISIONING(2), + /** + * + * + *
+     * The runtime is currently running. It is ready for use.
+     * 
+ * + * ACTIVE = 3; + */ + ACTIVE(3), + /** + * + * + *
+     * The control logic is stopping the runtime. It cannot be used.
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The runtime is stopped. It cannot be used.
+     * 
+ * + * STOPPED = 5; + */ + STOPPED(5), + /** + * + * + *
+     * The runtime is being deleted. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + DELETING(6), + /** + * + * + *
+     * The runtime is upgrading. It cannot be used.
+     * 
+ * + * UPGRADING = 7; + */ + UPGRADING(7), + /** + * + * + *
+     * The runtime is being created and set up. It is not ready for use.
+     * 
+ * + * INITIALIZING = 8; + */ + INITIALIZING(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The compute layer is starting the runtime. It is not ready for use.
+     * 
+ * + * STARTING = 1; + */ + public static final int STARTING_VALUE = 1; + /** + * + * + *
+     * The compute layer is installing required frameworks and registering the
+     * runtime with notebook proxy. It cannot be used.
+     * 
+ * + * PROVISIONING = 2; + */ + public static final int PROVISIONING_VALUE = 2; + /** + * + * + *
+     * The runtime is currently running. It is ready for use.
+     * 
+ * + * ACTIVE = 3; + */ + public static final int ACTIVE_VALUE = 3; + /** + * + * + *
+     * The control logic is stopping the runtime. It cannot be used.
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + /** + * + * + *
+     * The runtime is stopped. It cannot be used.
+     * 
+ * + * STOPPED = 5; + */ + public static final int STOPPED_VALUE = 5; + /** + * + * + *
+     * The runtime is being deleted. It cannot be used.
+     * 
+ * + * DELETING = 6; + */ + public static final int DELETING_VALUE = 6; + /** + * + * + *
+     * The runtime is upgrading. It cannot be used.
+     * 
+ * + * UPGRADING = 7; + */ + public static final int UPGRADING_VALUE = 7; + /** + * + * + *
+     * The runtime is being created and set up. It is not ready for use.
+     * 
+ * + * INITIALIZING = 8; + */ + public static final int INITIALIZING_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STARTING; + case 2: + return PROVISIONING; + case 3: + return ACTIVE; + case 4: + return STOPPING; + case 5: + return STOPPED; + case 6: + return DELETING; + case 7: + return UPGRADING; + case 8: + return INITIALIZING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Runtime.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Runtime.State) + } + + /** + * + * + *
+   * The runtime substate.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Runtime.HealthState} + */ + public enum HealthState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The runtime substate is unknown.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + HEALTH_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The runtime is known to be in an healthy state
+     * (for example, critical daemons are running)
+     * Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + HEALTHY(1), + /** + * + * + *
+     * The runtime is known to be in an unhealthy state
+     * (for example, critical daemons are not running)
+     * Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + UNHEALTHY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The runtime substate is unknown.
+     * 
+ * + * HEALTH_STATE_UNSPECIFIED = 0; + */ + public static final int HEALTH_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The runtime is known to be in an healthy state
+     * (for example, critical daemons are running)
+     * Applies to ACTIVE state.
+     * 
+ * + * HEALTHY = 1; + */ + public static final int HEALTHY_VALUE = 1; + /** + * + * + *
+     * The runtime is known to be in an unhealthy state
+     * (for example, critical daemons are not running)
+     * Applies to ACTIVE state.
+     * 
+ * + * UNHEALTHY = 2; + */ + public static final int UNHEALTHY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HealthState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HealthState forNumber(int value) { + switch (value) { + case 0: + return HEALTH_STATE_UNSPECIFIED; + case 1: + return HEALTHY; + case 2: + return UNHEALTHY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HealthState findValueByNumber(int number) { + return HealthState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Runtime.getDescriptor().getEnumTypes().get(1); + } + + private static final HealthState[] VALUES = values(); + + public static HealthState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HealthState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Runtime.HealthState) + } + + private int runtimeTypeCase_ = 0; + private java.lang.Object runtimeType_; + + public enum RuntimeTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VIRTUAL_MACHINE(2), + RUNTIMETYPE_NOT_SET(0); + private final int value; + + private RuntimeTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RuntimeTypeCase valueOf(int value) { + return forNumber(value); + } + + public static RuntimeTypeCase forNumber(int value) { + switch (value) { + case 2: + return VIRTUAL_MACHINE; + case 0: + return RUNTIMETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RuntimeTypeCase getRuntimeTypeCase() { + return RuntimeTypeCase.forNumber(runtimeTypeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the runtime.
+   * Format:
+   * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the runtime.
+   * Format:
+   * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIRTUAL_MACHINE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return Whether the virtualMachine field is set. + */ + @java.lang.Override + public boolean hasVirtualMachine() { + return runtimeTypeCase_ == 2; + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return The virtualMachine. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachine getVirtualMachine() { + if (runtimeTypeCase_ == 2) { + return (com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_; + } + return com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineOrBuilder getVirtualMachineOrBuilder() { + if (runtimeTypeCase_ == 2) { + return (com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_; + } + return com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + * + * + *
+   * Output only. Runtime state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. Runtime state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Runtime.State result = + com.google.cloud.notebooks.v1.Runtime.State.valueOf(state_); + return result == null ? com.google.cloud.notebooks.v1.Runtime.State.UNRECOGNIZED : result; + } + + public static final int HEALTH_STATE_FIELD_NUMBER = 4; + private int healthState_; + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime.HealthState getHealthState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Runtime.HealthState result = + com.google.cloud.notebooks.v1.Runtime.HealthState.valueOf(healthState_); + return result == null ? com.google.cloud.notebooks.v1.Runtime.HealthState.UNRECOGNIZED : result; + } + + public static final int ACCESS_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.notebooks.v1.RuntimeAccessConfig accessConfig_; + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return Whether the accessConfig field is set. + */ + @java.lang.Override + public boolean hasAccessConfig() { + return accessConfig_ != null; + } + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return The accessConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAccessConfig getAccessConfig() { + return accessConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance() + : accessConfig_; + } + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder getAccessConfigOrBuilder() { + return getAccessConfig(); + } + + public static final int SOFTWARE_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.notebooks.v1.RuntimeSoftwareConfig softwareConfig_; + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return Whether the softwareConfig field is set. + */ + @java.lang.Override + public boolean hasSoftwareConfig() { + return softwareConfig_ != null; + } + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return The softwareConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfig getSoftwareConfig() { + return softwareConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance() + : softwareConfig_; + } + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder getSoftwareConfigOrBuilder() { + return getSoftwareConfig(); + } + + public static final int METRICS_FIELD_NUMBER = 7; + private com.google.cloud.notebooks.v1.RuntimeMetrics metrics_; + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+   * stats.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metrics field is set. + */ + @java.lang.Override + public boolean hasMetrics() { + return metrics_ != null; + } + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+   * stats.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metrics. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeMetrics getMetrics() { + return metrics_ == null + ? com.google.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance() + : metrics_; + } + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+   * stats.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeMetricsOrBuilder getMetricsOrBuilder() { + return getMetrics(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 20; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 21; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (runtimeTypeCase_ == 2) { + output.writeMessage(2, (com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_); + } + if (state_ != com.google.cloud.notebooks.v1.Runtime.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (healthState_ + != com.google.cloud.notebooks.v1.Runtime.HealthState.HEALTH_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, healthState_); + } + if (accessConfig_ != null) { + output.writeMessage(5, getAccessConfig()); + } + if (softwareConfig_ != null) { + output.writeMessage(6, getSoftwareConfig()); + } + if (metrics_ != null) { + output.writeMessage(7, getMetrics()); + } + if (createTime_ != null) { + output.writeMessage(20, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(21, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (runtimeTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_); + } + if (state_ != com.google.cloud.notebooks.v1.Runtime.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (healthState_ + != com.google.cloud.notebooks.v1.Runtime.HealthState.HEALTH_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, healthState_); + } + if (accessConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAccessConfig()); + } + if (softwareConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSoftwareConfig()); + } + if (metrics_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMetrics()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getUpdateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Runtime)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Runtime other = (com.google.cloud.notebooks.v1.Runtime) obj; + + if (!getName().equals(other.getName())) return false; + if (state_ != other.state_) return false; + if (healthState_ != other.healthState_) return false; + if (hasAccessConfig() != other.hasAccessConfig()) return false; + if (hasAccessConfig()) { + if (!getAccessConfig().equals(other.getAccessConfig())) return false; + } + if (hasSoftwareConfig() != other.hasSoftwareConfig()) return false; + if (hasSoftwareConfig()) { + if (!getSoftwareConfig().equals(other.getSoftwareConfig())) return false; + } + if (hasMetrics() != other.hasMetrics()) return false; + if (hasMetrics()) { + if (!getMetrics().equals(other.getMetrics())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getRuntimeTypeCase().equals(other.getRuntimeTypeCase())) return false; + switch (runtimeTypeCase_) { + case 2: + if (!getVirtualMachine().equals(other.getVirtualMachine())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + HEALTH_STATE_FIELD_NUMBER; + hash = (53 * hash) + healthState_; + if (hasAccessConfig()) { + hash = (37 * hash) + ACCESS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAccessConfig().hashCode(); + } + if (hasSoftwareConfig()) { + hash = (37 * hash) + SOFTWARE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSoftwareConfig().hashCode(); + } + if (hasMetrics()) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetrics().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (runtimeTypeCase_) { + case 2: + hash = (37 * hash) + VIRTUAL_MACHINE_FIELD_NUMBER; + hash = (53 * hash) + getVirtualMachine().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Runtime parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Runtime parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Runtime parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.Runtime prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The definition of a Runtime for a managed notebook instance.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Runtime} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Runtime) + com.google.cloud.notebooks.v1.RuntimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_Runtime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_Runtime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Runtime.class, + com.google.cloud.notebooks.v1.Runtime.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Runtime.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + state_ = 0; + + healthState_ = 0; + + if (accessConfigBuilder_ == null) { + accessConfig_ = null; + } else { + accessConfig_ = null; + accessConfigBuilder_ = null; + } + if (softwareConfigBuilder_ == null) { + softwareConfig_ = null; + } else { + softwareConfig_ = null; + softwareConfigBuilder_ = null; + } + if (metricsBuilder_ == null) { + metrics_ = null; + } else { + metrics_ = null; + metricsBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + runtimeTypeCase_ = 0; + runtimeType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_Runtime_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Runtime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime build() { + com.google.cloud.notebooks.v1.Runtime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime buildPartial() { + com.google.cloud.notebooks.v1.Runtime result = + new com.google.cloud.notebooks.v1.Runtime(this); + result.name_ = name_; + if (runtimeTypeCase_ == 2) { + if (virtualMachineBuilder_ == null) { + result.runtimeType_ = runtimeType_; + } else { + result.runtimeType_ = virtualMachineBuilder_.build(); + } + } + result.state_ = state_; + result.healthState_ = healthState_; + if (accessConfigBuilder_ == null) { + result.accessConfig_ = accessConfig_; + } else { + result.accessConfig_ = accessConfigBuilder_.build(); + } + if (softwareConfigBuilder_ == null) { + result.softwareConfig_ = softwareConfig_; + } else { + result.softwareConfig_ = softwareConfigBuilder_.build(); + } + if (metricsBuilder_ == null) { + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.runtimeTypeCase_ = runtimeTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Runtime) { + return mergeFrom((com.google.cloud.notebooks.v1.Runtime) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Runtime other) { + if (other == com.google.cloud.notebooks.v1.Runtime.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.healthState_ != 0) { + setHealthStateValue(other.getHealthStateValue()); + } + if (other.hasAccessConfig()) { + mergeAccessConfig(other.getAccessConfig()); + } + if (other.hasSoftwareConfig()) { + mergeSoftwareConfig(other.getSoftwareConfig()); + } + if (other.hasMetrics()) { + mergeMetrics(other.getMetrics()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getRuntimeTypeCase()) { + case VIRTUAL_MACHINE: + { + mergeVirtualMachine(other.getVirtualMachine()); + break; + } + case RUNTIMETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Runtime parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.Runtime) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int runtimeTypeCase_ = 0; + private java.lang.Object runtimeType_; + + public RuntimeTypeCase getRuntimeTypeCase() { + return RuntimeTypeCase.forNumber(runtimeTypeCase_); + } + + public Builder clearRuntimeType() { + runtimeTypeCase_ = 0; + runtimeType_ = null; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the runtime.
+     * Format:
+     * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VirtualMachine, + com.google.cloud.notebooks.v1.VirtualMachine.Builder, + com.google.cloud.notebooks.v1.VirtualMachineOrBuilder> + virtualMachineBuilder_; + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return Whether the virtualMachine field is set. + */ + @java.lang.Override + public boolean hasVirtualMachine() { + return runtimeTypeCase_ == 2; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return The virtualMachine. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachine getVirtualMachine() { + if (virtualMachineBuilder_ == null) { + if (runtimeTypeCase_ == 2) { + return (com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_; + } + return com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } else { + if (runtimeTypeCase_ == 2) { + return virtualMachineBuilder_.getMessage(); + } + return com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public Builder setVirtualMachine(com.google.cloud.notebooks.v1.VirtualMachine value) { + if (virtualMachineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runtimeType_ = value; + onChanged(); + } else { + virtualMachineBuilder_.setMessage(value); + } + runtimeTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public Builder setVirtualMachine( + com.google.cloud.notebooks.v1.VirtualMachine.Builder builderForValue) { + if (virtualMachineBuilder_ == null) { + runtimeType_ = builderForValue.build(); + onChanged(); + } else { + virtualMachineBuilder_.setMessage(builderForValue.build()); + } + runtimeTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public Builder mergeVirtualMachine(com.google.cloud.notebooks.v1.VirtualMachine value) { + if (virtualMachineBuilder_ == null) { + if (runtimeTypeCase_ == 2 + && runtimeType_ != com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance()) { + runtimeType_ = + com.google.cloud.notebooks.v1.VirtualMachine.newBuilder( + (com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_) + .mergeFrom(value) + .buildPartial(); + } else { + runtimeType_ = value; + } + onChanged(); + } else { + if (runtimeTypeCase_ == 2) { + virtualMachineBuilder_.mergeFrom(value); + } + virtualMachineBuilder_.setMessage(value); + } + runtimeTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public Builder clearVirtualMachine() { + if (virtualMachineBuilder_ == null) { + if (runtimeTypeCase_ == 2) { + runtimeTypeCase_ = 0; + runtimeType_ = null; + onChanged(); + } + } else { + if (runtimeTypeCase_ == 2) { + runtimeTypeCase_ = 0; + runtimeType_ = null; + } + virtualMachineBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + public com.google.cloud.notebooks.v1.VirtualMachine.Builder getVirtualMachineBuilder() { + return getVirtualMachineFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineOrBuilder getVirtualMachineOrBuilder() { + if ((runtimeTypeCase_ == 2) && (virtualMachineBuilder_ != null)) { + return virtualMachineBuilder_.getMessageOrBuilder(); + } else { + if (runtimeTypeCase_ == 2) { + return (com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_; + } + return com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + } + /** + * + * + *
+     * Use a Compute Engine VM image to start the managed notebook instance.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VirtualMachine, + com.google.cloud.notebooks.v1.VirtualMachine.Builder, + com.google.cloud.notebooks.v1.VirtualMachineOrBuilder> + getVirtualMachineFieldBuilder() { + if (virtualMachineBuilder_ == null) { + if (!(runtimeTypeCase_ == 2)) { + runtimeType_ = com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + virtualMachineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VirtualMachine, + com.google.cloud.notebooks.v1.VirtualMachine.Builder, + com.google.cloud.notebooks.v1.VirtualMachineOrBuilder>( + (com.google.cloud.notebooks.v1.VirtualMachine) runtimeType_, + getParentForChildren(), + isClean()); + runtimeType_ = null; + } + runtimeTypeCase_ = 2; + onChanged(); + ; + return virtualMachineBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Runtime.State result = + com.google.cloud.notebooks.v1.Runtime.State.valueOf(state_); + return result == null ? com.google.cloud.notebooks.v1.Runtime.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.notebooks.v1.Runtime.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private int healthState_ = 0; + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + @java.lang.Override + public int getHealthStateValue() { + return healthState_; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthStateValue(int value) { + + healthState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime.HealthState getHealthState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Runtime.HealthState result = + com.google.cloud.notebooks.v1.Runtime.HealthState.valueOf(healthState_); + return result == null + ? com.google.cloud.notebooks.v1.Runtime.HealthState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The healthState to set. + * @return This builder for chaining. + */ + public Builder setHealthState(com.google.cloud.notebooks.v1.Runtime.HealthState value) { + if (value == null) { + throw new NullPointerException(); + } + + healthState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Runtime health_state.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearHealthState() { + + healthState_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.RuntimeAccessConfig accessConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAccessConfig, + com.google.cloud.notebooks.v1.RuntimeAccessConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder> + accessConfigBuilder_; + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return Whether the accessConfig field is set. + */ + public boolean hasAccessConfig() { + return accessConfigBuilder_ != null || accessConfig_ != null; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return The accessConfig. + */ + public com.google.cloud.notebooks.v1.RuntimeAccessConfig getAccessConfig() { + if (accessConfigBuilder_ == null) { + return accessConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance() + : accessConfig_; + } else { + return accessConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public Builder setAccessConfig(com.google.cloud.notebooks.v1.RuntimeAccessConfig value) { + if (accessConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessConfig_ = value; + onChanged(); + } else { + accessConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public Builder setAccessConfig( + com.google.cloud.notebooks.v1.RuntimeAccessConfig.Builder builderForValue) { + if (accessConfigBuilder_ == null) { + accessConfig_ = builderForValue.build(); + onChanged(); + } else { + accessConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public Builder mergeAccessConfig(com.google.cloud.notebooks.v1.RuntimeAccessConfig value) { + if (accessConfigBuilder_ == null) { + if (accessConfig_ != null) { + accessConfig_ = + com.google.cloud.notebooks.v1.RuntimeAccessConfig.newBuilder(accessConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + accessConfig_ = value; + } + onChanged(); + } else { + accessConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public Builder clearAccessConfig() { + if (accessConfigBuilder_ == null) { + accessConfig_ = null; + onChanged(); + } else { + accessConfig_ = null; + accessConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public com.google.cloud.notebooks.v1.RuntimeAccessConfig.Builder getAccessConfigBuilder() { + + onChanged(); + return getAccessConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + public com.google.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder getAccessConfigOrBuilder() { + if (accessConfigBuilder_ != null) { + return accessConfigBuilder_.getMessageOrBuilder(); + } else { + return accessConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance() + : accessConfig_; + } + } + /** + * + * + *
+     * The config settings for accessing runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAccessConfig, + com.google.cloud.notebooks.v1.RuntimeAccessConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder> + getAccessConfigFieldBuilder() { + if (accessConfigBuilder_ == null) { + accessConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAccessConfig, + com.google.cloud.notebooks.v1.RuntimeAccessConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder>( + getAccessConfig(), getParentForChildren(), isClean()); + accessConfig_ = null; + } + return accessConfigBuilder_; + } + + private com.google.cloud.notebooks.v1.RuntimeSoftwareConfig softwareConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig, + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder> + softwareConfigBuilder_; + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return Whether the softwareConfig field is set. + */ + public boolean hasSoftwareConfig() { + return softwareConfigBuilder_ != null || softwareConfig_ != null; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return The softwareConfig. + */ + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfig getSoftwareConfig() { + if (softwareConfigBuilder_ == null) { + return softwareConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance() + : softwareConfig_; + } else { + return softwareConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public Builder setSoftwareConfig(com.google.cloud.notebooks.v1.RuntimeSoftwareConfig value) { + if (softwareConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + softwareConfig_ = value; + onChanged(); + } else { + softwareConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public Builder setSoftwareConfig( + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder builderForValue) { + if (softwareConfigBuilder_ == null) { + softwareConfig_ = builderForValue.build(); + onChanged(); + } else { + softwareConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public Builder mergeSoftwareConfig(com.google.cloud.notebooks.v1.RuntimeSoftwareConfig value) { + if (softwareConfigBuilder_ == null) { + if (softwareConfig_ != null) { + softwareConfig_ = + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.newBuilder(softwareConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + softwareConfig_ = value; + } + onChanged(); + } else { + softwareConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public Builder clearSoftwareConfig() { + if (softwareConfigBuilder_ == null) { + softwareConfig_ = null; + onChanged(); + } else { + softwareConfig_ = null; + softwareConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder getSoftwareConfigBuilder() { + + onChanged(); + return getSoftwareConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder + getSoftwareConfigOrBuilder() { + if (softwareConfigBuilder_ != null) { + return softwareConfigBuilder_.getMessageOrBuilder(); + } else { + return softwareConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance() + : softwareConfig_; + } + } + /** + * + * + *
+     * The config settings for software inside the runtime.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig, + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder> + getSoftwareConfigFieldBuilder() { + if (softwareConfigBuilder_ == null) { + softwareConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig, + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder>( + getSoftwareConfig(), getParentForChildren(), isClean()); + softwareConfig_ = null; + } + return softwareConfigBuilder_; + } + + private com.google.cloud.notebooks.v1.RuntimeMetrics metrics_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeMetrics, + com.google.cloud.notebooks.v1.RuntimeMetrics.Builder, + com.google.cloud.notebooks.v1.RuntimeMetricsOrBuilder> + metricsBuilder_; + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metrics field is set. + */ + public boolean hasMetrics() { + return metricsBuilder_ != null || metrics_ != null; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metrics. + */ + public com.google.cloud.notebooks.v1.RuntimeMetrics getMetrics() { + if (metricsBuilder_ == null) { + return metrics_ == null + ? com.google.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance() + : metrics_; + } else { + return metricsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetrics(com.google.cloud.notebooks.v1.RuntimeMetrics value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metrics_ = value; + onChanged(); + } else { + metricsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetrics( + com.google.cloud.notebooks.v1.RuntimeMetrics.Builder builderForValue) { + if (metricsBuilder_ == null) { + metrics_ = builderForValue.build(); + onChanged(); + } else { + metricsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMetrics(com.google.cloud.notebooks.v1.RuntimeMetrics value) { + if (metricsBuilder_ == null) { + if (metrics_ != null) { + metrics_ = + com.google.cloud.notebooks.v1.RuntimeMetrics.newBuilder(metrics_) + .mergeFrom(value) + .buildPartial(); + } else { + metrics_ = value; + } + onChanged(); + } else { + metricsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = null; + onChanged(); + } else { + metrics_ = null; + metricsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.RuntimeMetrics.Builder getMetricsBuilder() { + + onChanged(); + return getMetricsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.RuntimeMetricsOrBuilder getMetricsOrBuilder() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilder(); + } else { + return metrics_ == null + ? com.google.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance() + : metrics_; + } + } + /** + * + * + *
+     * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+     * stats.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeMetrics, + com.google.cloud.notebooks.v1.RuntimeMetrics.Builder, + com.google.cloud.notebooks.v1.RuntimeMetricsOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeMetrics, + com.google.cloud.notebooks.v1.RuntimeMetrics.Builder, + com.google.cloud.notebooks.v1.RuntimeMetricsOrBuilder>( + getMetrics(), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Runtime creation time.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Runtime update time.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Runtime) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Runtime) + private static final com.google.cloud.notebooks.v1.Runtime DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Runtime(); + } + + public static com.google.cloud.notebooks.v1.Runtime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Runtime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Runtime(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Runtime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAcceleratorConfig.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAcceleratorConfig.java new file mode 100644 index 00000000..befb6b71 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAcceleratorConfig.java @@ -0,0 +1,1086 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Definition of the types of hardware accelerators that can be used.
+ * Definition of the types of hardware accelerators that can be used.
+ * See [Compute Engine
+ * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
+ * Examples:
+ * * `nvidia-tesla-k80`
+ * * `nvidia-tesla-p100`
+ * * `nvidia-tesla-v100`
+ * * `nvidia-tesla-t4`
+ * * `nvidia-tesla-a100`
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeAcceleratorConfig} + */ +public final class RuntimeAcceleratorConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.RuntimeAcceleratorConfig) + RuntimeAcceleratorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeAcceleratorConfig.newBuilder() to construct. + private RuntimeAcceleratorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeAcceleratorConfig() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeAcceleratorConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RuntimeAcceleratorConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: + { + coreCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.class, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder.class); + } + + /** + * + * + *
+   * Type of this accelerator.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType} + */ + public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Accelerator type is not specified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla K80.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + NVIDIA_TESLA_K80(1), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P100.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + NVIDIA_TESLA_P100(2), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla V100.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + NVIDIA_TESLA_V100(3), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4 GPU.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + NVIDIA_TESLA_P4(4), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla T4.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + NVIDIA_TESLA_T4(5), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla A100.
+     * 
+ * + * NVIDIA_TESLA_A100 = 6; + */ + NVIDIA_TESLA_A100(6), + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V2.
+     * 
+ * + * TPU_V2 = 7; + */ + TPU_V2(7), + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V3.
+     * 
+ * + * TPU_V3 = 8; + */ + TPU_V3(8), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_T4_VWS = 9; + */ + NVIDIA_TESLA_T4_VWS(9), + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P100_VWS = 10; + */ + NVIDIA_TESLA_P100_VWS(10), + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P.4 GPU Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P4_VWS = 11; + */ + NVIDIA_TESLA_P4_VWS(11), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Accelerator type is not specified.
+     * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla K80.
+     * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + public static final int NVIDIA_TESLA_K80_VALUE = 1; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P100.
+     * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + public static final int NVIDIA_TESLA_P100_VALUE = 2; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla V100.
+     * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + public static final int NVIDIA_TESLA_V100_VALUE = 3; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P4 GPU.
+     * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + public static final int NVIDIA_TESLA_P4_VALUE = 4; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla T4.
+     * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + public static final int NVIDIA_TESLA_T4_VALUE = 5; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla A100.
+     * 
+ * + * NVIDIA_TESLA_A100 = 6; + */ + public static final int NVIDIA_TESLA_A100_VALUE = 6; + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V2.
+     * 
+ * + * TPU_V2 = 7; + */ + public static final int TPU_V2_VALUE = 7; + /** + * + * + *
+     * (Coming soon) Accelerator type is TPU V3.
+     * 
+ * + * TPU_V3 = 8; + */ + public static final int TPU_V3_VALUE = 8; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_T4_VWS = 9; + */ + public static final int NVIDIA_TESLA_T4_VWS_VALUE = 9; + /** + * + * + *
+     * Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P100_VWS = 10; + */ + public static final int NVIDIA_TESLA_P100_VWS_VALUE = 10; + /** + * + * + *
+     * Accelerator type is Nvidia Tesla P.4 GPU Virtual Workstations.
+     * 
+ * + * NVIDIA_TESLA_P4_VWS = 11; + */ + public static final int NVIDIA_TESLA_P4_VWS_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AcceleratorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AcceleratorType forNumber(int value) { + switch (value) { + case 0: + return ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return NVIDIA_TESLA_K80; + case 2: + return NVIDIA_TESLA_P100; + case 3: + return NVIDIA_TESLA_V100; + case 4: + return NVIDIA_TESLA_P4; + case 5: + return NVIDIA_TESLA_T4; + case 6: + return NVIDIA_TESLA_A100; + case 7: + return TPU_V2; + case 8: + return TPU_V3; + case 9: + return NVIDIA_TESLA_T4_VWS; + case 10: + return NVIDIA_TESLA_P100_VWS; + case 11: + return NVIDIA_TESLA_P4_VWS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AcceleratorType findValueByNumber(int number) { + return AcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AcceleratorType[] VALUES = values(); + + public static AcceleratorType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * Accelerator model.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Accelerator model.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType result = + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType.valueOf(type_); + return result == null + ? com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType.UNRECOGNIZED + : result; + } + + public static final int CORE_COUNT_FIELD_NUMBER = 2; + private long coreCount_; + /** + * + * + *
+   * Count of cores of this accelerator.
+   * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType + .ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (coreCount_ != 0L) { + output.writeInt64(2, coreCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType + .ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (coreCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, coreCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig other = + (com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig) obj; + + if (type_ != other.type_) return false; + if (getCoreCount() != other.getCoreCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Definition of the types of hardware accelerators that can be used.
+   * Definition of the types of hardware accelerators that can be used.
+   * See [Compute Engine
+   * AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes).
+   * Examples:
+   * * `nvidia-tesla-k80`
+   * * `nvidia-tesla-p100`
+   * * `nvidia-tesla-v100`
+   * * `nvidia-tesla-t4`
+   * * `nvidia-tesla-a100`
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeAcceleratorConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.RuntimeAcceleratorConfig) + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.class, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + coreCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig build() { + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig buildPartial() { + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig result = + new com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig(this); + result.type_ = type_; + result.coreCount_ = coreCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig other) { + if (other == com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getCoreCount() != 0L) { + setCoreCount(other.getCoreCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType result = + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType.valueOf(type_); + return result == null + ? com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Accelerator model.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private long coreCount_; + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @param value The coreCount to set. + * @return This builder for chaining. + */ + public Builder setCoreCount(long value) { + + coreCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Count of cores of this accelerator.
+     * 
+ * + * int64 core_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCoreCount() { + + coreCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.RuntimeAcceleratorConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.RuntimeAcceleratorConfig) + private static final com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig(); + } + + public static com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeAcceleratorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RuntimeAcceleratorConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAcceleratorConfigOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAcceleratorConfigOrBuilder.java new file mode 100644 index 00000000..711ae124 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAcceleratorConfigOrBuilder.java @@ -0,0 +1,63 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface RuntimeAcceleratorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.RuntimeAcceleratorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Accelerator model.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Accelerator model.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * + * @return The type. + */ + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType getType(); + + /** + * + * + *
+   * Count of cores of this accelerator.
+   * 
+ * + * int64 core_count = 2; + * + * @return The coreCount. + */ + long getCoreCount(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAccessConfig.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAccessConfig.java new file mode 100644 index 00000000..ea924bee --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAccessConfig.java @@ -0,0 +1,1129 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Specifies the login configuration for Runtime
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeAccessConfig} + */ +public final class RuntimeAccessConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.RuntimeAccessConfig) + RuntimeAccessConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeAccessConfig.newBuilder() to construct. + private RuntimeAccessConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeAccessConfig() { + accessType_ = 0; + runtimeOwner_ = ""; + proxyUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeAccessConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RuntimeAccessConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + accessType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + runtimeOwner_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + proxyUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeAccessConfig.class, + com.google.cloud.notebooks.v1.RuntimeAccessConfig.Builder.class); + } + + /** + * + * + *
+   * Possible ways to access runtime. Authentication mode.
+   * Currently supports: Single User only.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType} + */ + public enum RuntimeAccessType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified access.
+     * 
+ * + * RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; + */ + RUNTIME_ACCESS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Single user login.
+     * 
+ * + * SINGLE_USER = 1; + */ + SINGLE_USER(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified access.
+     * 
+ * + * RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; + */ + public static final int RUNTIME_ACCESS_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Single user login.
+     * 
+ * + * SINGLE_USER = 1; + */ + public static final int SINGLE_USER_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RuntimeAccessType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RuntimeAccessType forNumber(int value) { + switch (value) { + case 0: + return RUNTIME_ACCESS_TYPE_UNSPECIFIED; + case 1: + return SINGLE_USER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RuntimeAccessType findValueByNumber(int number) { + return RuntimeAccessType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeAccessConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RuntimeAccessType[] VALUES = values(); + + public static RuntimeAccessType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RuntimeAccessType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType) + } + + public static final int ACCESS_TYPE_FIELD_NUMBER = 1; + private int accessType_; + /** + * + * + *
+   * The type of access mode this instance.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * @return The enum numeric value on the wire for accessType. + */ + @java.lang.Override + public int getAccessTypeValue() { + return accessType_; + } + /** + * + * + *
+   * The type of access mode this instance.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * @return The accessType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType getAccessType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType result = + com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType.valueOf(accessType_); + return result == null + ? com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType.UNRECOGNIZED + : result; + } + + public static final int RUNTIME_OWNER_FIELD_NUMBER = 2; + private volatile java.lang.Object runtimeOwner_; + /** + * + * + *
+   * The owner of this runtime after creation. Format: `alias@example.com`
+   * Currently supports one owner only.
+   * 
+ * + * string runtime_owner = 2; + * + * @return The runtimeOwner. + */ + @java.lang.Override + public java.lang.String getRuntimeOwner() { + java.lang.Object ref = runtimeOwner_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeOwner_ = s; + return s; + } + } + /** + * + * + *
+   * The owner of this runtime after creation. Format: `alias@example.com`
+   * Currently supports one owner only.
+   * 
+ * + * string runtime_owner = 2; + * + * @return The bytes for runtimeOwner. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuntimeOwnerBytes() { + java.lang.Object ref = runtimeOwner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeOwner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROXY_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object proxyUri_; + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the runtime.
+   * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + @java.lang.Override + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the runtime.
+   * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (accessType_ + != com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType + .RUNTIME_ACCESS_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, accessType_); + } + if (!getRuntimeOwnerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, runtimeOwner_); + } + if (!getProxyUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, proxyUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (accessType_ + != com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType + .RUNTIME_ACCESS_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, accessType_); + } + if (!getRuntimeOwnerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, runtimeOwner_); + } + if (!getProxyUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, proxyUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.RuntimeAccessConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.RuntimeAccessConfig other = + (com.google.cloud.notebooks.v1.RuntimeAccessConfig) obj; + + if (accessType_ != other.accessType_) return false; + if (!getRuntimeOwner().equals(other.getRuntimeOwner())) return false; + if (!getProxyUri().equals(other.getProxyUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACCESS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + accessType_; + hash = (37 * hash) + RUNTIME_OWNER_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeOwner().hashCode(); + hash = (37 * hash) + PROXY_URI_FIELD_NUMBER; + hash = (53 * hash) + getProxyUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.RuntimeAccessConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifies the login configuration for Runtime
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeAccessConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.RuntimeAccessConfig) + com.google.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeAccessConfig.class, + com.google.cloud.notebooks.v1.RuntimeAccessConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.RuntimeAccessConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + accessType_ = 0; + + runtimeOwner_ = ""; + + proxyUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAccessConfig getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAccessConfig build() { + com.google.cloud.notebooks.v1.RuntimeAccessConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAccessConfig buildPartial() { + com.google.cloud.notebooks.v1.RuntimeAccessConfig result = + new com.google.cloud.notebooks.v1.RuntimeAccessConfig(this); + result.accessType_ = accessType_; + result.runtimeOwner_ = runtimeOwner_; + result.proxyUri_ = proxyUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.RuntimeAccessConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.RuntimeAccessConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.RuntimeAccessConfig other) { + if (other == com.google.cloud.notebooks.v1.RuntimeAccessConfig.getDefaultInstance()) + return this; + if (other.accessType_ != 0) { + setAccessTypeValue(other.getAccessTypeValue()); + } + if (!other.getRuntimeOwner().isEmpty()) { + runtimeOwner_ = other.runtimeOwner_; + onChanged(); + } + if (!other.getProxyUri().isEmpty()) { + proxyUri_ = other.proxyUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.RuntimeAccessConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.RuntimeAccessConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int accessType_ = 0; + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return The enum numeric value on the wire for accessType. + */ + @java.lang.Override + public int getAccessTypeValue() { + return accessType_; + } + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @param value The enum numeric value on the wire for accessType to set. + * @return This builder for chaining. + */ + public Builder setAccessTypeValue(int value) { + + accessType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return The accessType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType getAccessType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType result = + com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType.valueOf(accessType_); + return result == null + ? com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @param value The accessType to set. + * @return This builder for chaining. + */ + public Builder setAccessType( + com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType value) { + if (value == null) { + throw new NullPointerException(); + } + + accessType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of access mode this instance.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearAccessType() { + + accessType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object runtimeOwner_ = ""; + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @return The runtimeOwner. + */ + public java.lang.String getRuntimeOwner() { + java.lang.Object ref = runtimeOwner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + runtimeOwner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @return The bytes for runtimeOwner. + */ + public com.google.protobuf.ByteString getRuntimeOwnerBytes() { + java.lang.Object ref = runtimeOwner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + runtimeOwner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @param value The runtimeOwner to set. + * @return This builder for chaining. + */ + public Builder setRuntimeOwner(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + runtimeOwner_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @return This builder for chaining. + */ + public Builder clearRuntimeOwner() { + + runtimeOwner_ = getDefaultInstance().getRuntimeOwner(); + onChanged(); + return this; + } + /** + * + * + *
+     * The owner of this runtime after creation. Format: `alias@example.com`
+     * Currently supports one owner only.
+     * 
+ * + * string runtime_owner = 2; + * + * @param value The bytes for runtimeOwner to set. + * @return This builder for chaining. + */ + public Builder setRuntimeOwnerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + runtimeOwner_ = value; + onChanged(); + return this; + } + + private java.lang.Object proxyUri_ = ""; + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + public java.lang.String getProxyUri() { + java.lang.Object ref = proxyUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proxyUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + public com.google.protobuf.ByteString getProxyUriBytes() { + java.lang.Object ref = proxyUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + proxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + proxyUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProxyUri() { + + proxyUri_ = getDefaultInstance().getProxyUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The proxy endpoint that is used to access the runtime.
+     * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for proxyUri to set. + * @return This builder for chaining. + */ + public Builder setProxyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + proxyUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.RuntimeAccessConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.RuntimeAccessConfig) + private static final com.google.cloud.notebooks.v1.RuntimeAccessConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.RuntimeAccessConfig(); + } + + public static com.google.cloud.notebooks.v1.RuntimeAccessConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeAccessConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RuntimeAccessConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAccessConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAccessConfigOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAccessConfigOrBuilder.java new file mode 100644 index 00000000..2d49151f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeAccessConfigOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface RuntimeAccessConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.RuntimeAccessConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type of access mode this instance.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * @return The enum numeric value on the wire for accessType. + */ + int getAccessTypeValue(); + /** + * + * + *
+   * The type of access mode this instance.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * + * @return The accessType. + */ + com.google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType getAccessType(); + + /** + * + * + *
+   * The owner of this runtime after creation. Format: `alias@example.com`
+   * Currently supports one owner only.
+   * 
+ * + * string runtime_owner = 2; + * + * @return The runtimeOwner. + */ + java.lang.String getRuntimeOwner(); + /** + * + * + *
+   * The owner of this runtime after creation. Format: `alias@example.com`
+   * Currently supports one owner only.
+   * 
+ * + * string runtime_owner = 2; + * + * @return The bytes for runtimeOwner. + */ + com.google.protobuf.ByteString getRuntimeOwnerBytes(); + + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the runtime.
+   * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The proxyUri. + */ + java.lang.String getProxyUri(); + /** + * + * + *
+   * Output only. The proxy endpoint that is used to access the runtime.
+   * 
+ * + * string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for proxyUri. + */ + com.google.protobuf.ByteString getProxyUriBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeMetrics.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeMetrics.java new file mode 100644 index 00000000..11b213ae --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeMetrics.java @@ -0,0 +1,810 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Contains runtime daemon metrics, such as OS and kernels and sessions stats.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeMetrics} + */ +public final class RuntimeMetrics extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.RuntimeMetrics) + RuntimeMetricsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeMetrics.newBuilder() to construct. + private RuntimeMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeMetrics() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeMetrics(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RuntimeMetrics( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + systemMetrics_ = + com.google.protobuf.MapField.newMapField( + SystemMetricsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry systemMetrics__ = + input.readMessage( + SystemMetricsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + systemMetrics_ + .getMutableMap() + .put(systemMetrics__.getKey(), systemMetrics__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeMetrics_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetSystemMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeMetrics.class, + com.google.cloud.notebooks.v1.RuntimeMetrics.Builder.class); + } + + public static final int SYSTEM_METRICS_FIELD_NUMBER = 1; + + private static final class SystemMetricsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField systemMetrics_; + + private com.google.protobuf.MapField + internalGetSystemMetrics() { + if (systemMetrics_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SystemMetricsDefaultEntryHolder.defaultEntry); + } + return systemMetrics_; + } + + public int getSystemMetricsCount() { + return internalGetSystemMetrics().getMap().size(); + } + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsSystemMetrics(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetSystemMetrics().getMap().containsKey(key); + } + /** Use {@link #getSystemMetricsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSystemMetrics() { + return getSystemMetricsMap(); + } + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getSystemMetricsMap() { + return internalGetSystemMetrics().getMap(); + } + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getSystemMetricsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetSystemMetrics().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getSystemMetricsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetSystemMetrics().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetSystemMetrics(), SystemMetricsDefaultEntryHolder.defaultEntry, 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetSystemMetrics().getMap().entrySet()) { + com.google.protobuf.MapEntry systemMetrics__ = + SystemMetricsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, systemMetrics__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.RuntimeMetrics)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.RuntimeMetrics other = + (com.google.cloud.notebooks.v1.RuntimeMetrics) obj; + + if (!internalGetSystemMetrics().equals(other.internalGetSystemMetrics())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetSystemMetrics().getMap().isEmpty()) { + hash = (37 * hash) + SYSTEM_METRICS_FIELD_NUMBER; + hash = (53 * hash) + internalGetSystemMetrics().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.RuntimeMetrics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contains runtime daemon metrics, such as OS and kernels and sessions stats.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeMetrics} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.RuntimeMetrics) + com.google.cloud.notebooks.v1.RuntimeMetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeMetrics_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetSystemMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableSystemMetrics(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeMetrics.class, + com.google.cloud.notebooks.v1.RuntimeMetrics.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.RuntimeMetrics.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableSystemMetrics().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeMetrics_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeMetrics getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeMetrics build() { + com.google.cloud.notebooks.v1.RuntimeMetrics result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeMetrics buildPartial() { + com.google.cloud.notebooks.v1.RuntimeMetrics result = + new com.google.cloud.notebooks.v1.RuntimeMetrics(this); + int from_bitField0_ = bitField0_; + result.systemMetrics_ = internalGetSystemMetrics(); + result.systemMetrics_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.RuntimeMetrics) { + return mergeFrom((com.google.cloud.notebooks.v1.RuntimeMetrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.RuntimeMetrics other) { + if (other == com.google.cloud.notebooks.v1.RuntimeMetrics.getDefaultInstance()) return this; + internalGetMutableSystemMetrics().mergeFrom(other.internalGetSystemMetrics()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.RuntimeMetrics parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.RuntimeMetrics) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.MapField systemMetrics_; + + private com.google.protobuf.MapField + internalGetSystemMetrics() { + if (systemMetrics_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SystemMetricsDefaultEntryHolder.defaultEntry); + } + return systemMetrics_; + } + + private com.google.protobuf.MapField + internalGetMutableSystemMetrics() { + onChanged(); + ; + if (systemMetrics_ == null) { + systemMetrics_ = + com.google.protobuf.MapField.newMapField(SystemMetricsDefaultEntryHolder.defaultEntry); + } + if (!systemMetrics_.isMutable()) { + systemMetrics_ = systemMetrics_.copy(); + } + return systemMetrics_; + } + + public int getSystemMetricsCount() { + return internalGetSystemMetrics().getMap().size(); + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsSystemMetrics(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetSystemMetrics().getMap().containsKey(key); + } + /** Use {@link #getSystemMetricsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSystemMetrics() { + return getSystemMetricsMap(); + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getSystemMetricsMap() { + return internalGetSystemMetrics().getMap(); + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getSystemMetricsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetSystemMetrics().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getSystemMetricsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetSystemMetrics().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSystemMetrics() { + internalGetMutableSystemMetrics().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSystemMetrics(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableSystemMetrics().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableSystemMetrics() { + return internalGetMutableSystemMetrics().getMutableMap(); + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putSystemMetrics(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableSystemMetrics().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. The system metrics.
+     * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllSystemMetrics(java.util.Map values) { + internalGetMutableSystemMetrics().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.RuntimeMetrics) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.RuntimeMetrics) + private static final com.google.cloud.notebooks.v1.RuntimeMetrics DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.RuntimeMetrics(); + } + + public static com.google.cloud.notebooks.v1.RuntimeMetrics getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeMetrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RuntimeMetrics(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeMetrics getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeMetricsOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeMetricsOrBuilder.java new file mode 100644 index 00000000..53e8fde4 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeMetricsOrBuilder.java @@ -0,0 +1,89 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface RuntimeMetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.RuntimeMetrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSystemMetricsCount(); + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsSystemMetrics(java.lang.String key); + /** Use {@link #getSystemMetricsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getSystemMetrics(); + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getSystemMetricsMap(); + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getSystemMetricsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Output only. The system metrics.
+   * 
+ * + * + * map<string, string> system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getSystemMetricsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeName.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeName.java new file mode 100644 index 00000000..c813301f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class RuntimeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_RUNTIME = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/runtimes/{runtime}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String runtime; + + @Deprecated + protected RuntimeName() { + project = null; + location = null; + runtime = null; + } + + private RuntimeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + runtime = Preconditions.checkNotNull(builder.getRuntime()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRuntime() { + return runtime; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RuntimeName of(String project, String location, String runtime) { + return newBuilder().setProject(project).setLocation(location).setRuntime(runtime).build(); + } + + public static String format(String project, String location, String runtime) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRuntime(runtime) + .build() + .toString(); + } + + public static RuntimeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_RUNTIME.validatedMatch( + formattedString, "RuntimeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("runtime")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RuntimeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_RUNTIME.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (runtime != null) { + fieldMapBuilder.put("runtime", runtime); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_RUNTIME.instantiate( + "project", project, "location", location, "runtime", runtime); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + RuntimeName that = ((RuntimeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.runtime, that.runtime); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(runtime); + return h; + } + + /** Builder for projects/{project}/locations/{location}/runtimes/{runtime}. */ + public static class Builder { + private String project; + private String location; + private String runtime; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRuntime() { + return runtime; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRuntime(String runtime) { + this.runtime = runtime; + return this; + } + + private Builder(RuntimeName runtimeName) { + this.project = runtimeName.project; + this.location = runtimeName.location; + this.runtime = runtimeName.runtime; + } + + public RuntimeName build() { + return new RuntimeName(this); + } + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeOrBuilder.java new file mode 100644 index 00000000..3bf77eef --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeOrBuilder.java @@ -0,0 +1,339 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface RuntimeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Runtime) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the runtime.
+   * Format:
+   * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the runtime.
+   * Format:
+   * `projects/{project}/locations/{location}/runtimes/{runtimeId}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return Whether the virtualMachine field is set. + */ + boolean hasVirtualMachine(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * + * @return The virtualMachine. + */ + com.google.cloud.notebooks.v1.VirtualMachine getVirtualMachine(); + /** + * + * + *
+   * Use a Compute Engine VM image to start the managed notebook instance.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + */ + com.google.cloud.notebooks.v1.VirtualMachineOrBuilder getVirtualMachineOrBuilder(); + + /** + * + * + *
+   * Output only. Runtime state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Runtime state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.notebooks.v1.Runtime.State getState(); + + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for healthState. + */ + int getHealthStateValue(); + /** + * + * + *
+   * Output only. Runtime health_state.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The healthState. + */ + com.google.cloud.notebooks.v1.Runtime.HealthState getHealthState(); + + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return Whether the accessConfig field is set. + */ + boolean hasAccessConfig(); + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * + * @return The accessConfig. + */ + com.google.cloud.notebooks.v1.RuntimeAccessConfig getAccessConfig(); + /** + * + * + *
+   * The config settings for accessing runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + com.google.cloud.notebooks.v1.RuntimeAccessConfigOrBuilder getAccessConfigOrBuilder(); + + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return Whether the softwareConfig field is set. + */ + boolean hasSoftwareConfig(); + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * + * @return The softwareConfig. + */ + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig getSoftwareConfig(); + /** + * + * + *
+   * The config settings for software inside the runtime.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + com.google.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder getSoftwareConfigOrBuilder(); + + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+   * stats.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metrics field is set. + */ + boolean hasMetrics(); + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+   * stats.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metrics. + */ + com.google.cloud.notebooks.v1.RuntimeMetrics getMetrics(); + /** + * + * + *
+   * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab
+   * stats.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.notebooks.v1.RuntimeMetricsOrBuilder getMetricsOrBuilder(); + + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Runtime creation time.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Runtime update time.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + public com.google.cloud.notebooks.v1.Runtime.RuntimeTypeCase getRuntimeTypeCase(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeProto.java new file mode 100644 index 00000000..6b0c7eee --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeProto.java @@ -0,0 +1,434 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public final class RuntimeProto { + private RuntimeProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Runtime_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Runtime_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_EncryptionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_LocalDisk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_VirtualMachine_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_VirtualMachine_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/cloud/notebooks/v1/runtime.prot" + + "o\022\031google.cloud.notebooks.v1\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032+google/cloud/notebooks/v1/envi" + + "ronment.proto\032\037google/protobuf/timestamp" + + ".proto\"\375\006\n\007Runtime\022\021\n\004name\030\001 \001(\tB\003\340A\003\022D\n" + + "\017virtual_machine\030\002 \001(\0132).google.cloud.no" + + "tebooks.v1.VirtualMachineH\000\022<\n\005state\030\003 \001" + + "(\0162(.google.cloud.notebooks.v1.Runtime.S" + + "tateB\003\340A\003\022I\n\014health_state\030\004 \001(\0162..google" + + ".cloud.notebooks.v1.Runtime.HealthStateB" + + "\003\340A\003\022E\n\raccess_config\030\005 \001(\0132..google.clo" + + "ud.notebooks.v1.RuntimeAccessConfig\022I\n\017s" + + "oftware_config\030\006 \001(\01320.google.cloud.note" + + "books.v1.RuntimeSoftwareConfig\022?\n\007metric" + + "s\030\007 \001(\0132).google.cloud.notebooks.v1.Runt" + + "imeMetricsB\003\340A\003\0224\n\013create_time\030\024 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\003\0224\n\013update_" + + "time\030\025 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\"\224\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010" + + "STARTING\020\001\022\020\n\014PROVISIONING\020\002\022\n\n\006ACTIVE\020\003" + + "\022\014\n\010STOPPING\020\004\022\013\n\007STOPPED\020\005\022\014\n\010DELETING\020" + + "\006\022\r\n\tUPGRADING\020\007\022\020\n\014INITIALIZING\020\010\"G\n\013He" + + "althState\022\034\n\030HEALTH_STATE_UNSPECIFIED\020\000\022" + + "\013\n\007HEALTHY\020\001\022\r\n\tUNHEALTHY\020\002:a\352A^\n notebo" + + "oks.googleapis.com/Runtime\022:projects/{pr" + + "oject}/locations/{location}/runtimes/{ru" + + "ntime}B\016\n\014runtime_type\"\241\003\n\030RuntimeAccele" + + "ratorConfig\022Q\n\004type\030\001 \001(\0162C.google.cloud" + + ".notebooks.v1.RuntimeAcceleratorConfig.A" + + "cceleratorType\022\022\n\ncore_count\030\002 \001(\003\"\235\002\n\017A" + + "cceleratorType\022 \n\034ACCELERATOR_TYPE_UNSPE" + + "CIFIED\020\000\022\024\n\020NVIDIA_TESLA_K80\020\001\022\025\n\021NVIDIA" + + "_TESLA_P100\020\002\022\025\n\021NVIDIA_TESLA_V100\020\003\022\023\n\017" + + "NVIDIA_TESLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T4\020\005\022\025" + + "\n\021NVIDIA_TESLA_A100\020\006\022\n\n\006TPU_V2\020\007\022\n\n\006TPU" + + "_V3\020\010\022\027\n\023NVIDIA_TESLA_T4_VWS\020\t\022\031\n\025NVIDIA" + + "_TESLA_P100_VWS\020\n\022\027\n\023NVIDIA_TESLA_P4_VWS" + + "\020\013\"#\n\020EncryptionConfig\022\017\n\007kms_key\030\001 \001(\t\"" + + "\250\003\n\tLocalDisk\022\030\n\013auto_delete\030\001 \001(\010B\003\340A\003\022" + + "\021\n\004boot\030\002 \001(\010B\003\340A\003\022\030\n\013device_name\030\003 \001(\tB" + + "\003\340A\003\022Z\n\021guest_os_features\030\004 \003(\0132:.google" + + ".cloud.notebooks.v1.LocalDisk.RuntimeGue" + + "stOsFeatureB\003\340A\003\022\022\n\005index\030\005 \001(\005B\003\340A\003\022T\n\021" + + "initialize_params\030\006 \001(\01324.google.cloud.n" + + "otebooks.v1.LocalDiskInitializeParamsB\003\340" + + "A\004\022\021\n\tinterface\030\007 \001(\t\022\021\n\004kind\030\010 \001(\tB\003\340A\003" + + "\022\025\n\010licenses\030\t \003(\tB\003\340A\003\022\014\n\004mode\030\n \001(\t\022\016\n" + + "\006source\030\013 \001(\t\022\014\n\004type\030\014 \001(\t\032%\n\025RuntimeGu" + + "estOsFeature\022\014\n\004type\030\001 \001(\t\"\232\003\n\031LocalDisk" + + "InitializeParams\022\030\n\013description\030\001 \001(\tB\003\340" + + "A\001\022\026\n\tdisk_name\030\002 \001(\tB\003\340A\001\022\031\n\014disk_size_" + + "gb\030\003 \001(\003B\003\340A\001\022U\n\tdisk_type\030\004 \001(\0162=.googl" + + "e.cloud.notebooks.v1.LocalDiskInitialize" + + "Params.DiskTypeB\003\340A\004\022U\n\006labels\030\005 \003(\0132@.g" + + "oogle.cloud.notebooks.v1.LocalDiskInitia" + + "lizeParams.LabelsEntryB\003\340A\001\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"S\n\010Di" + + "skType\022\031\n\025DISK_TYPE_UNSPECIFIED\020\000\022\017\n\013PD_" + + "STANDARD\020\001\022\n\n\006PD_SSD\020\002\022\017\n\013PD_BALANCED\020\003\"" + + "\346\001\n\023RuntimeAccessConfig\022U\n\013access_type\030\001" + + " \001(\0162@.google.cloud.notebooks.v1.Runtime" + + "AccessConfig.RuntimeAccessType\022\025\n\rruntim" + + "e_owner\030\002 \001(\t\022\026\n\tproxy_uri\030\003 \001(\tB\003\340A\003\"I\n" + + "\021RuntimeAccessType\022#\n\037RUNTIME_ACCESS_TYP" + + "E_UNSPECIFIED\020\000\022\017\n\013SINGLE_USER\020\001\"\244\002\n\025Run" + + "timeSoftwareConfig\022!\n\031notebook_upgrade_s" + + "chedule\030\001 \001(\t\022%\n\030enable_health_monitorin" + + "g\030\002 \001(\010H\000\210\001\001\022\032\n\ridle_shutdown\030\003 \001(\010H\001\210\001\001" + + "\022\035\n\025idle_shutdown_timeout\030\004 \001(\005\022\032\n\022insta" + + "ll_gpu_driver\030\005 \001(\010\022\036\n\026custom_gpu_driver" + + "_path\030\006 \001(\t\022\033\n\023post_startup_script\030\007 \001(\t" + + "B\033\n\031_enable_health_monitoringB\020\n\016_idle_s" + + "hutdown\"\241\001\n\016RuntimeMetrics\022Y\n\016system_met" + + "rics\030\001 \003(\0132<.google.cloud.notebooks.v1.R" + + "untimeMetrics.SystemMetricsEntryB\003\340A\003\0324\n" + + "\022SystemMetricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"u\n\035RuntimeShieldedInstanceCo" + + "nfig\022\032\n\022enable_secure_boot\030\001 \001(\010\022\023\n\013enab" + + "le_vtpm\030\002 \001(\010\022#\n\033enable_integrity_monito" + + "ring\030\003 \001(\010\"\227\001\n\016VirtualMachine\022\032\n\rinstanc" + + "e_name\030\001 \001(\tB\003\340A\003\022\030\n\013instance_id\030\002 \001(\tB\003" + + "\340A\003\022O\n\026virtual_machine_config\030\003 \001(\0132/.go" + + "ogle.cloud.notebooks.v1.VirtualMachineCo" + + "nfig\"\342\010\n\024VirtualMachineConfig\022\021\n\004zone\030\001 " + + "\001(\tB\003\340A\003\022\031\n\014machine_type\030\002 \001(\tB\003\340A\002\022H\n\020c" + + "ontainer_images\030\003 \003(\0132).google.cloud.not" + + "ebooks.v1.ContainerImageB\003\340A\001\022<\n\tdata_di" + + "sk\030\004 \001(\0132$.google.cloud.notebooks.v1.Loc" + + "alDiskB\003\340A\002\022K\n\021encryption_config\030\005 \001(\0132+" + + ".google.cloud.notebooks.v1.EncryptionCon" + + "figB\003\340A\001\022_\n\030shielded_instance_config\030\006 \001" + + "(\01328.google.cloud.notebooks.v1.RuntimeSh" + + "ieldedInstanceConfigB\003\340A\001\022T\n\022accelerator" + + "_config\030\007 \001(\01323.google.cloud.notebooks.v" + + "1.RuntimeAcceleratorConfigB\003\340A\001\022\024\n\007netwo" + + "rk\030\010 \001(\tB\003\340A\001\022\023\n\006subnet\030\t \001(\tB\003\340A\001\022\035\n\020in" + + "ternal_ip_only\030\n \001(\010B\003\340A\001\022\021\n\004tags\030\r \003(\tB" + + "\003\340A\001\022c\n\020guest_attributes\030\016 \003(\0132D.google." + + "cloud.notebooks.v1.VirtualMachineConfig." + + "GuestAttributesEntryB\003\340A\003\022T\n\010metadata\030\017 " + + "\003(\0132=.google.cloud.notebooks.v1.VirtualM" + + "achineConfig.MetadataEntryB\003\340A\001\022P\n\006label" + + "s\030\020 \003(\0132;.google.cloud.notebooks.v1.Virt" + + "ualMachineConfig.LabelsEntryB\003\340A\001\022N\n\010nic" + + "_type\030\021 \001(\01627.google.cloud.notebooks.v1." + + "VirtualMachineConfig.NicTypeB\003\340A\001\0326\n\024Gue" + + "stAttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\">\n\007NicType\022\030\n\024" + + "UNSPECIFIED_NIC_TYPE\020\000\022\016\n\nVIRTIO_NET\020\001\022\t" + + "\n\005GVNIC\020\002B\312\001\n\035com.google.cloud.notebooks" + + ".v1B\014RuntimeProtoP\001ZBgoogle.golang.org/g" + + "enproto/googleapis/cloud/notebooks/v1;no" + + "tebooks\252\002\031Google.Cloud.Notebooks.V1\312\002\031Go" + + "ogle\\Cloud\\Notebooks\\V1\352\002\034Google::Cloud:" + + ":Notebooks::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.notebooks.v1.EnvironmentProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_notebooks_v1_Runtime_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_Runtime_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Runtime_descriptor, + new java.lang.String[] { + "Name", + "VirtualMachine", + "State", + "HealthState", + "AccessConfig", + "SoftwareConfig", + "Metrics", + "CreateTime", + "UpdateTime", + "RuntimeType", + }); + internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_RuntimeAcceleratorConfig_descriptor, + new java.lang.String[] { + "Type", "CoreCount", + }); + internal_static_google_cloud_notebooks_v1_EncryptionConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_notebooks_v1_EncryptionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_EncryptionConfig_descriptor, + new java.lang.String[] { + "KmsKey", + }); + internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_notebooks_v1_LocalDisk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor, + new java.lang.String[] { + "AutoDelete", + "Boot", + "DeviceName", + "GuestOsFeatures", + "Index", + "InitializeParams", + "Interface", + "Kind", + "Licenses", + "Mode", + "Source", + "Type", + }); + internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor = + internal_static_google_cloud_notebooks_v1_LocalDisk_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_LocalDisk_RuntimeGuestOsFeature_descriptor, + new java.lang.String[] { + "Type", + }); + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor, + new java.lang.String[] { + "Description", "DiskName", "DiskSizeGb", "DiskType", "Labels", + }); + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_descriptor = + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_LocalDiskInitializeParams_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_RuntimeAccessConfig_descriptor, + new java.lang.String[] { + "AccessType", "RuntimeOwner", "ProxyUri", + }); + internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor, + new java.lang.String[] { + "NotebookUpgradeSchedule", + "EnableHealthMonitoring", + "IdleShutdown", + "IdleShutdownTimeout", + "InstallGpuDriver", + "CustomGpuDriverPath", + "PostStartupScript", + "EnableHealthMonitoring", + "IdleShutdown", + }); + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_descriptor, + new java.lang.String[] { + "SystemMetrics", + }); + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_descriptor = + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_RuntimeMetrics_SystemMetricsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor, + new java.lang.String[] { + "EnableSecureBoot", "EnableVtpm", "EnableIntegrityMonitoring", + }); + internal_static_google_cloud_notebooks_v1_VirtualMachine_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_notebooks_v1_VirtualMachine_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_VirtualMachine_descriptor, + new java.lang.String[] { + "InstanceName", "InstanceId", "VirtualMachineConfig", + }); + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor, + new java.lang.String[] { + "Zone", + "MachineType", + "ContainerImages", + "DataDisk", + "EncryptionConfig", + "ShieldedInstanceConfig", + "AcceleratorConfig", + "Network", + "Subnet", + "InternalIpOnly", + "Tags", + "GuestAttributes", + "Metadata", + "Labels", + "NicType", + }); + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_descriptor = + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_descriptor = + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_descriptor = + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.notebooks.v1.EnvironmentProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeShieldedInstanceConfig.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeShieldedInstanceConfig.java new file mode 100644 index 00000000..660c4139 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeShieldedInstanceConfig.java @@ -0,0 +1,761 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * A set of Shielded Instance options.
+ * Check [Images using supported Shielded VM
+ * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+ * Not all combinations are valid.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig} + */ +public final class RuntimeShieldedInstanceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + RuntimeShieldedInstanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeShieldedInstanceConfig.newBuilder() to construct. + private RuntimeShieldedInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeShieldedInstanceConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeShieldedInstanceConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RuntimeShieldedInstanceConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableSecureBoot_ = input.readBool(); + break; + } + case 16: + { + enableVtpm_ = input.readBool(); + break; + } + case 24: + { + enableIntegrityMonitoring_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.class, + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder.class); + } + + public static final int ENABLE_SECURE_BOOT_FIELD_NUMBER = 1; + private boolean enableSecureBoot_; + /** + * + * + *
+   * Defines whether the instance has Secure Boot enabled.
+   * Secure Boot helps ensure that the system only runs authentic software by
+   * verifying the digital signature of all boot components, and halting the
+   * boot process if signature verification fails. Disabled by default.
+   * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + + public static final int ENABLE_VTPM_FIELD_NUMBER = 2; + private boolean enableVtpm_; + /** + * + * + *
+   * Defines whether the instance has the vTPM enabled. Enabled by default.
+   * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + @java.lang.Override + public boolean getEnableVtpm() { + return enableVtpm_; + } + + public static final int ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER = 3; + private boolean enableIntegrityMonitoring_; + /** + * + * + *
+   * Defines whether the instance has integrity monitoring enabled.
+   * Enables monitoring and attestation of the boot integrity of the instance.
+   * The attestation is performed against the integrity policy baseline. This
+   * baseline is initially derived from the implicitly trusted boot image when
+   * the instance is created. Enabled by default.
+   * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + @java.lang.Override + public boolean getEnableIntegrityMonitoring() { + return enableIntegrityMonitoring_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableSecureBoot_ != false) { + output.writeBool(1, enableSecureBoot_); + } + if (enableVtpm_ != false) { + output.writeBool(2, enableVtpm_); + } + if (enableIntegrityMonitoring_ != false) { + output.writeBool(3, enableIntegrityMonitoring_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableSecureBoot_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableSecureBoot_); + } + if (enableVtpm_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableVtpm_); + } + if (enableIntegrityMonitoring_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableIntegrityMonitoring_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig other = + (com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) obj; + + if (getEnableSecureBoot() != other.getEnableSecureBoot()) return false; + if (getEnableVtpm() != other.getEnableVtpm()) return false; + if (getEnableIntegrityMonitoring() != other.getEnableIntegrityMonitoring()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_SECURE_BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSecureBoot()); + hash = (37 * hash) + ENABLE_VTPM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVtpm()); + hash = (37 * hash) + ENABLE_INTEGRITY_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableIntegrityMonitoring()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A set of Shielded Instance options.
+   * Check [Images using supported Shielded VM
+   * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
+   * Not all combinations are valid.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.class, + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enableSecureBoot_ = false; + + enableVtpm_ = false; + + enableIntegrityMonitoring_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeShieldedInstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig build() { + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig buildPartial() { + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig result = + new com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig(this); + result.enableSecureBoot_ = enableSecureBoot_; + result.enableVtpm_ = enableVtpm_; + result.enableIntegrityMonitoring_ = enableIntegrityMonitoring_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig other) { + if (other == com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.getDefaultInstance()) + return this; + if (other.getEnableSecureBoot() != false) { + setEnableSecureBoot(other.getEnableSecureBoot()); + } + if (other.getEnableVtpm() != false) { + setEnableVtpm(other.getEnableVtpm()); + } + if (other.getEnableIntegrityMonitoring() != false) { + setEnableIntegrityMonitoring(other.getEnableIntegrityMonitoring()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enableSecureBoot_; + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + @java.lang.Override + public boolean getEnableSecureBoot() { + return enableSecureBoot_; + } + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @param value The enableSecureBoot to set. + * @return This builder for chaining. + */ + public Builder setEnableSecureBoot(boolean value) { + + enableSecureBoot_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines whether the instance has Secure Boot enabled.
+     * Secure Boot helps ensure that the system only runs authentic software by
+     * verifying the digital signature of all boot components, and halting the
+     * boot process if signature verification fails. Disabled by default.
+     * 
+ * + * bool enable_secure_boot = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableSecureBoot() { + + enableSecureBoot_ = false; + onChanged(); + return this; + } + + private boolean enableVtpm_; + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + @java.lang.Override + public boolean getEnableVtpm() { + return enableVtpm_; + } + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @param value The enableVtpm to set. + * @return This builder for chaining. + */ + public Builder setEnableVtpm(boolean value) { + + enableVtpm_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines whether the instance has the vTPM enabled. Enabled by default.
+     * 
+ * + * bool enable_vtpm = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableVtpm() { + + enableVtpm_ = false; + onChanged(); + return this; + } + + private boolean enableIntegrityMonitoring_; + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + @java.lang.Override + public boolean getEnableIntegrityMonitoring() { + return enableIntegrityMonitoring_; + } + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @param value The enableIntegrityMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableIntegrityMonitoring(boolean value) { + + enableIntegrityMonitoring_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines whether the instance has integrity monitoring enabled.
+     * Enables monitoring and attestation of the boot integrity of the instance.
+     * The attestation is performed against the integrity policy baseline. This
+     * baseline is initially derived from the implicitly trusted boot image when
+     * the instance is created. Enabled by default.
+     * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableIntegrityMonitoring() { + + enableIntegrityMonitoring_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + private static final com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig(); + } + + public static com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeShieldedInstanceConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RuntimeShieldedInstanceConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeShieldedInstanceConfigOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeShieldedInstanceConfigOrBuilder.java new file mode 100644 index 00000000..2c006282 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeShieldedInstanceConfigOrBuilder.java @@ -0,0 +1,71 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface RuntimeShieldedInstanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Defines whether the instance has Secure Boot enabled.
+   * Secure Boot helps ensure that the system only runs authentic software by
+   * verifying the digital signature of all boot components, and halting the
+   * boot process if signature verification fails. Disabled by default.
+   * 
+ * + * bool enable_secure_boot = 1; + * + * @return The enableSecureBoot. + */ + boolean getEnableSecureBoot(); + + /** + * + * + *
+   * Defines whether the instance has the vTPM enabled. Enabled by default.
+   * 
+ * + * bool enable_vtpm = 2; + * + * @return The enableVtpm. + */ + boolean getEnableVtpm(); + + /** + * + * + *
+   * Defines whether the instance has integrity monitoring enabled.
+   * Enables monitoring and attestation of the boot integrity of the instance.
+   * The attestation is performed against the integrity policy baseline. This
+   * baseline is initially derived from the implicitly trusted boot image when
+   * the instance is created. Enabled by default.
+   * 
+ * + * bool enable_integrity_monitoring = 3; + * + * @return The enableIntegrityMonitoring. + */ + boolean getEnableIntegrityMonitoring(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeSoftwareConfig.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeSoftwareConfig.java new file mode 100644 index 00000000..044b698e --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeSoftwareConfig.java @@ -0,0 +1,1489 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Specifies the selection and configuration of software inside the runtime.
+ * The properties to set on runtime.
+ * Properties keys are specified in `key:value` format, for example:
+ * * `idle_shutdown: true`
+ * * `idle_shutdown_timeout: 180`
+ * * `report-system-health: true`
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeSoftwareConfig} + */ +public final class RuntimeSoftwareConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.RuntimeSoftwareConfig) + RuntimeSoftwareConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RuntimeSoftwareConfig.newBuilder() to construct. + private RuntimeSoftwareConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeSoftwareConfig() { + notebookUpgradeSchedule_ = ""; + customGpuDriverPath_ = ""; + postStartupScript_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeSoftwareConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RuntimeSoftwareConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + notebookUpgradeSchedule_ = s; + break; + } + case 16: + { + bitField0_ |= 0x00000001; + enableHealthMonitoring_ = input.readBool(); + break; + } + case 24: + { + bitField0_ |= 0x00000002; + idleShutdown_ = input.readBool(); + break; + } + case 32: + { + idleShutdownTimeout_ = input.readInt32(); + break; + } + case 40: + { + installGpuDriver_ = input.readBool(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + customGpuDriverPath_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + postStartupScript_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.class, + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder.class); + } + + private int bitField0_; + public static final int NOTEBOOK_UPGRADE_SCHEDULE_FIELD_NUMBER = 1; + private volatile java.lang.Object notebookUpgradeSchedule_; + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + @java.lang.Override + public java.lang.String getNotebookUpgradeSchedule() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookUpgradeSchedule_ = s; + return s; + } + } + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookUpgradeSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_HEALTH_MONITORING_FIELD_NUMBER = 2; + private boolean enableHealthMonitoring_; + /** + * + * + *
+   * Verifies core internal services are running.
+   * Default: True
+   * 
+ * + * bool enable_health_monitoring = 2; + * + * @return Whether the enableHealthMonitoring field is set. + */ + @java.lang.Override + public boolean hasEnableHealthMonitoring() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Verifies core internal services are running.
+   * Default: True
+   * 
+ * + * bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + @java.lang.Override + public boolean getEnableHealthMonitoring() { + return enableHealthMonitoring_; + } + + public static final int IDLE_SHUTDOWN_FIELD_NUMBER = 3; + private boolean idleShutdown_; + /** + * + * + *
+   * Runtime will automatically shutdown after idle_shutdown_time.
+   * Default: True
+   * 
+ * + * bool idle_shutdown = 3; + * + * @return Whether the idleShutdown field is set. + */ + @java.lang.Override + public boolean hasIdleShutdown() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Runtime will automatically shutdown after idle_shutdown_time.
+   * Default: True
+   * 
+ * + * bool idle_shutdown = 3; + * + * @return The idleShutdown. + */ + @java.lang.Override + public boolean getIdleShutdown() { + return idleShutdown_; + } + + public static final int IDLE_SHUTDOWN_TIMEOUT_FIELD_NUMBER = 4; + private int idleShutdownTimeout_; + /** + * + * + *
+   * Time in minutes to wait before shuting down runtime. Default: 180 minutes
+   * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @return The idleShutdownTimeout. + */ + @java.lang.Override + public int getIdleShutdownTimeout() { + return idleShutdownTimeout_; + } + + public static final int INSTALL_GPU_DRIVER_FIELD_NUMBER = 5; + private boolean installGpuDriver_; + /** + * + * + *
+   * Install Nvidia Driver automatically.
+   * 
+ * + * bool install_gpu_driver = 5; + * + * @return The installGpuDriver. + */ + @java.lang.Override + public boolean getInstallGpuDriver() { + return installGpuDriver_; + } + + public static final int CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER = 6; + private volatile java.lang.Object customGpuDriverPath_; + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The customGpuDriverPath. + */ + @java.lang.Override + public java.lang.String getCustomGpuDriverPath() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customGpuDriverPath_ = s; + return s; + } + } + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The bytes for customGpuDriverPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customGpuDriverPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POST_STARTUP_SCRIPT_FIELD_NUMBER = 7; + private volatile java.lang.Object postStartupScript_; + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (gs://path-to-file/file-name).
+   * 
+ * + * string post_startup_script = 7; + * + * @return The postStartupScript. + */ + @java.lang.Override + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } + } + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (gs://path-to-file/file-name).
+   * 
+ * + * string post_startup_script = 7; + * + * @return The bytes for postStartupScript. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNotebookUpgradeScheduleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, notebookUpgradeSchedule_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(2, enableHealthMonitoring_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(3, idleShutdown_); + } + if (idleShutdownTimeout_ != 0) { + output.writeInt32(4, idleShutdownTimeout_); + } + if (installGpuDriver_ != false) { + output.writeBool(5, installGpuDriver_); + } + if (!getCustomGpuDriverPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, customGpuDriverPath_); + } + if (!getPostStartupScriptBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, postStartupScript_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNotebookUpgradeScheduleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, notebookUpgradeSchedule_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableHealthMonitoring_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, idleShutdown_); + } + if (idleShutdownTimeout_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, idleShutdownTimeout_); + } + if (installGpuDriver_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, installGpuDriver_); + } + if (!getCustomGpuDriverPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, customGpuDriverPath_); + } + if (!getPostStartupScriptBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, postStartupScript_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.RuntimeSoftwareConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig other = + (com.google.cloud.notebooks.v1.RuntimeSoftwareConfig) obj; + + if (!getNotebookUpgradeSchedule().equals(other.getNotebookUpgradeSchedule())) return false; + if (hasEnableHealthMonitoring() != other.hasEnableHealthMonitoring()) return false; + if (hasEnableHealthMonitoring()) { + if (getEnableHealthMonitoring() != other.getEnableHealthMonitoring()) return false; + } + if (hasIdleShutdown() != other.hasIdleShutdown()) return false; + if (hasIdleShutdown()) { + if (getIdleShutdown() != other.getIdleShutdown()) return false; + } + if (getIdleShutdownTimeout() != other.getIdleShutdownTimeout()) return false; + if (getInstallGpuDriver() != other.getInstallGpuDriver()) return false; + if (!getCustomGpuDriverPath().equals(other.getCustomGpuDriverPath())) return false; + if (!getPostStartupScript().equals(other.getPostStartupScript())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NOTEBOOK_UPGRADE_SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getNotebookUpgradeSchedule().hashCode(); + if (hasEnableHealthMonitoring()) { + hash = (37 * hash) + ENABLE_HEALTH_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableHealthMonitoring()); + } + if (hasIdleShutdown()) { + hash = (37 * hash) + IDLE_SHUTDOWN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIdleShutdown()); + } + hash = (37 * hash) + IDLE_SHUTDOWN_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getIdleShutdownTimeout(); + hash = (37 * hash) + INSTALL_GPU_DRIVER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInstallGpuDriver()); + hash = (37 * hash) + CUSTOM_GPU_DRIVER_PATH_FIELD_NUMBER; + hash = (53 * hash) + getCustomGpuDriverPath().hashCode(); + hash = (37 * hash) + POST_STARTUP_SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getPostStartupScript().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.RuntimeSoftwareConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifies the selection and configuration of software inside the runtime.
+   * The properties to set on runtime.
+   * Properties keys are specified in `key:value` format, for example:
+   * * `idle_shutdown: true`
+   * * `idle_shutdown_timeout: 180`
+   * * `report-system-health: true`
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.RuntimeSoftwareConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.RuntimeSoftwareConfig) + com.google.cloud.notebooks.v1.RuntimeSoftwareConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.class, + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + notebookUpgradeSchedule_ = ""; + + enableHealthMonitoring_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + idleShutdown_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + idleShutdownTimeout_ = 0; + + installGpuDriver_ = false; + + customGpuDriverPath_ = ""; + + postStartupScript_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_RuntimeSoftwareConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfig getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfig build() { + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfig buildPartial() { + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig result = + new com.google.cloud.notebooks.v1.RuntimeSoftwareConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.notebookUpgradeSchedule_ = notebookUpgradeSchedule_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableHealthMonitoring_ = enableHealthMonitoring_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.idleShutdown_ = idleShutdown_; + to_bitField0_ |= 0x00000002; + } + result.idleShutdownTimeout_ = idleShutdownTimeout_; + result.installGpuDriver_ = installGpuDriver_; + result.customGpuDriverPath_ = customGpuDriverPath_; + result.postStartupScript_ = postStartupScript_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.RuntimeSoftwareConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.RuntimeSoftwareConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.RuntimeSoftwareConfig other) { + if (other == com.google.cloud.notebooks.v1.RuntimeSoftwareConfig.getDefaultInstance()) + return this; + if (!other.getNotebookUpgradeSchedule().isEmpty()) { + notebookUpgradeSchedule_ = other.notebookUpgradeSchedule_; + onChanged(); + } + if (other.hasEnableHealthMonitoring()) { + setEnableHealthMonitoring(other.getEnableHealthMonitoring()); + } + if (other.hasIdleShutdown()) { + setIdleShutdown(other.getIdleShutdown()); + } + if (other.getIdleShutdownTimeout() != 0) { + setIdleShutdownTimeout(other.getIdleShutdownTimeout()); + } + if (other.getInstallGpuDriver() != false) { + setInstallGpuDriver(other.getInstallGpuDriver()); + } + if (!other.getCustomGpuDriverPath().isEmpty()) { + customGpuDriverPath_ = other.customGpuDriverPath_; + onChanged(); + } + if (!other.getPostStartupScript().isEmpty()) { + postStartupScript_ = other.postStartupScript_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.RuntimeSoftwareConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.RuntimeSoftwareConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object notebookUpgradeSchedule_ = ""; + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + public java.lang.String getNotebookUpgradeSchedule() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notebookUpgradeSchedule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + public com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes() { + java.lang.Object ref = notebookUpgradeSchedule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notebookUpgradeSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @param value The notebookUpgradeSchedule to set. + * @return This builder for chaining. + */ + public Builder setNotebookUpgradeSchedule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + notebookUpgradeSchedule_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return This builder for chaining. + */ + public Builder clearNotebookUpgradeSchedule() { + + notebookUpgradeSchedule_ = getDefaultInstance().getNotebookUpgradeSchedule(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+     * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+     * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @param value The bytes for notebookUpgradeSchedule to set. + * @return This builder for chaining. + */ + public Builder setNotebookUpgradeScheduleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + notebookUpgradeSchedule_ = value; + onChanged(); + return this; + } + + private boolean enableHealthMonitoring_; + /** + * + * + *
+     * Verifies core internal services are running.
+     * Default: True
+     * 
+ * + * bool enable_health_monitoring = 2; + * + * @return Whether the enableHealthMonitoring field is set. + */ + @java.lang.Override + public boolean hasEnableHealthMonitoring() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Verifies core internal services are running.
+     * Default: True
+     * 
+ * + * bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + @java.lang.Override + public boolean getEnableHealthMonitoring() { + return enableHealthMonitoring_; + } + /** + * + * + *
+     * Verifies core internal services are running.
+     * Default: True
+     * 
+ * + * bool enable_health_monitoring = 2; + * + * @param value The enableHealthMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableHealthMonitoring(boolean value) { + bitField0_ |= 0x00000001; + enableHealthMonitoring_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Verifies core internal services are running.
+     * Default: True
+     * 
+ * + * bool enable_health_monitoring = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableHealthMonitoring() { + bitField0_ = (bitField0_ & ~0x00000001); + enableHealthMonitoring_ = false; + onChanged(); + return this; + } + + private boolean idleShutdown_; + /** + * + * + *
+     * Runtime will automatically shutdown after idle_shutdown_time.
+     * Default: True
+     * 
+ * + * bool idle_shutdown = 3; + * + * @return Whether the idleShutdown field is set. + */ + @java.lang.Override + public boolean hasIdleShutdown() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Runtime will automatically shutdown after idle_shutdown_time.
+     * Default: True
+     * 
+ * + * bool idle_shutdown = 3; + * + * @return The idleShutdown. + */ + @java.lang.Override + public boolean getIdleShutdown() { + return idleShutdown_; + } + /** + * + * + *
+     * Runtime will automatically shutdown after idle_shutdown_time.
+     * Default: True
+     * 
+ * + * bool idle_shutdown = 3; + * + * @param value The idleShutdown to set. + * @return This builder for chaining. + */ + public Builder setIdleShutdown(boolean value) { + bitField0_ |= 0x00000002; + idleShutdown_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Runtime will automatically shutdown after idle_shutdown_time.
+     * Default: True
+     * 
+ * + * bool idle_shutdown = 3; + * + * @return This builder for chaining. + */ + public Builder clearIdleShutdown() { + bitField0_ = (bitField0_ & ~0x00000002); + idleShutdown_ = false; + onChanged(); + return this; + } + + private int idleShutdownTimeout_; + /** + * + * + *
+     * Time in minutes to wait before shuting down runtime. Default: 180 minutes
+     * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @return The idleShutdownTimeout. + */ + @java.lang.Override + public int getIdleShutdownTimeout() { + return idleShutdownTimeout_; + } + /** + * + * + *
+     * Time in minutes to wait before shuting down runtime. Default: 180 minutes
+     * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @param value The idleShutdownTimeout to set. + * @return This builder for chaining. + */ + public Builder setIdleShutdownTimeout(int value) { + + idleShutdownTimeout_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Time in minutes to wait before shuting down runtime. Default: 180 minutes
+     * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @return This builder for chaining. + */ + public Builder clearIdleShutdownTimeout() { + + idleShutdownTimeout_ = 0; + onChanged(); + return this; + } + + private boolean installGpuDriver_; + /** + * + * + *
+     * Install Nvidia Driver automatically.
+     * 
+ * + * bool install_gpu_driver = 5; + * + * @return The installGpuDriver. + */ + @java.lang.Override + public boolean getInstallGpuDriver() { + return installGpuDriver_; + } + /** + * + * + *
+     * Install Nvidia Driver automatically.
+     * 
+ * + * bool install_gpu_driver = 5; + * + * @param value The installGpuDriver to set. + * @return This builder for chaining. + */ + public Builder setInstallGpuDriver(boolean value) { + + installGpuDriver_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Install Nvidia Driver automatically.
+     * 
+ * + * bool install_gpu_driver = 5; + * + * @return This builder for chaining. + */ + public Builder clearInstallGpuDriver() { + + installGpuDriver_ = false; + onChanged(); + return this; + } + + private java.lang.Object customGpuDriverPath_ = ""; + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The customGpuDriverPath. + */ + public java.lang.String getCustomGpuDriverPath() { + java.lang.Object ref = customGpuDriverPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customGpuDriverPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The bytes for customGpuDriverPath. + */ + public com.google.protobuf.ByteString getCustomGpuDriverPathBytes() { + java.lang.Object ref = customGpuDriverPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customGpuDriverPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @param value The customGpuDriverPath to set. + * @return This builder for chaining. + */ + public Builder setCustomGpuDriverPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customGpuDriverPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return This builder for chaining. + */ + public Builder clearCustomGpuDriverPath() { + + customGpuDriverPath_ = getDefaultInstance().getCustomGpuDriverPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specify a custom Cloud Storage path where the GPU driver is stored.
+     * If not specified, we'll automatically choose from official GPU drivers.
+     * 
+ * + * string custom_gpu_driver_path = 6; + * + * @param value The bytes for customGpuDriverPath to set. + * @return This builder for chaining. + */ + public Builder setCustomGpuDriverPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customGpuDriverPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object postStartupScript_ = ""; + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 7; + * + * @return The postStartupScript. + */ + public java.lang.String getPostStartupScript() { + java.lang.Object ref = postStartupScript_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postStartupScript_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 7; + * + * @return The bytes for postStartupScript. + */ + public com.google.protobuf.ByteString getPostStartupScriptBytes() { + java.lang.Object ref = postStartupScript_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + postStartupScript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 7; + * + * @param value The postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + postStartupScript_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 7; + * + * @return This builder for chaining. + */ + public Builder clearPostStartupScript() { + + postStartupScript_ = getDefaultInstance().getPostStartupScript(); + onChanged(); + return this; + } + /** + * + * + *
+     * Path to a Bash script that automatically runs after a notebook instance
+     * fully boots up. The path must be a URL or
+     * Cloud Storage path (gs://path-to-file/file-name).
+     * 
+ * + * string post_startup_script = 7; + * + * @param value The bytes for postStartupScript to set. + * @return This builder for chaining. + */ + public Builder setPostStartupScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + postStartupScript_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.RuntimeSoftwareConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.RuntimeSoftwareConfig) + private static final com.google.cloud.notebooks.v1.RuntimeSoftwareConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.RuntimeSoftwareConfig(); + } + + public static com.google.cloud.notebooks.v1.RuntimeSoftwareConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeSoftwareConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RuntimeSoftwareConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeSoftwareConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeSoftwareConfigOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeSoftwareConfigOrBuilder.java new file mode 100644 index 00000000..a76173e0 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/RuntimeSoftwareConfigOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface RuntimeSoftwareConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.RuntimeSoftwareConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The notebookUpgradeSchedule. + */ + java.lang.String getNotebookUpgradeSchedule(); + /** + * + * + *
+   * Cron expression in UTC timezone, used to schedule instance auto upgrade.
+   * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).
+   * 
+ * + * string notebook_upgrade_schedule = 1; + * + * @return The bytes for notebookUpgradeSchedule. + */ + com.google.protobuf.ByteString getNotebookUpgradeScheduleBytes(); + + /** + * + * + *
+   * Verifies core internal services are running.
+   * Default: True
+   * 
+ * + * bool enable_health_monitoring = 2; + * + * @return Whether the enableHealthMonitoring field is set. + */ + boolean hasEnableHealthMonitoring(); + /** + * + * + *
+   * Verifies core internal services are running.
+   * Default: True
+   * 
+ * + * bool enable_health_monitoring = 2; + * + * @return The enableHealthMonitoring. + */ + boolean getEnableHealthMonitoring(); + + /** + * + * + *
+   * Runtime will automatically shutdown after idle_shutdown_time.
+   * Default: True
+   * 
+ * + * bool idle_shutdown = 3; + * + * @return Whether the idleShutdown field is set. + */ + boolean hasIdleShutdown(); + /** + * + * + *
+   * Runtime will automatically shutdown after idle_shutdown_time.
+   * Default: True
+   * 
+ * + * bool idle_shutdown = 3; + * + * @return The idleShutdown. + */ + boolean getIdleShutdown(); + + /** + * + * + *
+   * Time in minutes to wait before shuting down runtime. Default: 180 minutes
+   * 
+ * + * int32 idle_shutdown_timeout = 4; + * + * @return The idleShutdownTimeout. + */ + int getIdleShutdownTimeout(); + + /** + * + * + *
+   * Install Nvidia Driver automatically.
+   * 
+ * + * bool install_gpu_driver = 5; + * + * @return The installGpuDriver. + */ + boolean getInstallGpuDriver(); + + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The customGpuDriverPath. + */ + java.lang.String getCustomGpuDriverPath(); + /** + * + * + *
+   * Specify a custom Cloud Storage path where the GPU driver is stored.
+   * If not specified, we'll automatically choose from official GPU drivers.
+   * 
+ * + * string custom_gpu_driver_path = 6; + * + * @return The bytes for customGpuDriverPath. + */ + com.google.protobuf.ByteString getCustomGpuDriverPathBytes(); + + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (gs://path-to-file/file-name).
+   * 
+ * + * string post_startup_script = 7; + * + * @return The postStartupScript. + */ + java.lang.String getPostStartupScript(); + /** + * + * + *
+   * Path to a Bash script that automatically runs after a notebook instance
+   * fully boots up. The path must be a URL or
+   * Cloud Storage path (gs://path-to-file/file-name).
+   * 
+ * + * string post_startup_script = 7; + * + * @return The bytes for postStartupScript. + */ + com.google.protobuf.ByteString getPostStartupScriptBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Schedule.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Schedule.java new file mode 100644 index 00000000..fe73fdf2 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/Schedule.java @@ -0,0 +1,3230 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/schedule.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * The definition of a schedule.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Schedule} + */ +public final class Schedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.Schedule) + ScheduleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Schedule.newBuilder() to construct. + private Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Schedule() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + cronSchedule_ = ""; + timeZone_ = ""; + recentExecutions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Schedule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Schedule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + cronSchedule_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + timeZone_ = s; + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder subBuilder = null; + if (executionTemplate_ != null) { + subBuilder = executionTemplate_.toBuilder(); + } + executionTemplate_ = + input.readMessage( + com.google.cloud.notebooks.v1.ExecutionTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(executionTemplate_); + executionTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + recentExecutions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + recentExecutions_.add( + input.readMessage( + com.google.cloud.notebooks.v1.Execution.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + recentExecutions_ = java.util.Collections.unmodifiableList(recentExecutions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ScheduleProto + .internal_static_google_cloud_notebooks_v1_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ScheduleProto + .internal_static_google_cloud_notebooks_v1_Schedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Schedule.class, + com.google.cloud.notebooks.v1.Schedule.Builder.class); + } + + /** + * + * + *
+   * State of the job.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.Schedule.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The job is executing normally.
+     * 
+ * + * ENABLED = 1; + */ + ENABLED(1), + /** + * + * + *
+     * The job is paused by the user. It will not execute. A user can
+     * intentionally pause the job using
+     * [PauseJobRequest][].
+     * 
+ * + * PAUSED = 2; + */ + PAUSED(2), + /** + * + * + *
+     * The job is disabled by the system due to error. The user
+     * cannot directly set a job to be disabled.
+     * 
+ * + * DISABLED = 3; + */ + DISABLED(3), + /** + * + * + *
+     * The job state resulting from a failed [CloudScheduler.UpdateJob][]
+     * operation. To recover a job from this state, retry
+     * [CloudScheduler.UpdateJob][] until a successful response is received.
+     * 
+ * + * UPDATE_FAILED = 4; + */ + UPDATE_FAILED(4), + /** + * + * + *
+     * The schedule resource is being created.
+     * 
+ * + * INITIALIZING = 5; + */ + INITIALIZING(5), + /** + * + * + *
+     * The schedule resource is being deleted.
+     * 
+ * + * DELETING = 6; + */ + DELETING(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The job is executing normally.
+     * 
+ * + * ENABLED = 1; + */ + public static final int ENABLED_VALUE = 1; + /** + * + * + *
+     * The job is paused by the user. It will not execute. A user can
+     * intentionally pause the job using
+     * [PauseJobRequest][].
+     * 
+ * + * PAUSED = 2; + */ + public static final int PAUSED_VALUE = 2; + /** + * + * + *
+     * The job is disabled by the system due to error. The user
+     * cannot directly set a job to be disabled.
+     * 
+ * + * DISABLED = 3; + */ + public static final int DISABLED_VALUE = 3; + /** + * + * + *
+     * The job state resulting from a failed [CloudScheduler.UpdateJob][]
+     * operation. To recover a job from this state, retry
+     * [CloudScheduler.UpdateJob][] until a successful response is received.
+     * 
+ * + * UPDATE_FAILED = 4; + */ + public static final int UPDATE_FAILED_VALUE = 4; + /** + * + * + *
+     * The schedule resource is being created.
+     * 
+ * + * INITIALIZING = 5; + */ + public static final int INITIALIZING_VALUE = 5; + /** + * + * + *
+     * The schedule resource is being deleted.
+     * 
+ * + * DELETING = 6; + */ + public static final int DELETING_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ENABLED; + case 2: + return PAUSED; + case 3: + return DISABLED; + case 4: + return UPDATE_FAILED; + case 5: + return INITIALIZING; + case 6: + return DELETING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.Schedule.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.Schedule.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The name of this schedule. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of this schedule. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Output only. Display name used for UI purposes.
+   * Name can only contain alphanumeric characters, hyphens '-',
+   * and underscores '_'.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Display name used for UI purposes.
+   * Name can only contain alphanumeric characters, hyphens '-',
+   * and underscores '_'.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Schedule.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Schedule.State result = + com.google.cloud.notebooks.v1.Schedule.State.valueOf(state_); + return result == null ? com.google.cloud.notebooks.v1.Schedule.State.UNRECOGNIZED : result; + } + + public static final int CRON_SCHEDULE_FIELD_NUMBER = 5; + private volatile java.lang.Object cronSchedule_; + /** + * + * + *
+   * Cron-tab formatted schedule by which the job will execute
+   * Format: minute, hour, day of month, month, day of week
+   * e.g. 0 0 * * WED = every Wednesday
+   * More examples: https://crontab.guru/examples.html
+   * 
+ * + * string cron_schedule = 5; + * + * @return The cronSchedule. + */ + @java.lang.Override + public java.lang.String getCronSchedule() { + java.lang.Object ref = cronSchedule_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cronSchedule_ = s; + return s; + } + } + /** + * + * + *
+   * Cron-tab formatted schedule by which the job will execute
+   * Format: minute, hour, day of month, month, day of week
+   * e.g. 0 0 * * WED = every Wednesday
+   * More examples: https://crontab.guru/examples.html
+   * 
+ * + * string cron_schedule = 5; + * + * @return The bytes for cronSchedule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCronScheduleBytes() { + java.lang.Object ref = cronSchedule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cronSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_ZONE_FIELD_NUMBER = 6; + private volatile java.lang.Object timeZone_; + /** + * + * + *
+   * Timezone on which the cron_schedule.
+   * The value of this field must be a time zone name from the tz database.
+   * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+   * Note that some time zones include a provision for daylight savings time.
+   * The rules for daylight saving time are determined by the chosen tz.
+   * For UTC use the string "utc". If a time zone is not specified,
+   * the default will be in UTC (also known as GMT).
+   * 
+ * + * string time_zone = 6; + * + * @return The timeZone. + */ + @java.lang.Override + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } + } + /** + * + * + *
+   * Timezone on which the cron_schedule.
+   * The value of this field must be a time zone name from the tz database.
+   * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+   * Note that some time zones include a provision for daylight savings time.
+   * The rules for daylight saving time are determined by the chosen tz.
+   * For UTC use the string "utc". If a time zone is not specified,
+   * the default will be in UTC (also known as GMT).
+   * 
+ * + * string time_zone = 6; + * + * @return The bytes for timeZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int EXECUTION_TEMPLATE_FIELD_NUMBER = 9; + private com.google.cloud.notebooks.v1.ExecutionTemplate executionTemplate_; + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return Whether the executionTemplate field is set. + */ + @java.lang.Override + public boolean hasExecutionTemplate() { + return executionTemplate_ != null; + } + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return The executionTemplate. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate() { + return executionTemplate_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder getExecutionTemplateOrBuilder() { + return getExecutionTemplate(); + } + + public static final int RECENT_EXECUTIONS_FIELD_NUMBER = 10; + private java.util.List recentExecutions_; + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getRecentExecutionsList() { + return recentExecutions_; + } + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getRecentExecutionsOrBuilderList() { + return recentExecutions_; + } + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getRecentExecutionsCount() { + return recentExecutions_.size(); + } + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Execution getRecentExecutions(int index) { + return recentExecutions_.get(index); + } + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ExecutionOrBuilder getRecentExecutionsOrBuilder(int index) { + return recentExecutions_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (state_ != com.google.cloud.notebooks.v1.Schedule.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (!getCronScheduleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cronSchedule_); + } + if (!getTimeZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, timeZone_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + if (executionTemplate_ != null) { + output.writeMessage(9, getExecutionTemplate()); + } + for (int i = 0; i < recentExecutions_.size(); i++) { + output.writeMessage(10, recentExecutions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (state_ != com.google.cloud.notebooks.v1.Schedule.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (!getCronScheduleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cronSchedule_); + } + if (!getTimeZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, timeZone_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (executionTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getExecutionTemplate()); + } + for (int i = 0; i < recentExecutions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, recentExecutions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.Schedule)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.Schedule other = (com.google.cloud.notebooks.v1.Schedule) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (!getCronSchedule().equals(other.getCronSchedule())) return false; + if (!getTimeZone().equals(other.getTimeZone())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasExecutionTemplate() != other.hasExecutionTemplate()) return false; + if (hasExecutionTemplate()) { + if (!getExecutionTemplate().equals(other.getExecutionTemplate())) return false; + } + if (!getRecentExecutionsList().equals(other.getRecentExecutionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + CRON_SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getCronSchedule().hashCode(); + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasExecutionTemplate()) { + hash = (37 * hash) + EXECUTION_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTemplate().hashCode(); + } + if (getRecentExecutionsCount() > 0) { + hash = (37 * hash) + RECENT_EXECUTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRecentExecutionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Schedule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Schedule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.Schedule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.Schedule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The definition of a schedule.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.Schedule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.Schedule) + com.google.cloud.notebooks.v1.ScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ScheduleProto + .internal_static_google_cloud_notebooks_v1_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ScheduleProto + .internal_static_google_cloud_notebooks_v1_Schedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.Schedule.class, + com.google.cloud.notebooks.v1.Schedule.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.Schedule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRecentExecutionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + state_ = 0; + + cronSchedule_ = ""; + + timeZone_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (executionTemplateBuilder_ == null) { + executionTemplate_ = null; + } else { + executionTemplate_ = null; + executionTemplateBuilder_ = null; + } + if (recentExecutionsBuilder_ == null) { + recentExecutions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + recentExecutionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ScheduleProto + .internal_static_google_cloud_notebooks_v1_Schedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Schedule getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.Schedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Schedule build() { + com.google.cloud.notebooks.v1.Schedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Schedule buildPartial() { + com.google.cloud.notebooks.v1.Schedule result = + new com.google.cloud.notebooks.v1.Schedule(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.state_ = state_; + result.cronSchedule_ = cronSchedule_; + result.timeZone_ = timeZone_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (executionTemplateBuilder_ == null) { + result.executionTemplate_ = executionTemplate_; + } else { + result.executionTemplate_ = executionTemplateBuilder_.build(); + } + if (recentExecutionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + recentExecutions_ = java.util.Collections.unmodifiableList(recentExecutions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.recentExecutions_ = recentExecutions_; + } else { + result.recentExecutions_ = recentExecutionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.Schedule) { + return mergeFrom((com.google.cloud.notebooks.v1.Schedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.Schedule other) { + if (other == com.google.cloud.notebooks.v1.Schedule.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getCronSchedule().isEmpty()) { + cronSchedule_ = other.cronSchedule_; + onChanged(); + } + if (!other.getTimeZone().isEmpty()) { + timeZone_ = other.timeZone_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasExecutionTemplate()) { + mergeExecutionTemplate(other.getExecutionTemplate()); + } + if (recentExecutionsBuilder_ == null) { + if (!other.recentExecutions_.isEmpty()) { + if (recentExecutions_.isEmpty()) { + recentExecutions_ = other.recentExecutions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRecentExecutionsIsMutable(); + recentExecutions_.addAll(other.recentExecutions_); + } + onChanged(); + } + } else { + if (!other.recentExecutions_.isEmpty()) { + if (recentExecutionsBuilder_.isEmpty()) { + recentExecutionsBuilder_.dispose(); + recentExecutionsBuilder_ = null; + recentExecutions_ = other.recentExecutions_; + bitField0_ = (bitField0_ & ~0x00000001); + recentExecutionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRecentExecutionsFieldBuilder() + : null; + } else { + recentExecutionsBuilder_.addAllMessages(other.recentExecutions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.Schedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.Schedule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of this schedule. Format:
+     * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens '-',
+     * and underscores '_'.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens '-',
+     * and underscores '_'.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens '-',
+     * and underscores '_'.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens '-',
+     * and underscores '_'.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name used for UI purposes.
+     * Name can only contain alphanumeric characters, hyphens '-',
+     * and underscores '_'.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * A brief description of this environment.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Schedule.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Schedule.State result = + com.google.cloud.notebooks.v1.Schedule.State.valueOf(state_); + return result == null ? com.google.cloud.notebooks.v1.Schedule.State.UNRECOGNIZED : result; + } + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.notebooks.v1.Schedule.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object cronSchedule_ = ""; + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute
+     * Format: minute, hour, day of month, month, day of week
+     * e.g. 0 0 * * WED = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @return The cronSchedule. + */ + public java.lang.String getCronSchedule() { + java.lang.Object ref = cronSchedule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cronSchedule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute
+     * Format: minute, hour, day of month, month, day of week
+     * e.g. 0 0 * * WED = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @return The bytes for cronSchedule. + */ + public com.google.protobuf.ByteString getCronScheduleBytes() { + java.lang.Object ref = cronSchedule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cronSchedule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute
+     * Format: minute, hour, day of month, month, day of week
+     * e.g. 0 0 * * WED = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @param value The cronSchedule to set. + * @return This builder for chaining. + */ + public Builder setCronSchedule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cronSchedule_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute
+     * Format: minute, hour, day of month, month, day of week
+     * e.g. 0 0 * * WED = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @return This builder for chaining. + */ + public Builder clearCronSchedule() { + + cronSchedule_ = getDefaultInstance().getCronSchedule(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cron-tab formatted schedule by which the job will execute
+     * Format: minute, hour, day of month, month, day of week
+     * e.g. 0 0 * * WED = every Wednesday
+     * More examples: https://crontab.guru/examples.html
+     * 
+ * + * string cron_schedule = 5; + * + * @param value The bytes for cronSchedule to set. + * @return This builder for chaining. + */ + public Builder setCronScheduleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cronSchedule_ = value; + onChanged(); + return this; + } + + private java.lang.Object timeZone_ = ""; + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + timeZone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + + timeZone_ = getDefaultInstance().getTimeZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Timezone on which the cron_schedule.
+     * The value of this field must be a time zone name from the tz database.
+     * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+     * Note that some time zones include a provision for daylight savings time.
+     * The rules for daylight saving time are determined by the chosen tz.
+     * For UTC use the string "utc". If a time zone is not specified,
+     * the default will be in UTC (also known as GMT).
+     * 
+ * + * string time_zone = 6; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + timeZone_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time the schedule was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time the schedule was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.cloud.notebooks.v1.ExecutionTemplate executionTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate, + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder> + executionTemplateBuilder_; + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return Whether the executionTemplate field is set. + */ + public boolean hasExecutionTemplate() { + return executionTemplateBuilder_ != null || executionTemplate_ != null; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return The executionTemplate. + */ + public com.google.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate() { + if (executionTemplateBuilder_ == null) { + return executionTemplate_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } else { + return executionTemplateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public Builder setExecutionTemplate(com.google.cloud.notebooks.v1.ExecutionTemplate value) { + if (executionTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionTemplate_ = value; + onChanged(); + } else { + executionTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public Builder setExecutionTemplate( + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder builderForValue) { + if (executionTemplateBuilder_ == null) { + executionTemplate_ = builderForValue.build(); + onChanged(); + } else { + executionTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public Builder mergeExecutionTemplate(com.google.cloud.notebooks.v1.ExecutionTemplate value) { + if (executionTemplateBuilder_ == null) { + if (executionTemplate_ != null) { + executionTemplate_ = + com.google.cloud.notebooks.v1.ExecutionTemplate.newBuilder(executionTemplate_) + .mergeFrom(value) + .buildPartial(); + } else { + executionTemplate_ = value; + } + onChanged(); + } else { + executionTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public Builder clearExecutionTemplate() { + if (executionTemplateBuilder_ == null) { + executionTemplate_ = null; + onChanged(); + } else { + executionTemplate_ = null; + executionTemplateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public com.google.cloud.notebooks.v1.ExecutionTemplate.Builder getExecutionTemplateBuilder() { + + onChanged(); + return getExecutionTemplateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + public com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder + getExecutionTemplateOrBuilder() { + if (executionTemplateBuilder_ != null) { + return executionTemplateBuilder_.getMessageOrBuilder(); + } else { + return executionTemplate_ == null + ? com.google.cloud.notebooks.v1.ExecutionTemplate.getDefaultInstance() + : executionTemplate_; + } + } + /** + * + * + *
+     * Notebook Execution Template corresponding to this schedule.
+     * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate, + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder> + getExecutionTemplateFieldBuilder() { + if (executionTemplateBuilder_ == null) { + executionTemplateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.ExecutionTemplate, + com.google.cloud.notebooks.v1.ExecutionTemplate.Builder, + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder>( + getExecutionTemplate(), getParentForChildren(), isClean()); + executionTemplate_ = null; + } + return executionTemplateBuilder_; + } + + private java.util.List recentExecutions_ = + java.util.Collections.emptyList(); + + private void ensureRecentExecutionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + recentExecutions_ = + new java.util.ArrayList(recentExecutions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder> + recentExecutionsBuilder_; + + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getRecentExecutionsList() { + if (recentExecutionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(recentExecutions_); + } else { + return recentExecutionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getRecentExecutionsCount() { + if (recentExecutionsBuilder_ == null) { + return recentExecutions_.size(); + } else { + return recentExecutionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Execution getRecentExecutions(int index) { + if (recentExecutionsBuilder_ == null) { + return recentExecutions_.get(index); + } else { + return recentExecutionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRecentExecutions(int index, com.google.cloud.notebooks.v1.Execution value) { + if (recentExecutionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecentExecutionsIsMutable(); + recentExecutions_.set(index, value); + onChanged(); + } else { + recentExecutionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRecentExecutions( + int index, com.google.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.set(index, builderForValue.build()); + onChanged(); + } else { + recentExecutionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRecentExecutions(com.google.cloud.notebooks.v1.Execution value) { + if (recentExecutionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(value); + onChanged(); + } else { + recentExecutionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRecentExecutions(int index, com.google.cloud.notebooks.v1.Execution value) { + if (recentExecutionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(index, value); + onChanged(); + } else { + recentExecutionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRecentExecutions( + com.google.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(builderForValue.build()); + onChanged(); + } else { + recentExecutionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRecentExecutions( + int index, com.google.cloud.notebooks.v1.Execution.Builder builderForValue) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.add(index, builderForValue.build()); + onChanged(); + } else { + recentExecutionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllRecentExecutions( + java.lang.Iterable values) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, recentExecutions_); + onChanged(); + } else { + recentExecutionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRecentExecutions() { + if (recentExecutionsBuilder_ == null) { + recentExecutions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + recentExecutionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeRecentExecutions(int index) { + if (recentExecutionsBuilder_ == null) { + ensureRecentExecutionsIsMutable(); + recentExecutions_.remove(index); + onChanged(); + } else { + recentExecutionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Execution.Builder getRecentExecutionsBuilder(int index) { + return getRecentExecutionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.ExecutionOrBuilder getRecentExecutionsOrBuilder( + int index) { + if (recentExecutionsBuilder_ == null) { + return recentExecutions_.get(index); + } else { + return recentExecutionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRecentExecutionsOrBuilderList() { + if (recentExecutionsBuilder_ != null) { + return recentExecutionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(recentExecutions_); + } + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Execution.Builder addRecentExecutionsBuilder() { + return getRecentExecutionsFieldBuilder() + .addBuilder(com.google.cloud.notebooks.v1.Execution.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.notebooks.v1.Execution.Builder addRecentExecutionsBuilder(int index) { + return getRecentExecutionsFieldBuilder() + .addBuilder(index, com.google.cloud.notebooks.v1.Execution.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The most recent execution names triggered from this schedule and their
+     * corresponding states.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRecentExecutionsBuilderList() { + return getRecentExecutionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder> + getRecentExecutionsFieldBuilder() { + if (recentExecutionsBuilder_ == null) { + recentExecutionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.Execution, + com.google.cloud.notebooks.v1.Execution.Builder, + com.google.cloud.notebooks.v1.ExecutionOrBuilder>( + recentExecutions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + recentExecutions_ = null; + } + return recentExecutionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.Schedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.Schedule) + private static final com.google.cloud.notebooks.v1.Schedule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.Schedule(); + } + + public static com.google.cloud.notebooks.v1.Schedule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schedule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Schedule(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.Schedule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleName.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleName.java new file mode 100644 index 00000000..b3f30391 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 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.notebooks.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ScheduleName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SCHEDULE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/location/{location}/schedules/{schedule}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String schedule; + + @Deprecated + protected ScheduleName() { + project = null; + location = null; + schedule = null; + } + + private ScheduleName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + schedule = Preconditions.checkNotNull(builder.getSchedule()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSchedule() { + return schedule; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ScheduleName of(String project, String location, String schedule) { + return newBuilder().setProject(project).setLocation(location).setSchedule(schedule).build(); + } + + public static String format(String project, String location, String schedule) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSchedule(schedule) + .build() + .toString(); + } + + public static ScheduleName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SCHEDULE.validatedMatch( + formattedString, "ScheduleName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("schedule")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ScheduleName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SCHEDULE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (schedule != null) { + fieldMapBuilder.put("schedule", schedule); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SCHEDULE.instantiate( + "project", project, "location", location, "schedule", schedule); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ScheduleName that = ((ScheduleName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.schedule, that.schedule); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(schedule); + return h; + } + + /** Builder for projects/{project}/location/{location}/schedules/{schedule}. */ + public static class Builder { + private String project; + private String location; + private String schedule; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSchedule() { + return schedule; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setSchedule(String schedule) { + this.schedule = schedule; + return this; + } + + private Builder(ScheduleName scheduleName) { + this.project = scheduleName.project; + this.location = scheduleName.location; + this.schedule = scheduleName.schedule; + } + + public ScheduleName build() { + return new ScheduleName(this); + } + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleOrBuilder.java new file mode 100644 index 00000000..4a10666e --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleOrBuilder.java @@ -0,0 +1,365 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/schedule.proto + +package com.google.cloud.notebooks.v1; + +public interface ScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.Schedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of this schedule. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The name of this schedule. Format:
+   * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Display name used for UI purposes.
+   * Name can only contain alphanumeric characters, hyphens '-',
+   * and underscores '_'.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. Display name used for UI purposes.
+   * Name can only contain alphanumeric characters, hyphens '-',
+   * and underscores '_'.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A brief description of this environment.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * .google.cloud.notebooks.v1.Schedule.State state = 4; + * + * @return The state. + */ + com.google.cloud.notebooks.v1.Schedule.State getState(); + + /** + * + * + *
+   * Cron-tab formatted schedule by which the job will execute
+   * Format: minute, hour, day of month, month, day of week
+   * e.g. 0 0 * * WED = every Wednesday
+   * More examples: https://crontab.guru/examples.html
+   * 
+ * + * string cron_schedule = 5; + * + * @return The cronSchedule. + */ + java.lang.String getCronSchedule(); + /** + * + * + *
+   * Cron-tab formatted schedule by which the job will execute
+   * Format: minute, hour, day of month, month, day of week
+   * e.g. 0 0 * * WED = every Wednesday
+   * More examples: https://crontab.guru/examples.html
+   * 
+ * + * string cron_schedule = 5; + * + * @return The bytes for cronSchedule. + */ + com.google.protobuf.ByteString getCronScheduleBytes(); + + /** + * + * + *
+   * Timezone on which the cron_schedule.
+   * The value of this field must be a time zone name from the tz database.
+   * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+   * Note that some time zones include a provision for daylight savings time.
+   * The rules for daylight saving time are determined by the chosen tz.
+   * For UTC use the string "utc". If a time zone is not specified,
+   * the default will be in UTC (also known as GMT).
+   * 
+ * + * string time_zone = 6; + * + * @return The timeZone. + */ + java.lang.String getTimeZone(); + /** + * + * + *
+   * Timezone on which the cron_schedule.
+   * The value of this field must be a time zone name from the tz database.
+   * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+   * Note that some time zones include a provision for daylight savings time.
+   * The rules for daylight saving time are determined by the chosen tz.
+   * For UTC use the string "utc". If a time zone is not specified,
+   * the default will be in UTC (also known as GMT).
+   * 
+ * + * string time_zone = 6; + * + * @return The bytes for timeZone. + */ + com.google.protobuf.ByteString getTimeZoneBytes(); + + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the schedule was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time the schedule was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return Whether the executionTemplate field is set. + */ + boolean hasExecutionTemplate(); + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * + * @return The executionTemplate. + */ + com.google.cloud.notebooks.v1.ExecutionTemplate getExecutionTemplate(); + /** + * + * + *
+   * Notebook Execution Template corresponding to this schedule.
+   * 
+ * + * .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + com.google.cloud.notebooks.v1.ExecutionTemplateOrBuilder getExecutionTemplateOrBuilder(); + + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getRecentExecutionsList(); + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.notebooks.v1.Execution getRecentExecutions(int index); + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getRecentExecutionsCount(); + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getRecentExecutionsOrBuilderList(); + /** + * + * + *
+   * Output only. The most recent execution names triggered from this schedule and their
+   * corresponding states.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.notebooks.v1.ExecutionOrBuilder getRecentExecutionsOrBuilder(int index); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleProto.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleProto.java new file mode 100644 index 00000000..ce698940 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/ScheduleProto.java @@ -0,0 +1,108 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/schedule.proto + +package com.google.cloud.notebooks.v1; + +public final class ScheduleProto { + private ScheduleProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_notebooks_v1_Schedule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_notebooks_v1_Schedule_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n(google/cloud/notebooks/v1/schedule.pro" + + "to\022\031google.cloud.notebooks.v1\032\037google/ap" + + "i/field_behavior.proto\032\031google/api/resou" + + "rce.proto\032)google/cloud/notebooks/v1/exe" + + "cution.proto\032\037google/protobuf/timestamp." + + "proto\"\214\005\n\010Schedule\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\003\022\023\n\013description\030" + + "\003 \001(\t\0228\n\005state\030\004 \001(\0162).google.cloud.note" + + "books.v1.Schedule.State\022\025\n\rcron_schedule" + + "\030\005 \001(\t\022\021\n\ttime_zone\030\006 \001(\t\0224\n\013create_time" + + "\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "4\n\013update_time\030\010 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022H\n\022execution_template\030\t \001(" + + "\0132,.google.cloud.notebooks.v1.ExecutionT" + + "emplate\022D\n\021recent_executions\030\n \003(\0132$.goo" + + "gle.cloud.notebooks.v1.ExecutionB\003\340A\003\"x\n" + + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007ENABLED" + + "\020\001\022\n\n\006PAUSED\020\002\022\014\n\010DISABLED\020\003\022\021\n\rUPDATE_F" + + "AILED\020\004\022\020\n\014INITIALIZING\020\005\022\014\n\010DELETING\020\006:" + + "c\352A`\n!notebooks.googleapis.com/Schedule\022" + + ";projects/{project}/location/{location}/" + + "schedules/{schedule}Bt\n\035com.google.cloud" + + ".notebooks.v1B\rScheduleProtoP\001ZBgoogle.g" + + "olang.org/genproto/googleapis/cloud/note" + + "books/v1;notebooksb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.notebooks.v1.ExecutionProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_notebooks_v1_Schedule_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_notebooks_v1_Schedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_notebooks_v1_Schedule_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "State", + "CronSchedule", + "TimeZone", + "CreateTime", + "UpdateTime", + "ExecutionTemplate", + "RecentExecutions", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.notebooks.v1.ExecutionProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceAcceleratorRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceAcceleratorRequest.java new file mode 100644 index 00000000..e3552951 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceAcceleratorRequest.java @@ -0,0 +1,918 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for setting instance accelerator.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.SetInstanceAcceleratorRequest} + */ +public final class SetInstanceAcceleratorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) + SetInstanceAcceleratorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetInstanceAcceleratorRequest.newBuilder() to construct. + private SetInstanceAcceleratorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetInstanceAcceleratorRequest() { + name_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SetInstanceAcceleratorRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SetInstanceAcceleratorRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 24: + { + coreCount_ = input.readInt64(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest.class, + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+   * Required. Type of this accelerator.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. Type of this accelerator.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.AcceleratorType result = + com.google.cloud.notebooks.v1.Instance.AcceleratorType.valueOf(type_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.AcceleratorType.UNRECOGNIZED + : result; + } + + public static final int CORE_COUNT_FIELD_NUMBER = 3; + private long coreCount_; + /** + * + * + *
+   * Required. Count of cores of this accelerator. Note that not all combinations
+   * of `type` and `core_count` are valid. Check [GPUs on
+   * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
+   * find a valid combination. TPUs are not supported.
+   * 
+ * + * int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ + != com.google.cloud.notebooks.v1.Instance.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (coreCount_ != 0L) { + output.writeInt64(3, coreCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ + != com.google.cloud.notebooks.v1.Instance.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (coreCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, coreCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest other = + (com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (getCoreCount() != other.getCoreCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCoreCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for setting instance accelerator.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.SetInstanceAcceleratorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest.class, + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = 0; + + coreCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceAcceleratorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest build() { + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest buildPartial() { + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest result = + new com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest(this); + result.name_ = name_; + result.type_ = type_; + result.coreCount_ = coreCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest other) { + if (other == com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getCoreCount() != 0L) { + setCoreCount(other.getCoreCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. Type of this accelerator.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. Type of this accelerator.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of this accelerator.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.AcceleratorType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.Instance.AcceleratorType result = + com.google.cloud.notebooks.v1.Instance.AcceleratorType.valueOf(type_); + return result == null + ? com.google.cloud.notebooks.v1.Instance.AcceleratorType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Type of this accelerator.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.notebooks.v1.Instance.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Type of this accelerator.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private long coreCount_; + /** + * + * + *
+     * Required. Count of cores of this accelerator. Note that not all combinations
+     * of `type` and `core_count` are valid. Check [GPUs on
+     * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
+     * find a valid combination. TPUs are not supported.
+     * 
+ * + * int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The coreCount. + */ + @java.lang.Override + public long getCoreCount() { + return coreCount_; + } + /** + * + * + *
+     * Required. Count of cores of this accelerator. Note that not all combinations
+     * of `type` and `core_count` are valid. Check [GPUs on
+     * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
+     * find a valid combination. TPUs are not supported.
+     * 
+ * + * int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The coreCount to set. + * @return This builder for chaining. + */ + public Builder setCoreCount(long value) { + + coreCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Count of cores of this accelerator. Note that not all combinations
+     * of `type` and `core_count` are valid. Check [GPUs on
+     * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
+     * find a valid combination. TPUs are not supported.
+     * 
+ * + * int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCoreCount() { + + coreCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) + private static final com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest(); + } + + public static com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetInstanceAcceleratorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SetInstanceAcceleratorRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceAcceleratorRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceAcceleratorRequestOrBuilder.java new file mode 100644 index 00000000..5942a6eb --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceAcceleratorRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface SetInstanceAcceleratorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.SetInstanceAcceleratorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Type of this accelerator.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. Type of this accelerator.
+   * 
+ * + * + * .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.notebooks.v1.Instance.AcceleratorType getType(); + + /** + * + * + *
+   * Required. Count of cores of this accelerator. Note that not all combinations
+   * of `type` and `core_count` are valid. Check [GPUs on
+   * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
+   * find a valid combination. TPUs are not supported.
+   * 
+ * + * int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The coreCount. + */ + long getCoreCount(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceLabelsRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceLabelsRequest.java new file mode 100644 index 00000000..8c63a5b3 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceLabelsRequest.java @@ -0,0 +1,979 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for setting instance labels.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.SetInstanceLabelsRequest} + */ +public final class SetInstanceLabelsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.SetInstanceLabelsRequest) + SetInstanceLabelsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetInstanceLabelsRequest.newBuilder() to construct. + private SetInstanceLabelsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetInstanceLabelsRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SetInstanceLabelsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SetInstanceLabelsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest.class, + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 2; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.SetInstanceLabelsRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest other = + (com.google.cloud.notebooks.v1.SetInstanceLabelsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for setting instance labels.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.SetInstanceLabelsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.SetInstanceLabelsRequest) + com.google.cloud.notebooks.v1.SetInstanceLabelsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest.class, + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.SetInstanceLabelsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceLabelsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceLabelsRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.SetInstanceLabelsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceLabelsRequest build() { + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceLabelsRequest buildPartial() { + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest result = + new com.google.cloud.notebooks.v1.SetInstanceLabelsRequest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.SetInstanceLabelsRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.SetInstanceLabelsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.SetInstanceLabelsRequest other) { + if (other == com.google.cloud.notebooks.v1.SetInstanceLabelsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.SetInstanceLabelsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.SetInstanceLabelsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels to apply to this instance.
+     * These can be later modified by the setLabels method
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.SetInstanceLabelsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.SetInstanceLabelsRequest) + private static final com.google.cloud.notebooks.v1.SetInstanceLabelsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.SetInstanceLabelsRequest(); + } + + public static com.google.cloud.notebooks.v1.SetInstanceLabelsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetInstanceLabelsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SetInstanceLabelsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceLabelsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceLabelsRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceLabelsRequestOrBuilder.java new file mode 100644 index 00000000..d0257bba --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceLabelsRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface SetInstanceLabelsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.SetInstanceLabelsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels to apply to this instance.
+   * These can be later modified by the setLabels method
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceMachineTypeRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceMachineTypeRequest.java new file mode 100644 index 00000000..4a347306 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceMachineTypeRequest.java @@ -0,0 +1,830 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for setting instance machine type.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.SetInstanceMachineTypeRequest} + */ +public final class SetInstanceMachineTypeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) + SetInstanceMachineTypeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetInstanceMachineTypeRequest.newBuilder() to construct. + private SetInstanceMachineTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetInstanceMachineTypeRequest() { + name_ = ""; + machineType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SetInstanceMachineTypeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SetInstanceMachineTypeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + machineType_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest.class, + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Required. The [Compute Engine machine
+   * type](https://cloud.google.com/compute/docs/machine-types).
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [Compute Engine machine
+   * type](https://cloud.google.com/compute/docs/machine-types).
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, machineType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, machineType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest other = + (com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for setting instance machine type.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.SetInstanceMachineTypeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest.class, + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + machineType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_SetInstanceMachineTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest build() { + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest buildPartial() { + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest result = + new com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest(this); + result.name_ = name_; + result.machineType_ = machineType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest other) { + if (other == com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types).
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types).
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types).
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types).
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [Compute Engine machine
+     * type](https://cloud.google.com/compute/docs/machine-types).
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) + private static final com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest(); + } + + public static com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetInstanceMachineTypeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SetInstanceMachineTypeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceMachineTypeRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceMachineTypeRequestOrBuilder.java new file mode 100644 index 00000000..b3b5ec16 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SetInstanceMachineTypeRequestOrBuilder.java @@ -0,0 +1,79 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface SetInstanceMachineTypeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.SetInstanceMachineTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The [Compute Engine machine
+   * type](https://cloud.google.com/compute/docs/machine-types).
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Required. The [Compute Engine machine
+   * type](https://cloud.google.com/compute/docs/machine-types).
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartInstanceRequest.java new file mode 100644 index 00000000..0fef1d01 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartInstanceRequest.java @@ -0,0 +1,643 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for starting a notebook instance
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.StartInstanceRequest} + */ +public final class StartInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.StartInstanceRequest) + StartInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartInstanceRequest.newBuilder() to construct. + private StartInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StartInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StartInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StartInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.StartInstanceRequest.class, + com.google.cloud.notebooks.v1.StartInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.StartInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.StartInstanceRequest other = + (com.google.cloud.notebooks.v1.StartInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.StartInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for starting a notebook instance
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.StartInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.StartInstanceRequest) + com.google.cloud.notebooks.v1.StartInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StartInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StartInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.StartInstanceRequest.class, + com.google.cloud.notebooks.v1.StartInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.StartInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StartInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StartInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.StartInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StartInstanceRequest build() { + com.google.cloud.notebooks.v1.StartInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StartInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.StartInstanceRequest result = + new com.google.cloud.notebooks.v1.StartInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.StartInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.StartInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.StartInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.StartInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.StartInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.StartInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.StartInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.StartInstanceRequest) + private static final com.google.cloud.notebooks.v1.StartInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.StartInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.StartInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StartInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartInstanceRequestOrBuilder.java new file mode 100644 index 00000000..e8ea435b --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface StartInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.StartInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartRuntimeRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartRuntimeRequest.java new file mode 100644 index 00000000..dca5b2b5 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartRuntimeRequest.java @@ -0,0 +1,643 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for starting a Managed Notebook Runtime.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.StartRuntimeRequest} + */ +public final class StartRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.StartRuntimeRequest) + StartRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartRuntimeRequest.newBuilder() to construct. + private StartRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartRuntimeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StartRuntimeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.StartRuntimeRequest.class, + com.google.cloud.notebooks.v1.StartRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.StartRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.StartRuntimeRequest other = + (com.google.cloud.notebooks.v1.StartRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.StartRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for starting a Managed Notebook Runtime.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.StartRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.StartRuntimeRequest) + com.google.cloud.notebooks.v1.StartRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.StartRuntimeRequest.class, + com.google.cloud.notebooks.v1.StartRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.StartRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StartRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StartRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.StartRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StartRuntimeRequest build() { + com.google.cloud.notebooks.v1.StartRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StartRuntimeRequest buildPartial() { + com.google.cloud.notebooks.v1.StartRuntimeRequest result = + new com.google.cloud.notebooks.v1.StartRuntimeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.StartRuntimeRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.StartRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.StartRuntimeRequest other) { + if (other == com.google.cloud.notebooks.v1.StartRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.StartRuntimeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.StartRuntimeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.StartRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.StartRuntimeRequest) + private static final com.google.cloud.notebooks.v1.StartRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.StartRuntimeRequest(); + } + + public static com.google.cloud.notebooks.v1.StartRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartRuntimeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StartRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartRuntimeRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartRuntimeRequestOrBuilder.java new file mode 100644 index 00000000..107a22d0 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StartRuntimeRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface StartRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.StartRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopInstanceRequest.java new file mode 100644 index 00000000..c5f585fa --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopInstanceRequest.java @@ -0,0 +1,643 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for stopping a notebook instance
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.StopInstanceRequest} + */ +public final class StopInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.StopInstanceRequest) + StopInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopInstanceRequest.newBuilder() to construct. + private StopInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StopInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StopInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StopInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.StopInstanceRequest.class, + com.google.cloud.notebooks.v1.StopInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.StopInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.StopInstanceRequest other = + (com.google.cloud.notebooks.v1.StopInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.StopInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for stopping a notebook instance
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.StopInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.StopInstanceRequest) + com.google.cloud.notebooks.v1.StopInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StopInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StopInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.StopInstanceRequest.class, + com.google.cloud.notebooks.v1.StopInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.StopInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_StopInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StopInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.StopInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StopInstanceRequest build() { + com.google.cloud.notebooks.v1.StopInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StopInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.StopInstanceRequest result = + new com.google.cloud.notebooks.v1.StopInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.StopInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.StopInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.StopInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.StopInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.StopInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.StopInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.StopInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.StopInstanceRequest) + private static final com.google.cloud.notebooks.v1.StopInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.StopInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.StopInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StopInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StopInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopInstanceRequestOrBuilder.java new file mode 100644 index 00000000..d2b22e29 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface StopInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.StopInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopRuntimeRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopRuntimeRequest.java new file mode 100644 index 00000000..4000e19d --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopRuntimeRequest.java @@ -0,0 +1,642 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for stopping a Managed Notebook Runtime.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.StopRuntimeRequest} + */ +public final class StopRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.StopRuntimeRequest) + StopRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopRuntimeRequest.newBuilder() to construct. + private StopRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopRuntimeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopRuntimeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StopRuntimeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.StopRuntimeRequest.class, + com.google.cloud.notebooks.v1.StopRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.StopRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.StopRuntimeRequest other = + (com.google.cloud.notebooks.v1.StopRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.StopRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for stopping a Managed Notebook Runtime.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.StopRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.StopRuntimeRequest) + com.google.cloud.notebooks.v1.StopRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.StopRuntimeRequest.class, + com.google.cloud.notebooks.v1.StopRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.StopRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_StopRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StopRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.StopRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StopRuntimeRequest build() { + com.google.cloud.notebooks.v1.StopRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StopRuntimeRequest buildPartial() { + com.google.cloud.notebooks.v1.StopRuntimeRequest result = + new com.google.cloud.notebooks.v1.StopRuntimeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.StopRuntimeRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.StopRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.StopRuntimeRequest other) { + if (other == com.google.cloud.notebooks.v1.StopRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.StopRuntimeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.StopRuntimeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.StopRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.StopRuntimeRequest) + private static final com.google.cloud.notebooks.v1.StopRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.StopRuntimeRequest(); + } + + public static com.google.cloud.notebooks.v1.StopRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StopRuntimeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.StopRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopRuntimeRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopRuntimeRequestOrBuilder.java new file mode 100644 index 00000000..9f966b8f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/StopRuntimeRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface StopRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.StopRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SwitchRuntimeRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SwitchRuntimeRequest.java new file mode 100644 index 00000000..dba3ba62 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SwitchRuntimeRequest.java @@ -0,0 +1,1106 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for switching a Managed Notebook Runtime.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.SwitchRuntimeRequest} + */ +public final class SwitchRuntimeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.SwitchRuntimeRequest) + SwitchRuntimeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SwitchRuntimeRequest.newBuilder() to construct. + private SwitchRuntimeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SwitchRuntimeRequest() { + name_ = ""; + machineType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SwitchRuntimeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SwitchRuntimeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + machineType_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder subBuilder = null; + if (acceleratorConfig_ != null) { + subBuilder = acceleratorConfig_.toBuilder(); + } + acceleratorConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(acceleratorConfig_); + acceleratorConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.SwitchRuntimeRequest.class, + com.google.cloud.notebooks.v1.SwitchRuntimeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * machine type.
+   * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * machine type.
+   * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig acceleratorConfig_; + /** + * + * + *
+   * accelerator config.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + * + * @return Whether the acceleratorConfig field is set. + */ + @java.lang.Override + public boolean hasAcceleratorConfig() { + return acceleratorConfig_ != null; + } + /** + * + * + *
+   * accelerator config.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + * + * @return The acceleratorConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig() { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + /** + * + * + *
+   * accelerator config.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + return getAcceleratorConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, machineType_); + } + if (acceleratorConfig_ != null) { + output.writeMessage(3, getAcceleratorConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, machineType_); + } + if (acceleratorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAcceleratorConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.SwitchRuntimeRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.SwitchRuntimeRequest other = + (com.google.cloud.notebooks.v1.SwitchRuntimeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false; + if (hasAcceleratorConfig()) { + if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + if (hasAcceleratorConfig()) { + hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.SwitchRuntimeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for switching a Managed Notebook Runtime.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.SwitchRuntimeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.SwitchRuntimeRequest) + com.google.cloud.notebooks.v1.SwitchRuntimeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.SwitchRuntimeRequest.class, + com.google.cloud.notebooks.v1.SwitchRuntimeRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.SwitchRuntimeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + machineType_ = ""; + + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = null; + } else { + acceleratorConfig_ = null; + acceleratorConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.ManagedNotebooksProto + .internal_static_google_cloud_notebooks_v1_SwitchRuntimeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SwitchRuntimeRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.SwitchRuntimeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SwitchRuntimeRequest build() { + com.google.cloud.notebooks.v1.SwitchRuntimeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SwitchRuntimeRequest buildPartial() { + com.google.cloud.notebooks.v1.SwitchRuntimeRequest result = + new com.google.cloud.notebooks.v1.SwitchRuntimeRequest(this); + result.name_ = name_; + result.machineType_ = machineType_; + if (acceleratorConfigBuilder_ == null) { + result.acceleratorConfig_ = acceleratorConfig_; + } else { + result.acceleratorConfig_ = acceleratorConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.SwitchRuntimeRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.SwitchRuntimeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.SwitchRuntimeRequest other) { + if (other == com.google.cloud.notebooks.v1.SwitchRuntimeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + onChanged(); + } + if (other.hasAcceleratorConfig()) { + mergeAcceleratorConfig(other.getAcceleratorConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.SwitchRuntimeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.SwitchRuntimeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * machine type.
+     * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * machine type.
+     * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * machine type.
+     * 
+ * + * string machine_type = 2; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * machine type.
+     * 
+ * + * string machine_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * machine type.
+     * 
+ * + * string machine_type = 2; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig acceleratorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder> + acceleratorConfigBuilder_; + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + * + * @return Whether the acceleratorConfig field is set. + */ + public boolean hasAcceleratorConfig() { + return acceleratorConfigBuilder_ != null || acceleratorConfig_ != null; + } + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + * + * @return The acceleratorConfig. + */ + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } else { + return acceleratorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + public Builder setAcceleratorConfig( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceleratorConfig_ = value; + onChanged(); + } else { + acceleratorConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + public Builder setAcceleratorConfig( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder builderForValue) { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = builderForValue.build(); + onChanged(); + } else { + acceleratorConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + public Builder mergeAcceleratorConfig( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (acceleratorConfig_ != null) { + acceleratorConfig_ = + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.newBuilder(acceleratorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + acceleratorConfig_ = value; + } + onChanged(); + } else { + acceleratorConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + public Builder clearAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = null; + onChanged(); + } else { + acceleratorConfig_ = null; + acceleratorConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder + getAcceleratorConfigBuilder() { + + onChanged(); + return getAcceleratorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + if (acceleratorConfigBuilder_ != null) { + return acceleratorConfigBuilder_.getMessageOrBuilder(); + } else { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + } + /** + * + * + *
+     * accelerator config.
+     * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder> + getAcceleratorConfigFieldBuilder() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder>( + getAcceleratorConfig(), getParentForChildren(), isClean()); + acceleratorConfig_ = null; + } + return acceleratorConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.SwitchRuntimeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.SwitchRuntimeRequest) + private static final com.google.cloud.notebooks.v1.SwitchRuntimeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.SwitchRuntimeRequest(); + } + + public static com.google.cloud.notebooks.v1.SwitchRuntimeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SwitchRuntimeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SwitchRuntimeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.SwitchRuntimeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SwitchRuntimeRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SwitchRuntimeRequestOrBuilder.java new file mode 100644 index 00000000..218aad9f --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/SwitchRuntimeRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/managed_service.proto + +package com.google.cloud.notebooks.v1; + +public interface SwitchRuntimeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.SwitchRuntimeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * machine type.
+   * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * machine type.
+   * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * accelerator config.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + * + * @return Whether the acceleratorConfig field is set. + */ + boolean hasAcceleratorConfig(); + /** + * + * + *
+   * accelerator config.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + * + * @return The acceleratorConfig. + */ + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig(); + /** + * + * + *
+   * accelerator config.
+   * 
+ * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder getAcceleratorConfigOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/TriggerScheduleRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/TriggerScheduleRequest.java new file mode 100644 index 00000000..06ab3003 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/TriggerScheduleRequest.java @@ -0,0 +1,657 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for created scheduled notebooks
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.TriggerScheduleRequest} + */ +public final class TriggerScheduleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.TriggerScheduleRequest) + TriggerScheduleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TriggerScheduleRequest.newBuilder() to construct. + private TriggerScheduleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TriggerScheduleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TriggerScheduleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TriggerScheduleRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.TriggerScheduleRequest.class, + com.google.cloud.notebooks.v1.TriggerScheduleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.TriggerScheduleRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.TriggerScheduleRequest other = + (com.google.cloud.notebooks.v1.TriggerScheduleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.TriggerScheduleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for created scheduled notebooks
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.TriggerScheduleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.TriggerScheduleRequest) + com.google.cloud.notebooks.v1.TriggerScheduleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.TriggerScheduleRequest.class, + com.google.cloud.notebooks.v1.TriggerScheduleRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.TriggerScheduleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_TriggerScheduleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.TriggerScheduleRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.TriggerScheduleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.TriggerScheduleRequest build() { + com.google.cloud.notebooks.v1.TriggerScheduleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.TriggerScheduleRequest buildPartial() { + com.google.cloud.notebooks.v1.TriggerScheduleRequest result = + new com.google.cloud.notebooks.v1.TriggerScheduleRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.TriggerScheduleRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.TriggerScheduleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.TriggerScheduleRequest other) { + if (other == com.google.cloud.notebooks.v1.TriggerScheduleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.TriggerScheduleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.TriggerScheduleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.TriggerScheduleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.TriggerScheduleRequest) + private static final com.google.cloud.notebooks.v1.TriggerScheduleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.TriggerScheduleRequest(); + } + + public static com.google.cloud.notebooks.v1.TriggerScheduleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TriggerScheduleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TriggerScheduleRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.TriggerScheduleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/TriggerScheduleRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/TriggerScheduleRequestOrBuilder.java new file mode 100644 index 00000000..20b70133 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/TriggerScheduleRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface TriggerScheduleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.TriggerScheduleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateInstanceConfigRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateInstanceConfigRequest.java new file mode 100644 index 00000000..f942b978 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateInstanceConfigRequest.java @@ -0,0 +1,921 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for updating instance configurations.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.UpdateInstanceConfigRequest} + */ +public final class UpdateInstanceConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.UpdateInstanceConfigRequest) + UpdateInstanceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateInstanceConfigRequest.newBuilder() to construct. + private UpdateInstanceConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInstanceConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInstanceConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateInstanceConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.notebooks.v1.InstanceConfig.Builder subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = + input.readMessage( + com.google.cloud.notebooks.v1.InstanceConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest.class, + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.notebooks.v1.InstanceConfig config_; + /** + * + * + *
+   * The instance configurations to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + * + * + *
+   * The instance configurations to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.InstanceConfig getConfig() { + return config_ == null + ? com.google.cloud.notebooks.v1.InstanceConfig.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * The instance configurations to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.InstanceConfigOrBuilder getConfigOrBuilder() { + return getConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (config_ != null) { + output.writeMessage(2, getConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest other = + (com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for updating instance configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.UpdateInstanceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.UpdateInstanceConfigRequest) + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest.class, + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateInstanceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest build() { + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest buildPartial() { + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest result = + new com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest(this); + result.name_ = name_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest other) { + if (other == com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.InstanceConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.InstanceConfig, + com.google.cloud.notebooks.v1.InstanceConfig.Builder, + com.google.cloud.notebooks.v1.InstanceConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + * + * @return The config. + */ + public com.google.cloud.notebooks.v1.InstanceConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.notebooks.v1.InstanceConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + public Builder setConfig(com.google.cloud.notebooks.v1.InstanceConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + public Builder setConfig(com.google.cloud.notebooks.v1.InstanceConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + public Builder mergeConfig(com.google.cloud.notebooks.v1.InstanceConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.cloud.notebooks.v1.InstanceConfig.newBuilder(config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + public com.google.cloud.notebooks.v1.InstanceConfig.Builder getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + public com.google.cloud.notebooks.v1.InstanceConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.notebooks.v1.InstanceConfig.getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * The instance configurations to be updated.
+     * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.InstanceConfig, + com.google.cloud.notebooks.v1.InstanceConfig.Builder, + com.google.cloud.notebooks.v1.InstanceConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.InstanceConfig, + com.google.cloud.notebooks.v1.InstanceConfig.Builder, + com.google.cloud.notebooks.v1.InstanceConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.UpdateInstanceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.UpdateInstanceConfigRequest) + private static final com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest(); + } + + public static com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInstanceConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateInstanceConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateInstanceConfigRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateInstanceConfigRequestOrBuilder.java new file mode 100644 index 00000000..0b3cfc20 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateInstanceConfigRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface UpdateInstanceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.UpdateInstanceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The instance configurations to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * The instance configurations to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + * + * @return The config. + */ + com.google.cloud.notebooks.v1.InstanceConfig getConfig(); + /** + * + * + *
+   * The instance configurations to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + com.google.cloud.notebooks.v1.InstanceConfigOrBuilder getConfigOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateShieldedInstanceConfigRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateShieldedInstanceConfigRequest.java new file mode 100644 index 00000000..8a41220e --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateShieldedInstanceConfigRequest.java @@ -0,0 +1,966 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for updating the Shielded Instance config for a notebook instance.
+ * You can only use this method on a stopped instance
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest} + */ +public final class UpdateShieldedInstanceConfigRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) + UpdateShieldedInstanceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateShieldedInstanceConfigRequest.newBuilder() to construct. + private UpdateShieldedInstanceConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateShieldedInstanceConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateShieldedInstanceConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateShieldedInstanceConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder subBuilder = + null; + if (shieldedInstanceConfig_ != null) { + subBuilder = shieldedInstanceConfig_.toBuilder(); + } + shieldedInstanceConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shieldedInstanceConfig_); + shieldedInstanceConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest.class, + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shieldedInstanceConfig_; + /** + * + * + *
+   * ShieldedInstance configuration to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfig_ != null; + } + /** + * + * + *
+   * ShieldedInstance configuration to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + * + * @return The shieldedInstanceConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig getShieldedInstanceConfig() { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + /** + * + * + *
+   * ShieldedInstance configuration to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + return getShieldedInstanceConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (shieldedInstanceConfig_ != null) { + output.writeMessage(2, getShieldedInstanceConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (shieldedInstanceConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getShieldedInstanceConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest other = + (com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false; + if (hasShieldedInstanceConfig()) { + if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasShieldedInstanceConfig()) { + hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShieldedInstanceConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for updating the Shielded Instance config for a notebook instance.
+   * You can only use this method on a stopped instance
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest.class, + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = null; + } else { + shieldedInstanceConfig_ = null; + shieldedInstanceConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpdateShieldedInstanceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest build() { + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest buildPartial() { + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest result = + new com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest(this); + result.name_ = name_; + if (shieldedInstanceConfigBuilder_ == null) { + result.shieldedInstanceConfig_ = shieldedInstanceConfig_; + } else { + result.shieldedInstanceConfig_ = shieldedInstanceConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest other) { + if (other + == com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasShieldedInstanceConfig()) { + mergeShieldedInstanceConfig(other.getShieldedInstanceConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shieldedInstanceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder> + shieldedInstanceConfigBuilder_; + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfigBuilder_ != null || shieldedInstanceConfig_ != null; + } + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + * + * @return The shieldedInstanceConfig. + */ + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + getShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } else { + return shieldedInstanceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + public Builder setShieldedInstanceConfig( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shieldedInstanceConfig_ = value; + onChanged(); + } else { + shieldedInstanceConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + public Builder setShieldedInstanceConfig( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder builderForValue) { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = builderForValue.build(); + onChanged(); + } else { + shieldedInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + public Builder mergeShieldedInstanceConfig( + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (shieldedInstanceConfig_ != null) { + shieldedInstanceConfig_ = + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.newBuilder( + shieldedInstanceConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + shieldedInstanceConfig_ = value; + } + onChanged(); + } else { + shieldedInstanceConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + public Builder clearShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = null; + onChanged(); + } else { + shieldedInstanceConfig_ = null; + shieldedInstanceConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder + getShieldedInstanceConfigBuilder() { + + onChanged(); + return getShieldedInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + public com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + if (shieldedInstanceConfigBuilder_ != null) { + return shieldedInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + } + /** + * + * + *
+     * ShieldedInstance configuration to be updated.
+     * 
+ * + * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder> + getShieldedInstanceConfigFieldBuilder() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder>( + getShieldedInstanceConfig(), getParentForChildren(), isClean()); + shieldedInstanceConfig_ = null; + } + return shieldedInstanceConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) + private static final com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest(); + } + + public static com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateShieldedInstanceConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateShieldedInstanceConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateShieldedInstanceConfigRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateShieldedInstanceConfigRequestOrBuilder.java new file mode 100644 index 00000000..9fc7cebe --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpdateShieldedInstanceConfigRequestOrBuilder.java @@ -0,0 +1,91 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface UpdateShieldedInstanceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * ShieldedInstance configuration to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + boolean hasShieldedInstanceConfig(); + /** + * + * + *
+   * ShieldedInstance configuration to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + * + * @return The shieldedInstanceConfig. + */ + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig getShieldedInstanceConfig(); + /** + * + * + *
+   * ShieldedInstance configuration to be updated.
+   * 
+ * + * .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * + */ + com.google.cloud.notebooks.v1.Instance.ShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceInternalRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceInternalRequest.java new file mode 100644 index 00000000..d03f6615 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceInternalRequest.java @@ -0,0 +1,834 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for upgrading a notebook instance from within the VM
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.UpgradeInstanceInternalRequest} + */ +public final class UpgradeInstanceInternalRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) + UpgradeInstanceInternalRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeInstanceInternalRequest.newBuilder() to construct. + private UpgradeInstanceInternalRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeInstanceInternalRequest() { + name_ = ""; + vmId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeInstanceInternalRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpgradeInstanceInternalRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + vmId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest.class, + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VM_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object vmId_; + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + @java.lang.Override + public java.lang.String getVmId() { + java.lang.Object ref = vmId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVmIdBytes() { + java.lang.Object ref = vmId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getVmIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vmId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getVmIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vmId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest other = + (com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVmId().equals(other.getVmId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VM_ID_FIELD_NUMBER; + hash = (53 * hash) + getVmId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for upgrading a notebook instance from within the VM
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.UpgradeInstanceInternalRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest.class, + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + vmId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceInternalRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest + getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest build() { + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest buildPartial() { + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest result = + new com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest(this); + result.name_ = name_; + result.vmId_ = vmId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest other) { + if (other + == com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVmId().isEmpty()) { + vmId_ = other.vmId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object vmId_ = ""; + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + public java.lang.String getVmId() { + java.lang.Object ref = vmId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vmId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + public com.google.protobuf.ByteString getVmIdBytes() { + java.lang.Object ref = vmId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vmId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vmId to set. + * @return This builder for chaining. + */ + public Builder setVmId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vmId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVmId() { + + vmId_ = getDefaultInstance().getVmId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The VM hardware token for authenticating the VM.
+     * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+     * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for vmId to set. + * @return This builder for chaining. + */ + public Builder setVmIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vmId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) + private static final com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest(); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeInstanceInternalRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeInstanceInternalRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceInternalRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceInternalRequestOrBuilder.java new file mode 100644 index 00000000..6ffde65e --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceInternalRequestOrBuilder.java @@ -0,0 +1,79 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface UpgradeInstanceInternalRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.UpgradeInstanceInternalRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vmId. + */ + java.lang.String getVmId(); + /** + * + * + *
+   * Required. The VM hardware token for authenticating the VM.
+   * https://cloud.google.com/compute/docs/instances/verifying-instance-identity
+   * 
+ * + * string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for vmId. + */ + com.google.protobuf.ByteString getVmIdBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceRequest.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceRequest.java new file mode 100644 index 00000000..ce7a9880 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceRequest.java @@ -0,0 +1,643 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Request for upgrading a notebook instance
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.UpgradeInstanceRequest} + */ +public final class UpgradeInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.UpgradeInstanceRequest) + UpgradeInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpgradeInstanceRequest.newBuilder() to construct. + private UpgradeInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpgradeInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpgradeInstanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpgradeInstanceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.UpgradeInstanceRequest.class, + com.google.cloud.notebooks.v1.UpgradeInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.UpgradeInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.UpgradeInstanceRequest other = + (com.google.cloud.notebooks.v1.UpgradeInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.UpgradeInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for upgrading a notebook instance
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.UpgradeInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.UpgradeInstanceRequest) + com.google.cloud.notebooks.v1.UpgradeInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.UpgradeInstanceRequest.class, + com.google.cloud.notebooks.v1.UpgradeInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.UpgradeInstanceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.NotebooksProto + .internal_static_google_cloud_notebooks_v1_UpgradeInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpgradeInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.UpgradeInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpgradeInstanceRequest build() { + com.google.cloud.notebooks.v1.UpgradeInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpgradeInstanceRequest buildPartial() { + com.google.cloud.notebooks.v1.UpgradeInstanceRequest result = + new com.google.cloud.notebooks.v1.UpgradeInstanceRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.UpgradeInstanceRequest) { + return mergeFrom((com.google.cloud.notebooks.v1.UpgradeInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.UpgradeInstanceRequest other) { + if (other == com.google.cloud.notebooks.v1.UpgradeInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.UpgradeInstanceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.UpgradeInstanceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format:
+     * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.UpgradeInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.UpgradeInstanceRequest) + private static final com.google.cloud.notebooks.v1.UpgradeInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.UpgradeInstanceRequest(); + } + + public static com.google.cloud.notebooks.v1.UpgradeInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpgradeInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpgradeInstanceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.UpgradeInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceRequestOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceRequestOrBuilder.java new file mode 100644 index 00000000..d8a16091 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/UpgradeInstanceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/service.proto + +package com.google.cloud.notebooks.v1; + +public interface UpgradeInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.UpgradeInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Format:
+   * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachine.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachine.java new file mode 100644 index 00000000..14b5140d --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachine.java @@ -0,0 +1,1098 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Runtime using Virtual Machine for computing.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.VirtualMachine} + */ +public final class VirtualMachine extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.VirtualMachine) + VirtualMachineOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualMachine.newBuilder() to construct. + private VirtualMachine(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualMachine() { + instanceName_ = ""; + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualMachine(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VirtualMachine( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instanceId_ = s; + break; + } + case 26: + { + com.google.cloud.notebooks.v1.VirtualMachineConfig.Builder subBuilder = null; + if (virtualMachineConfig_ != null) { + subBuilder = virtualMachineConfig_.toBuilder(); + } + virtualMachineConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.VirtualMachineConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(virtualMachineConfig_); + virtualMachineConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.VirtualMachine.class, + com.google.cloud.notebooks.v1.VirtualMachine.Builder.class); + } + + public static final int INSTANCE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object instanceName_; + /** + * + * + *
+   * Output only. The user-friendly name of the Managed Compute Engine instance.
+   * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceName. + */ + @java.lang.Override + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The user-friendly name of the Managed Compute Engine instance.
+   * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object instanceId_; + /** + * + * + *
+   * Output only. The unique identifier of the Managed Compute Engine instance.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The unique identifier of the Managed Compute Engine instance.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIRTUAL_MACHINE_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.notebooks.v1.VirtualMachineConfig virtualMachineConfig_; + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return Whether the virtualMachineConfig field is set. + */ + @java.lang.Override + public boolean hasVirtualMachineConfig() { + return virtualMachineConfig_ != null; + } + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return The virtualMachineConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineConfig getVirtualMachineConfig() { + return virtualMachineConfig_ == null + ? com.google.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance() + : virtualMachineConfig_; + } + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineConfigOrBuilder + getVirtualMachineConfigOrBuilder() { + return getVirtualMachineConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getInstanceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceName_); + } + if (!getInstanceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (virtualMachineConfig_ != null) { + output.writeMessage(3, getVirtualMachineConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInstanceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceName_); + } + if (!getInstanceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (virtualMachineConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getVirtualMachineConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.VirtualMachine)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.VirtualMachine other = + (com.google.cloud.notebooks.v1.VirtualMachine) obj; + + if (!getInstanceName().equals(other.getInstanceName())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (hasVirtualMachineConfig() != other.hasVirtualMachineConfig()) return false; + if (hasVirtualMachineConfig()) { + if (!getVirtualMachineConfig().equals(other.getVirtualMachineConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTANCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceName().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + if (hasVirtualMachineConfig()) { + hash = (37 * hash) + VIRTUAL_MACHINE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVirtualMachineConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.VirtualMachine prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Runtime using Virtual Machine for computing.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.VirtualMachine} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.VirtualMachine) + com.google.cloud.notebooks.v1.VirtualMachineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.VirtualMachine.class, + com.google.cloud.notebooks.v1.VirtualMachine.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.VirtualMachine.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + instanceName_ = ""; + + instanceId_ = ""; + + if (virtualMachineConfigBuilder_ == null) { + virtualMachineConfig_ = null; + } else { + virtualMachineConfig_ = null; + virtualMachineConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachine_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachine getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachine build() { + com.google.cloud.notebooks.v1.VirtualMachine result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachine buildPartial() { + com.google.cloud.notebooks.v1.VirtualMachine result = + new com.google.cloud.notebooks.v1.VirtualMachine(this); + result.instanceName_ = instanceName_; + result.instanceId_ = instanceId_; + if (virtualMachineConfigBuilder_ == null) { + result.virtualMachineConfig_ = virtualMachineConfig_; + } else { + result.virtualMachineConfig_ = virtualMachineConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.VirtualMachine) { + return mergeFrom((com.google.cloud.notebooks.v1.VirtualMachine) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.VirtualMachine other) { + if (other == com.google.cloud.notebooks.v1.VirtualMachine.getDefaultInstance()) return this; + if (!other.getInstanceName().isEmpty()) { + instanceName_ = other.instanceName_; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + onChanged(); + } + if (other.hasVirtualMachineConfig()) { + mergeVirtualMachineConfig(other.getVirtualMachineConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.VirtualMachine parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.VirtualMachine) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object instanceName_ = ""; + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceName. + */ + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceName. + */ + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceName() { + + instanceName_ = getDefaultInstance().getInstanceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The user-friendly name of the Managed Compute Engine instance.
+     * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instanceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + + instanceId_ = getDefaultInstance().getInstanceId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique identifier of the Managed Compute Engine instance.
+     * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instanceId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.notebooks.v1.VirtualMachineConfig virtualMachineConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VirtualMachineConfig, + com.google.cloud.notebooks.v1.VirtualMachineConfig.Builder, + com.google.cloud.notebooks.v1.VirtualMachineConfigOrBuilder> + virtualMachineConfigBuilder_; + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return Whether the virtualMachineConfig field is set. + */ + public boolean hasVirtualMachineConfig() { + return virtualMachineConfigBuilder_ != null || virtualMachineConfig_ != null; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return The virtualMachineConfig. + */ + public com.google.cloud.notebooks.v1.VirtualMachineConfig getVirtualMachineConfig() { + if (virtualMachineConfigBuilder_ == null) { + return virtualMachineConfig_ == null + ? com.google.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance() + : virtualMachineConfig_; + } else { + return virtualMachineConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + public Builder setVirtualMachineConfig( + com.google.cloud.notebooks.v1.VirtualMachineConfig value) { + if (virtualMachineConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + virtualMachineConfig_ = value; + onChanged(); + } else { + virtualMachineConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + public Builder setVirtualMachineConfig( + com.google.cloud.notebooks.v1.VirtualMachineConfig.Builder builderForValue) { + if (virtualMachineConfigBuilder_ == null) { + virtualMachineConfig_ = builderForValue.build(); + onChanged(); + } else { + virtualMachineConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + public Builder mergeVirtualMachineConfig( + com.google.cloud.notebooks.v1.VirtualMachineConfig value) { + if (virtualMachineConfigBuilder_ == null) { + if (virtualMachineConfig_ != null) { + virtualMachineConfig_ = + com.google.cloud.notebooks.v1.VirtualMachineConfig.newBuilder(virtualMachineConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + virtualMachineConfig_ = value; + } + onChanged(); + } else { + virtualMachineConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + public Builder clearVirtualMachineConfig() { + if (virtualMachineConfigBuilder_ == null) { + virtualMachineConfig_ = null; + onChanged(); + } else { + virtualMachineConfig_ = null; + virtualMachineConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + public com.google.cloud.notebooks.v1.VirtualMachineConfig.Builder + getVirtualMachineConfigBuilder() { + + onChanged(); + return getVirtualMachineConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + public com.google.cloud.notebooks.v1.VirtualMachineConfigOrBuilder + getVirtualMachineConfigOrBuilder() { + if (virtualMachineConfigBuilder_ != null) { + return virtualMachineConfigBuilder_.getMessageOrBuilder(); + } else { + return virtualMachineConfig_ == null + ? com.google.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance() + : virtualMachineConfig_; + } + } + /** + * + * + *
+     * Virtual Machine configuration settings.
+     * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VirtualMachineConfig, + com.google.cloud.notebooks.v1.VirtualMachineConfig.Builder, + com.google.cloud.notebooks.v1.VirtualMachineConfigOrBuilder> + getVirtualMachineConfigFieldBuilder() { + if (virtualMachineConfigBuilder_ == null) { + virtualMachineConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.VirtualMachineConfig, + com.google.cloud.notebooks.v1.VirtualMachineConfig.Builder, + com.google.cloud.notebooks.v1.VirtualMachineConfigOrBuilder>( + getVirtualMachineConfig(), getParentForChildren(), isClean()); + virtualMachineConfig_ = null; + } + return virtualMachineConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.VirtualMachine) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.VirtualMachine) + private static final com.google.cloud.notebooks.v1.VirtualMachine DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.VirtualMachine(); + } + + public static com.google.cloud.notebooks.v1.VirtualMachine getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualMachine parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VirtualMachine(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachine getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineConfig.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineConfig.java new file mode 100644 index 00000000..c1e61b78 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineConfig.java @@ -0,0 +1,4925 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * The config settings for virtual machine.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.VirtualMachineConfig} + */ +public final class VirtualMachineConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.VirtualMachineConfig) + VirtualMachineConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use VirtualMachineConfig.newBuilder() to construct. + private VirtualMachineConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VirtualMachineConfig() { + zone_ = ""; + machineType_ = ""; + containerImages_ = java.util.Collections.emptyList(); + network_ = ""; + subnet_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + nicType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VirtualMachineConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VirtualMachineConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + zone_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + machineType_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + containerImages_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + containerImages_.add( + input.readMessage( + com.google.cloud.notebooks.v1.ContainerImage.parser(), extensionRegistry)); + break; + } + case 34: + { + com.google.cloud.notebooks.v1.LocalDisk.Builder subBuilder = null; + if (dataDisk_ != null) { + subBuilder = dataDisk_.toBuilder(); + } + dataDisk_ = + input.readMessage( + com.google.cloud.notebooks.v1.LocalDisk.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataDisk_); + dataDisk_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.notebooks.v1.EncryptionConfig.Builder subBuilder = null; + if (encryptionConfig_ != null) { + subBuilder = encryptionConfig_.toBuilder(); + } + encryptionConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.EncryptionConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionConfig_); + encryptionConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder subBuilder = null; + if (shieldedInstanceConfig_ != null) { + subBuilder = shieldedInstanceConfig_.toBuilder(); + } + shieldedInstanceConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(shieldedInstanceConfig_); + shieldedInstanceConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder subBuilder = null; + if (acceleratorConfig_ != null) { + subBuilder = acceleratorConfig_.toBuilder(); + } + acceleratorConfig_ = + input.readMessage( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(acceleratorConfig_); + acceleratorConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnet_ = s; + break; + } + case 80: + { + internalIpOnly_ = input.readBool(); + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + tags_.add(s); + break; + } + case 114: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + guestAttributes_ = + com.google.protobuf.MapField.newMapField( + GuestAttributesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry guestAttributes__ = + input.readMessage( + GuestAttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + guestAttributes_ + .getMutableMap() + .put(guestAttributes__.getKey(), guestAttributes__.getValue()); + break; + } + case 122: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + metadata_ = + com.google.protobuf.MapField.newMapField( + MetadataDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); + break; + } + case 130: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + case 136: + { + int rawValue = input.readEnum(); + + nicType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + containerImages_ = java.util.Collections.unmodifiableList(containerImages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + tags_ = tags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 14: + return internalGetGuestAttributes(); + case 15: + return internalGetMetadata(); + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.VirtualMachineConfig.class, + com.google.cloud.notebooks.v1.VirtualMachineConfig.Builder.class); + } + + /** + * + * + *
+   * The type of vNIC driver.
+   * Default should be UNSPECIFIED_NIC_TYPE.
+   * 
+ * + * Protobuf enum {@code google.cloud.notebooks.v1.VirtualMachineConfig.NicType} + */ + public enum NicType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No type specified.
+     * 
+ * + * UNSPECIFIED_NIC_TYPE = 0; + */ + UNSPECIFIED_NIC_TYPE(0), + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + VIRTIO_NET(1), + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + GVNIC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No type specified.
+     * 
+ * + * UNSPECIFIED_NIC_TYPE = 0; + */ + public static final int UNSPECIFIED_NIC_TYPE_VALUE = 0; + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + public static final int VIRTIO_NET_VALUE = 1; + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + public static final int GVNIC_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NicType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NicType forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED_NIC_TYPE; + case 1: + return VIRTIO_NET; + case 2: + return GVNIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NicType findValueByNumber(int number) { + return NicType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.notebooks.v1.VirtualMachineConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NicType[] VALUES = values(); + + public static NicType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NicType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.notebooks.v1.VirtualMachineConfig.NicType) + } + + public static final int ZONE_FIELD_NUMBER = 1; + private volatile java.lang.Object zone_; + /** + * + * + *
+   * Output only. The zone where the virtual machine is located.
+   * If using regional request, the notebooks service will pick a location
+   * in the corresponding runtime region.
+   * On a get request, zone will always be present. Example:
+   * * `us-central1-b`
+   * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The zone where the virtual machine is located.
+   * If using regional request, the notebooks service will pick a location
+   * in the corresponding runtime region.
+   * On a get request, zone will always be present. Example:
+   * * `us-central1-b`
+   * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Required. The Compute Engine machine type used for runtimes.
+   * Short name is valid. Examples:
+   * * `n1-standard-2`
+   * * `e2-standard-8`
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The Compute Engine machine type used for runtimes.
+   * Short name is valid. Examples:
+   * * `n1-standard-2`
+   * * `e2-standard-8`
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_IMAGES_FIELD_NUMBER = 3; + private java.util.List containerImages_; + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getContainerImagesList() { + return containerImages_; + } + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getContainerImagesOrBuilderList() { + return containerImages_; + } + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getContainerImagesCount() { + return containerImages_.size(); + } + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImage getContainerImages(int index) { + return containerImages_.get(index); + } + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImagesOrBuilder( + int index) { + return containerImages_.get(index); + } + + public static final int DATA_DISK_FIELD_NUMBER = 4; + private com.google.cloud.notebooks.v1.LocalDisk dataDisk_; + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataDisk field is set. + */ + @java.lang.Override + public boolean hasDataDisk() { + return dataDisk_ != null; + } + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataDisk. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDisk getDataDisk() { + return dataDisk_ == null + ? com.google.cloud.notebooks.v1.LocalDisk.getDefaultInstance() + : dataDisk_; + } + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.LocalDiskOrBuilder getDataDiskOrBuilder() { + return getDataDisk(); + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.notebooks.v1.EncryptionConfig encryptionConfig_; + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { + return getEncryptionConfig(); + } + + public static final int SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shieldedInstanceConfig_; + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfig_ != null; + } + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The shieldedInstanceConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig getShieldedInstanceConfig() { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + return getShieldedInstanceConfig(); + } + + public static final int ACCELERATOR_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig acceleratorConfig_; + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the acceleratorConfig field is set. + */ + @java.lang.Override + public boolean hasAcceleratorConfig() { + return acceleratorConfig_ != null; + } + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The acceleratorConfig. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig() { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + return getAcceleratorConfig(); + } + + public static final int NETWORK_FIELD_NUMBER = 8; + private volatile java.lang.Object network_; + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications. Cannot be specified with subnetwork. If neither
+   * `network` nor `subnet` is specified, the "default" network of
+   * the project is used, if it exists.
+   * A full URL or partial URI. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+   * * `projects/[project_id]/regions/global/default`
+   * Runtimes are managed resources inside Google Infrastructure.
+   * Runtimes support the following network configurations:
+   * * Google Managed Network (Network & subnet are empty)
+   * * Consumer Project VPC (network & subnet are required). Requires
+   * configuring Private Service Access.
+   * * Shared VPC (network & subnet are required). Requires configuring Private
+   * Service Access.
+   * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications. Cannot be specified with subnetwork. If neither
+   * `network` nor `subnet` is specified, the "default" network of
+   * the project is used, if it exists.
+   * A full URL or partial URI. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+   * * `projects/[project_id]/regions/global/default`
+   * Runtimes are managed resources inside Google Infrastructure.
+   * Runtimes support the following network configurations:
+   * * Google Managed Network (Network & subnet are empty)
+   * * Consumer Project VPC (network & subnet are required). Requires
+   * configuring Private Service Access.
+   * * Shared VPC (network & subnet are required). Requires configuring Private
+   * Service Access.
+   * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNET_FIELD_NUMBER = 9; + private volatile java.lang.Object subnet_; + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications. Cannot be specified with network.
+   * A full URL or partial URI are valid. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnet. + */ + @java.lang.Override + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications. Cannot be specified with network.
+   * A full URL or partial URI are valid. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IP_ONLY_FIELD_NUMBER = 10; + private boolean internalIpOnly_; + /** + * + * + *
+   * Optional. If true, runtime will only have internal IP
+   * addresses. By default, runtimes are not restricted to internal IP
+   * addresses, and will have ephemeral external IP addresses assigned to each
+   * vm. This `internal_ip_only` restriction can only be enabled for
+   * subnetwork enabled networks, and all dependencies must be
+   * configured to be accessible without external IP addresses.
+   * 
+ * + * bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The internalIpOnly. + */ + @java.lang.Override + public boolean getInternalIpOnly() { + return internalIpOnly_; + } + + public static final int TAGS_FIELD_NUMBER = 13; + private com.google.protobuf.LazyStringList tags_; + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int GUEST_ATTRIBUTES_FIELD_NUMBER = 14; + + private static final class GuestAttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_GuestAttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField guestAttributes_; + + private com.google.protobuf.MapField + internalGetGuestAttributes() { + if (guestAttributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + GuestAttributesDefaultEntryHolder.defaultEntry); + } + return guestAttributes_; + } + + public int getGuestAttributesCount() { + return internalGetGuestAttributes().getMap().size(); + } + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsGuestAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetGuestAttributes().getMap().containsKey(key); + } + /** Use {@link #getGuestAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getGuestAttributes() { + return getGuestAttributesMap(); + } + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getGuestAttributesMap() { + return internalGetGuestAttributes().getMap(); + } + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getGuestAttributesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetGuestAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getGuestAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetGuestAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int METADATA_FIELD_NUMBER = 15; + + private static final class MetadataDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_MetadataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getMetadataOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELS_FIELD_NUMBER = 16; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NIC_TYPE_FIELD_NUMBER = 17; + private int nicType_; + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+   * VirtioNet.
+   * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+   * VirtioNet.
+   * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType getNicType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType result = + com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType.valueOf(nicType_); + return result == null + ? com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getZoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zone_); + } + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, machineType_); + } + for (int i = 0; i < containerImages_.size(); i++) { + output.writeMessage(3, containerImages_.get(i)); + } + if (dataDisk_ != null) { + output.writeMessage(4, getDataDisk()); + } + if (encryptionConfig_ != null) { + output.writeMessage(5, getEncryptionConfig()); + } + if (shieldedInstanceConfig_ != null) { + output.writeMessage(6, getShieldedInstanceConfig()); + } + if (acceleratorConfig_ != null) { + output.writeMessage(7, getAcceleratorConfig()); + } + if (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, network_); + } + if (!getSubnetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, subnet_); + } + if (internalIpOnly_ != false) { + output.writeBool(10, internalIpOnly_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, tags_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetGuestAttributes(), GuestAttributesDefaultEntryHolder.defaultEntry, 14); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 15); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 16); + if (nicType_ + != com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType.UNSPECIFIED_NIC_TYPE + .getNumber()) { + output.writeEnum(17, nicType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getZoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zone_); + } + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, machineType_); + } + for (int i = 0; i < containerImages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, containerImages_.get(i)); + } + if (dataDisk_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDataDisk()); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEncryptionConfig()); + } + if (shieldedInstanceConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getShieldedInstanceConfig()); + } + if (acceleratorConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAcceleratorConfig()); + } + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, network_); + } + if (!getSubnetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, subnet_); + } + if (internalIpOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, internalIpOnly_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + for (java.util.Map.Entry entry : + internalGetGuestAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry guestAttributes__ = + GuestAttributesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, guestAttributes__); + } + for (java.util.Map.Entry entry : + internalGetMetadata().getMap().entrySet()) { + com.google.protobuf.MapEntry metadata__ = + MetadataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, metadata__); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, labels__); + } + if (nicType_ + != com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType.UNSPECIFIED_NIC_TYPE + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, nicType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.VirtualMachineConfig)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.VirtualMachineConfig other = + (com.google.cloud.notebooks.v1.VirtualMachineConfig) obj; + + if (!getZone().equals(other.getZone())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (!getContainerImagesList().equals(other.getContainerImagesList())) return false; + if (hasDataDisk() != other.hasDataDisk()) return false; + if (hasDataDisk()) { + if (!getDataDisk().equals(other.getDataDisk())) return false; + } + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } + if (hasShieldedInstanceConfig() != other.hasShieldedInstanceConfig()) return false; + if (hasShieldedInstanceConfig()) { + if (!getShieldedInstanceConfig().equals(other.getShieldedInstanceConfig())) return false; + } + if (hasAcceleratorConfig() != other.hasAcceleratorConfig()) return false; + if (hasAcceleratorConfig()) { + if (!getAcceleratorConfig().equals(other.getAcceleratorConfig())) return false; + } + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getSubnet().equals(other.getSubnet())) return false; + if (getInternalIpOnly() != other.getInternalIpOnly()) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (!internalGetGuestAttributes().equals(other.internalGetGuestAttributes())) return false; + if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (nicType_ != other.nicType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + if (getContainerImagesCount() > 0) { + hash = (37 * hash) + CONTAINER_IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getContainerImagesList().hashCode(); + } + if (hasDataDisk()) { + hash = (37 * hash) + DATA_DISK_FIELD_NUMBER; + hash = (53 * hash) + getDataDisk().hashCode(); + } + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (hasShieldedInstanceConfig()) { + hash = (37 * hash) + SHIELDED_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getShieldedInstanceConfig().hashCode(); + } + if (hasAcceleratorConfig()) { + hash = (37 * hash) + ACCELERATOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorConfig().hashCode(); + } + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNET_FIELD_NUMBER; + hash = (53 * hash) + getSubnet().hashCode(); + hash = (37 * hash) + INTERNAL_IP_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInternalIpOnly()); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (!internalGetGuestAttributes().getMap().isEmpty()) { + hash = (37 * hash) + GUEST_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetGuestAttributes().hashCode(); + } + if (!internalGetMetadata().getMap().isEmpty()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetadata().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + NIC_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nicType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.VirtualMachineConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The config settings for virtual machine.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.VirtualMachineConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.VirtualMachineConfig) + com.google.cloud.notebooks.v1.VirtualMachineConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 14: + return internalGetGuestAttributes(); + case 15: + return internalGetMetadata(); + case 16: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 14: + return internalGetMutableGuestAttributes(); + case 15: + return internalGetMutableMetadata(); + case 16: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.VirtualMachineConfig.class, + com.google.cloud.notebooks.v1.VirtualMachineConfig.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.VirtualMachineConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getContainerImagesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + zone_ = ""; + + machineType_ = ""; + + if (containerImagesBuilder_ == null) { + containerImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + containerImagesBuilder_.clear(); + } + if (dataDiskBuilder_ == null) { + dataDisk_ = null; + } else { + dataDisk_ = null; + dataDiskBuilder_ = null; + } + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = null; + } else { + shieldedInstanceConfig_ = null; + shieldedInstanceConfigBuilder_ = null; + } + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = null; + } else { + acceleratorConfig_ = null; + acceleratorConfigBuilder_ = null; + } + network_ = ""; + + subnet_ = ""; + + internalIpOnly_ = false; + + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableGuestAttributes().clear(); + internalGetMutableMetadata().clear(); + internalGetMutableLabels().clear(); + nicType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.RuntimeProto + .internal_static_google_cloud_notebooks_v1_VirtualMachineConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineConfig getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineConfig build() { + com.google.cloud.notebooks.v1.VirtualMachineConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineConfig buildPartial() { + com.google.cloud.notebooks.v1.VirtualMachineConfig result = + new com.google.cloud.notebooks.v1.VirtualMachineConfig(this); + int from_bitField0_ = bitField0_; + result.zone_ = zone_; + result.machineType_ = machineType_; + if (containerImagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + containerImages_ = java.util.Collections.unmodifiableList(containerImages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.containerImages_ = containerImages_; + } else { + result.containerImages_ = containerImagesBuilder_.build(); + } + if (dataDiskBuilder_ == null) { + result.dataDisk_ = dataDisk_; + } else { + result.dataDisk_ = dataDiskBuilder_.build(); + } + if (encryptionConfigBuilder_ == null) { + result.encryptionConfig_ = encryptionConfig_; + } else { + result.encryptionConfig_ = encryptionConfigBuilder_.build(); + } + if (shieldedInstanceConfigBuilder_ == null) { + result.shieldedInstanceConfig_ = shieldedInstanceConfig_; + } else { + result.shieldedInstanceConfig_ = shieldedInstanceConfigBuilder_.build(); + } + if (acceleratorConfigBuilder_ == null) { + result.acceleratorConfig_ = acceleratorConfig_; + } else { + result.acceleratorConfig_ = acceleratorConfigBuilder_.build(); + } + result.network_ = network_; + result.subnet_ = subnet_; + result.internalIpOnly_ = internalIpOnly_; + if (((bitField0_ & 0x00000002) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.tags_ = tags_; + result.guestAttributes_ = internalGetGuestAttributes(); + result.guestAttributes_.makeImmutable(); + result.metadata_ = internalGetMetadata(); + result.metadata_.makeImmutable(); + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + result.nicType_ = nicType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.VirtualMachineConfig) { + return mergeFrom((com.google.cloud.notebooks.v1.VirtualMachineConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.VirtualMachineConfig other) { + if (other == com.google.cloud.notebooks.v1.VirtualMachineConfig.getDefaultInstance()) + return this; + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + onChanged(); + } + if (containerImagesBuilder_ == null) { + if (!other.containerImages_.isEmpty()) { + if (containerImages_.isEmpty()) { + containerImages_ = other.containerImages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContainerImagesIsMutable(); + containerImages_.addAll(other.containerImages_); + } + onChanged(); + } + } else { + if (!other.containerImages_.isEmpty()) { + if (containerImagesBuilder_.isEmpty()) { + containerImagesBuilder_.dispose(); + containerImagesBuilder_ = null; + containerImages_ = other.containerImages_; + bitField0_ = (bitField0_ & ~0x00000001); + containerImagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContainerImagesFieldBuilder() + : null; + } else { + containerImagesBuilder_.addAllMessages(other.containerImages_); + } + } + } + if (other.hasDataDisk()) { + mergeDataDisk(other.getDataDisk()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + if (other.hasShieldedInstanceConfig()) { + mergeShieldedInstanceConfig(other.getShieldedInstanceConfig()); + } + if (other.hasAcceleratorConfig()) { + mergeAcceleratorConfig(other.getAcceleratorConfig()); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getSubnet().isEmpty()) { + subnet_ = other.subnet_; + onChanged(); + } + if (other.getInternalIpOnly() != false) { + setInternalIpOnly(other.getInternalIpOnly()); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + internalGetMutableGuestAttributes().mergeFrom(other.internalGetGuestAttributes()); + internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.nicType_ != 0) { + setNicTypeValue(other.getNicTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.VirtualMachineConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.notebooks.v1.VirtualMachineConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object zone_ = ""; + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + + zone_ = getDefaultInstance().getZone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The zone where the virtual machine is located.
+     * If using regional request, the notebooks service will pick a location
+     * in the corresponding runtime region.
+     * On a get request, zone will always be present. Example:
+     * * `us-central1-b`
+     * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zone_ = value; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Compute Engine machine type used for runtimes.
+     * Short name is valid. Examples:
+     * * `n1-standard-2`
+     * * `e2-standard-8`
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + private java.util.List containerImages_ = + java.util.Collections.emptyList(); + + private void ensureContainerImagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + containerImages_ = + new java.util.ArrayList(containerImages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder> + containerImagesBuilder_; + + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getContainerImagesList() { + if (containerImagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(containerImages_); + } else { + return containerImagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getContainerImagesCount() { + if (containerImagesBuilder_ == null) { + return containerImages_.size(); + } else { + return containerImagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.ContainerImage getContainerImages(int index) { + if (containerImagesBuilder_ == null) { + return containerImages_.get(index); + } else { + return containerImagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setContainerImages( + int index, com.google.cloud.notebooks.v1.ContainerImage value) { + if (containerImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerImagesIsMutable(); + containerImages_.set(index, value); + onChanged(); + } else { + containerImagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setContainerImages( + int index, com.google.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.set(index, builderForValue.build()); + onChanged(); + } else { + containerImagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addContainerImages(com.google.cloud.notebooks.v1.ContainerImage value) { + if (containerImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerImagesIsMutable(); + containerImages_.add(value); + onChanged(); + } else { + containerImagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addContainerImages( + int index, com.google.cloud.notebooks.v1.ContainerImage value) { + if (containerImagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContainerImagesIsMutable(); + containerImages_.add(index, value); + onChanged(); + } else { + containerImagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addContainerImages( + com.google.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.add(builderForValue.build()); + onChanged(); + } else { + containerImagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addContainerImages( + int index, com.google.cloud.notebooks.v1.ContainerImage.Builder builderForValue) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.add(index, builderForValue.build()); + onChanged(); + } else { + containerImagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllContainerImages( + java.lang.Iterable values) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, containerImages_); + onChanged(); + } else { + containerImagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearContainerImages() { + if (containerImagesBuilder_ == null) { + containerImages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + containerImagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeContainerImages(int index) { + if (containerImagesBuilder_ == null) { + ensureContainerImagesIsMutable(); + containerImages_.remove(index); + onChanged(); + } else { + containerImagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.ContainerImage.Builder getContainerImagesBuilder( + int index) { + return getContainerImagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImagesOrBuilder( + int index) { + if (containerImagesBuilder_ == null) { + return containerImages_.get(index); + } else { + return containerImagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getContainerImagesOrBuilderList() { + if (containerImagesBuilder_ != null) { + return containerImagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(containerImages_); + } + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.ContainerImage.Builder addContainerImagesBuilder() { + return getContainerImagesFieldBuilder() + .addBuilder(com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.ContainerImage.Builder addContainerImagesBuilder( + int index) { + return getContainerImagesFieldBuilder() + .addBuilder(index, com.google.cloud.notebooks.v1.ContainerImage.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Use a list of container images to start the notebook instance.
+     * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getContainerImagesBuilderList() { + return getContainerImagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder> + getContainerImagesFieldBuilder() { + if (containerImagesBuilder_ == null) { + containerImagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.notebooks.v1.ContainerImage, + com.google.cloud.notebooks.v1.ContainerImage.Builder, + com.google.cloud.notebooks.v1.ContainerImageOrBuilder>( + containerImages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + containerImages_ = null; + } + return containerImagesBuilder_; + } + + private com.google.cloud.notebooks.v1.LocalDisk dataDisk_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDisk, + com.google.cloud.notebooks.v1.LocalDisk.Builder, + com.google.cloud.notebooks.v1.LocalDiskOrBuilder> + dataDiskBuilder_; + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataDisk field is set. + */ + public boolean hasDataDisk() { + return dataDiskBuilder_ != null || dataDisk_ != null; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataDisk. + */ + public com.google.cloud.notebooks.v1.LocalDisk getDataDisk() { + if (dataDiskBuilder_ == null) { + return dataDisk_ == null + ? com.google.cloud.notebooks.v1.LocalDisk.getDefaultInstance() + : dataDisk_; + } else { + return dataDiskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataDisk(com.google.cloud.notebooks.v1.LocalDisk value) { + if (dataDiskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataDisk_ = value; + onChanged(); + } else { + dataDiskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataDisk(com.google.cloud.notebooks.v1.LocalDisk.Builder builderForValue) { + if (dataDiskBuilder_ == null) { + dataDisk_ = builderForValue.build(); + onChanged(); + } else { + dataDiskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataDisk(com.google.cloud.notebooks.v1.LocalDisk value) { + if (dataDiskBuilder_ == null) { + if (dataDisk_ != null) { + dataDisk_ = + com.google.cloud.notebooks.v1.LocalDisk.newBuilder(dataDisk_) + .mergeFrom(value) + .buildPartial(); + } else { + dataDisk_ = value; + } + onChanged(); + } else { + dataDiskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataDisk() { + if (dataDiskBuilder_ == null) { + dataDisk_ = null; + onChanged(); + } else { + dataDisk_ = null; + dataDiskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.LocalDisk.Builder getDataDiskBuilder() { + + onChanged(); + return getDataDiskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.notebooks.v1.LocalDiskOrBuilder getDataDiskOrBuilder() { + if (dataDiskBuilder_ != null) { + return dataDiskBuilder_.getMessageOrBuilder(); + } else { + return dataDisk_ == null + ? com.google.cloud.notebooks.v1.LocalDisk.getDefaultInstance() + : dataDisk_; + } + } + /** + * + * + *
+     * Required. Data disk option configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDisk, + com.google.cloud.notebooks.v1.LocalDisk.Builder, + com.google.cloud.notebooks.v1.LocalDiskOrBuilder> + getDataDiskFieldBuilder() { + if (dataDiskBuilder_ == null) { + dataDiskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.LocalDisk, + com.google.cloud.notebooks.v1.LocalDisk.Builder, + com.google.cloud.notebooks.v1.LocalDiskOrBuilder>( + getDataDisk(), getParentForChildren(), isClean()); + dataDisk_ = null; + } + return dataDiskBuilder_; + } + + private com.google.cloud.notebooks.v1.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.EncryptionConfig, + com.google.cloud.notebooks.v1.EncryptionConfig.Builder, + com.google.cloud.notebooks.v1.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return encryptionConfigBuilder_ != null || encryptionConfig_ != null; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + public com.google.cloud.notebooks.v1.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig(com.google.cloud.notebooks.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + onChanged(); + } else { + encryptionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.cloud.notebooks.v1.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + onChanged(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionConfig(com.google.cloud.notebooks.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (encryptionConfig_ != null) { + encryptionConfig_ = + com.google.cloud.notebooks.v1.EncryptionConfig.newBuilder(encryptionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionConfig_ = value; + } + onChanged(); + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + onChanged(); + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.EncryptionConfig.Builder getEncryptionConfigBuilder() { + + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.cloud.notebooks.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + /** + * + * + *
+     * Optional. Encryption settings for virtual machine data disk.
+     * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.EncryptionConfig, + com.google.cloud.notebooks.v1.EncryptionConfig.Builder, + com.google.cloud.notebooks.v1.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.EncryptionConfig, + com.google.cloud.notebooks.v1.EncryptionConfig.Builder, + com.google.cloud.notebooks.v1.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shieldedInstanceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig, + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder> + shieldedInstanceConfigBuilder_; + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + public boolean hasShieldedInstanceConfig() { + return shieldedInstanceConfigBuilder_ != null || shieldedInstanceConfig_ != null; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The shieldedInstanceConfig. + */ + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig getShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } else { + return shieldedInstanceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setShieldedInstanceConfig( + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + shieldedInstanceConfig_ = value; + onChanged(); + } else { + shieldedInstanceConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setShieldedInstanceConfig( + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder builderForValue) { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = builderForValue.build(); + onChanged(); + } else { + shieldedInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeShieldedInstanceConfig( + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig value) { + if (shieldedInstanceConfigBuilder_ == null) { + if (shieldedInstanceConfig_ != null) { + shieldedInstanceConfig_ = + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.newBuilder( + shieldedInstanceConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + shieldedInstanceConfig_ = value; + } + onChanged(); + } else { + shieldedInstanceConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearShieldedInstanceConfig() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfig_ = null; + onChanged(); + } else { + shieldedInstanceConfig_ = null; + shieldedInstanceConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder + getShieldedInstanceConfigBuilder() { + + onChanged(); + return getShieldedInstanceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder() { + if (shieldedInstanceConfigBuilder_ != null) { + return shieldedInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + return shieldedInstanceConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.getDefaultInstance() + : shieldedInstanceConfig_; + } + } + /** + * + * + *
+     * Optional. Shielded VM Instance configuration settings.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig, + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder> + getShieldedInstanceConfigFieldBuilder() { + if (shieldedInstanceConfigBuilder_ == null) { + shieldedInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig, + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder>( + getShieldedInstanceConfig(), getParentForChildren(), isClean()); + shieldedInstanceConfig_ = null; + } + return shieldedInstanceConfigBuilder_; + } + + private com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig acceleratorConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder> + acceleratorConfigBuilder_; + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the acceleratorConfig field is set. + */ + public boolean hasAcceleratorConfig() { + return acceleratorConfigBuilder_ != null || acceleratorConfig_ != null; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The acceleratorConfig. + */ + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } else { + return acceleratorConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAcceleratorConfig( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acceleratorConfig_ = value; + onChanged(); + } else { + acceleratorConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAcceleratorConfig( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder builderForValue) { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = builderForValue.build(); + onChanged(); + } else { + acceleratorConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAcceleratorConfig( + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig value) { + if (acceleratorConfigBuilder_ == null) { + if (acceleratorConfig_ != null) { + acceleratorConfig_ = + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.newBuilder(acceleratorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + acceleratorConfig_ = value; + } + onChanged(); + } else { + acceleratorConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAcceleratorConfig() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfig_ = null; + onChanged(); + } else { + acceleratorConfig_ = null; + acceleratorConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder + getAcceleratorConfigBuilder() { + + onChanged(); + return getAcceleratorConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder + getAcceleratorConfigOrBuilder() { + if (acceleratorConfigBuilder_ != null) { + return acceleratorConfigBuilder_.getMessageOrBuilder(); + } else { + return acceleratorConfig_ == null + ? com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.getDefaultInstance() + : acceleratorConfig_; + } + } + /** + * + * + *
+     * Optional. The Compute Engine accelerator configuration for this runtime.
+     * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder> + getAcceleratorConfigFieldBuilder() { + if (acceleratorConfigBuilder_ == null) { + acceleratorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig.Builder, + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder>( + getAcceleratorConfig(), getParentForChildren(), isClean()); + acceleratorConfig_ = null; + } + return acceleratorConfigBuilder_; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+     * * `projects/[project_id]/regions/global/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+     * * `projects/[project_id]/regions/global/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+     * * `projects/[project_id]/regions/global/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+     * * `projects/[project_id]/regions/global/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications. Cannot be specified with subnetwork. If neither
+     * `network` nor `subnet` is specified, the "default" network of
+     * the project is used, if it exists.
+     * A full URL or partial URI. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+     * * `projects/[project_id]/regions/global/default`
+     * Runtimes are managed resources inside Google Infrastructure.
+     * Runtimes support the following network configurations:
+     * * Google Managed Network (Network & subnet are empty)
+     * * Consumer Project VPC (network & subnet are required). Requires
+     * configuring Private Service Access.
+     * * Shared VPC (network & subnet are required). Requires configuring Private
+     * Service Access.
+     * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object subnet_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnet. + */ + public java.lang.String getSubnet() { + java.lang.Object ref = subnet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnet. + */ + public com.google.protobuf.ByteString getSubnetBytes() { + java.lang.Object ref = subnet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSubnet() { + + subnet_ = getDefaultInstance().getSubnet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications. Cannot be specified with network.
+     * A full URL or partial URI are valid. Examples:
+     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+     * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for subnet to set. + * @return This builder for chaining. + */ + public Builder setSubnetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnet_ = value; + onChanged(); + return this; + } + + private boolean internalIpOnly_; + /** + * + * + *
+     * Optional. If true, runtime will only have internal IP
+     * addresses. By default, runtimes are not restricted to internal IP
+     * addresses, and will have ephemeral external IP addresses assigned to each
+     * vm. This `internal_ip_only` restriction can only be enabled for
+     * subnetwork enabled networks, and all dependencies must be
+     * configured to be accessible without external IP addresses.
+     * 
+ * + * bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The internalIpOnly. + */ + @java.lang.Override + public boolean getInternalIpOnly() { + return internalIpOnly_; + } + /** + * + * + *
+     * Optional. If true, runtime will only have internal IP
+     * addresses. By default, runtimes are not restricted to internal IP
+     * addresses, and will have ephemeral external IP addresses assigned to each
+     * vm. This `internal_ip_only` restriction can only be enabled for
+     * subnetwork enabled networks, and all dependencies must be
+     * configured to be accessible without external IP addresses.
+     * 
+ * + * bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The internalIpOnly to set. + * @return This builder for chaining. + */ + public Builder setInternalIpOnly(boolean value) { + + internalIpOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If true, runtime will only have internal IP
+     * addresses. By default, runtimes are not restricted to internal IP
+     * addresses, and will have ephemeral external IP addresses assigned to each
+     * vm. This `internal_ip_only` restriction can only be enabled for
+     * subnetwork enabled networks, and all dependencies must be
+     * configured to be accessible without external IP addresses.
+     * 
+ * + * bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearInternalIpOnly() { + + internalIpOnly_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine tags to add to runtime (see [Tagging
+     * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+     * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.MapField guestAttributes_; + + private com.google.protobuf.MapField + internalGetGuestAttributes() { + if (guestAttributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + GuestAttributesDefaultEntryHolder.defaultEntry); + } + return guestAttributes_; + } + + private com.google.protobuf.MapField + internalGetMutableGuestAttributes() { + onChanged(); + ; + if (guestAttributes_ == null) { + guestAttributes_ = + com.google.protobuf.MapField.newMapField( + GuestAttributesDefaultEntryHolder.defaultEntry); + } + if (!guestAttributes_.isMutable()) { + guestAttributes_ = guestAttributes_.copy(); + } + return guestAttributes_; + } + + public int getGuestAttributesCount() { + return internalGetGuestAttributes().getMap().size(); + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsGuestAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetGuestAttributes().getMap().containsKey(key); + } + /** Use {@link #getGuestAttributesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getGuestAttributes() { + return getGuestAttributesMap(); + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getGuestAttributesMap() { + return internalGetGuestAttributes().getMap(); + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getGuestAttributesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetGuestAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getGuestAttributesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetGuestAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearGuestAttributes() { + internalGetMutableGuestAttributes().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeGuestAttributes(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableGuestAttributes().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableGuestAttributes() { + return internalGetMutableGuestAttributes().getMutableMap(); + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putGuestAttributes(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableGuestAttributes().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. The Compute Engine guest attributes. (see
+     * [Project and instance
+     * guest
+     * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+     * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllGuestAttributes(java.util.Map values) { + internalGetMutableGuestAttributes().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField metadata_; + + private com.google.protobuf.MapField internalGetMetadata() { + if (metadata_ == null) { + return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); + } + return metadata_; + } + + private com.google.protobuf.MapField + internalGetMutableMetadata() { + onChanged(); + ; + if (metadata_ == null) { + metadata_ = + com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); + } + if (!metadata_.isMutable()) { + metadata_ = metadata_.copy(); + } + return metadata_; + } + + public int getMetadataCount() { + return internalGetMetadata().getMap().size(); + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+     * [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetMetadata().getMap().containsKey(key); + } + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetadata() { + return getMetadataMap(); + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+     * [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getMetadataMap() { + return internalGetMetadata().getMap(); + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+     * [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getMetadataOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+     * [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getMetadataOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetMetadata().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetadata() { + internalGetMutableMetadata().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+     * [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeMetadata(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableMetadata().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableMetadata() { + return internalGetMutableMetadata().getMutableMap(); + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+     * [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putMetadata(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableMetadata().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+     * [Project and instance
+     * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+     * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllMetadata(java.util.Map values) { + internalGetMutableMetadata().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. The labels to associate with this runtime.
+     * Label **keys** must contain 1 to 63 characters, and must conform to
+     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Label **values** may be empty, but, if present, must contain 1 to 63
+     * characters, and must conform to [RFC
+     * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+     * associated with a cluster.
+     * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private int nicType_ = 0; + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for nicType to set. + * @return This builder for chaining. + */ + public Builder setNicTypeValue(int value) { + + nicType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType getNicType() { + @SuppressWarnings("deprecation") + com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType result = + com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType.valueOf(nicType_); + return result == null + ? com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The nicType to set. + * @return This builder for chaining. + */ + public Builder setNicType(com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType value) { + if (value == null) { + throw new NullPointerException(); + } + + nicType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+     * VirtioNet.
+     * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNicType() { + + nicType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.VirtualMachineConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.VirtualMachineConfig) + private static final com.google.cloud.notebooks.v1.VirtualMachineConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.VirtualMachineConfig(); + } + + public static com.google.cloud.notebooks.v1.VirtualMachineConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualMachineConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VirtualMachineConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VirtualMachineConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineConfigOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineConfigOrBuilder.java new file mode 100644 index 00000000..200786dd --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineConfigOrBuilder.java @@ -0,0 +1,731 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface VirtualMachineConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.VirtualMachineConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The zone where the virtual machine is located.
+   * If using regional request, the notebooks service will pick a location
+   * in the corresponding runtime region.
+   * On a get request, zone will always be present. Example:
+   * * `us-central1-b`
+   * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The zone. + */ + java.lang.String getZone(); + /** + * + * + *
+   * Output only. The zone where the virtual machine is located.
+   * If using regional request, the notebooks service will pick a location
+   * in the corresponding runtime region.
+   * On a get request, zone will always be present. Example:
+   * * `us-central1-b`
+   * 
+ * + * string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Required. The Compute Engine machine type used for runtimes.
+   * Short name is valid. Examples:
+   * * `n1-standard-2`
+   * * `e2-standard-8`
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Required. The Compute Engine machine type used for runtimes.
+   * Short name is valid. Examples:
+   * * `n1-standard-2`
+   * * `e2-standard-8`
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getContainerImagesList(); + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.notebooks.v1.ContainerImage getContainerImages(int index); + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getContainerImagesCount(); + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getContainerImagesOrBuilderList(); + /** + * + * + *
+   * Optional. Use a list of container images to start the notebook instance.
+   * 
+ * + * + * repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.notebooks.v1.ContainerImageOrBuilder getContainerImagesOrBuilder(int index); + + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataDisk field is set. + */ + boolean hasDataDisk(); + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataDisk. + */ + com.google.cloud.notebooks.v1.LocalDisk getDataDisk(); + /** + * + * + *
+   * Required. Data disk option configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.notebooks.v1.LocalDiskOrBuilder getDataDiskOrBuilder(); + + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + com.google.cloud.notebooks.v1.EncryptionConfig getEncryptionConfig(); + /** + * + * + *
+   * Optional. Encryption settings for virtual machine data disk.
+   * 
+ * + * + * .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.notebooks.v1.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the shieldedInstanceConfig field is set. + */ + boolean hasShieldedInstanceConfig(); + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The shieldedInstanceConfig. + */ + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig getShieldedInstanceConfig(); + /** + * + * + *
+   * Optional. Shielded VM Instance configuration settings.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.notebooks.v1.RuntimeShieldedInstanceConfigOrBuilder + getShieldedInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the acceleratorConfig field is set. + */ + boolean hasAcceleratorConfig(); + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The acceleratorConfig. + */ + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfig getAcceleratorConfig(); + /** + * + * + *
+   * Optional. The Compute Engine accelerator configuration for this runtime.
+   * 
+ * + * + * .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.notebooks.v1.RuntimeAcceleratorConfigOrBuilder getAcceleratorConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications. Cannot be specified with subnetwork. If neither
+   * `network` nor `subnet` is specified, the "default" network of
+   * the project is used, if it exists.
+   * A full URL or partial URI. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+   * * `projects/[project_id]/regions/global/default`
+   * Runtimes are managed resources inside Google Infrastructure.
+   * Runtimes support the following network configurations:
+   * * Google Managed Network (Network & subnet are empty)
+   * * Consumer Project VPC (network & subnet are required). Requires
+   * configuring Private Service Access.
+   * * Shared VPC (network & subnet are required). Requires configuring Private
+   * Service Access.
+   * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications. Cannot be specified with subnetwork. If neither
+   * `network` nor `subnet` is specified, the "default" network of
+   * the project is used, if it exists.
+   * A full URL or partial URI. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default`
+   * * `projects/[project_id]/regions/global/default`
+   * Runtimes are managed resources inside Google Infrastructure.
+   * Runtimes support the following network configurations:
+   * * Google Managed Network (Network & subnet are empty)
+   * * Consumer Project VPC (network & subnet are required). Requires
+   * configuring Private Service Access.
+   * * Shared VPC (network & subnet are required). Requires configuring Private
+   * Service Access.
+   * 
+ * + * string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications. Cannot be specified with network.
+   * A full URL or partial URI are valid. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnet. + */ + java.lang.String getSubnet(); + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications. Cannot be specified with network.
+   * A full URL or partial URI are valid. Examples:
+   * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * * `projects/[project_id]/regions/us-east1/subnetworks/sub0`
+   * 
+ * + * string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnet. + */ + com.google.protobuf.ByteString getSubnetBytes(); + + /** + * + * + *
+   * Optional. If true, runtime will only have internal IP
+   * addresses. By default, runtimes are not restricted to internal IP
+   * addresses, and will have ephemeral external IP addresses assigned to each
+   * vm. This `internal_ip_only` restriction can only be enabled for
+   * subnetwork enabled networks, and all dependencies must be
+   * configured to be accessible without external IP addresses.
+   * 
+ * + * bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The internalIpOnly. + */ + boolean getInternalIpOnly(); + + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * Optional. The Compute Engine tags to add to runtime (see [Tagging
+   * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
+   * 
+ * + * repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getGuestAttributesCount(); + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsGuestAttributes(java.lang.String key); + /** Use {@link #getGuestAttributesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getGuestAttributes(); + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getGuestAttributesMap(); + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getGuestAttributesOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Output only. The Compute Engine guest attributes. (see
+   * [Project and instance
+   * guest
+   * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).
+   * 
+ * + * + * map<string, string> guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getGuestAttributesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getMetadataCount(); + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsMetadata(java.lang.String key); + /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getMetadata(); + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getMetadataMap(); + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The Compute Engine metadata entries to add to virtual machine. (see
+   * [Project and instance
+   * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
+   * 
+ * + * map<string, string> metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getMetadataOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels to associate with this runtime.
+   * Label **keys** must contain 1 to 63 characters, and must conform to
+   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Label **values** may be empty, but, if present, must contain 1 to 63
+   * characters, and must conform to [RFC
+   * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+   * associated with a cluster.
+   * 
+ * + * map<string, string> labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+   * VirtioNet.
+   * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + int getNicTypeValue(); + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC or
+   * VirtioNet.
+   * 
+ * + * + * .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + com.google.cloud.notebooks.v1.VirtualMachineConfig.NicType getNicType(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineOrBuilder.java new file mode 100644 index 00000000..2cdaec39 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VirtualMachineOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/runtime.proto + +package com.google.cloud.notebooks.v1; + +public interface VirtualMachineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.VirtualMachine) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The user-friendly name of the Managed Compute Engine instance.
+   * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceName. + */ + java.lang.String getInstanceName(); + /** + * + * + *
+   * Output only. The user-friendly name of the Managed Compute Engine instance.
+   * 
+ * + * string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceName. + */ + com.google.protobuf.ByteString getInstanceNameBytes(); + + /** + * + * + *
+   * Output only. The unique identifier of the Managed Compute Engine instance.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Output only. The unique identifier of the Managed Compute Engine instance.
+   * 
+ * + * string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return Whether the virtualMachineConfig field is set. + */ + boolean hasVirtualMachineConfig(); + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * + * @return The virtualMachineConfig. + */ + com.google.cloud.notebooks.v1.VirtualMachineConfig getVirtualMachineConfig(); + /** + * + * + *
+   * Virtual Machine configuration settings.
+   * 
+ * + * .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + com.google.cloud.notebooks.v1.VirtualMachineConfigOrBuilder getVirtualMachineConfigOrBuilder(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VmImage.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VmImage.java new file mode 100644 index 00000000..6eba25da --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VmImage.java @@ -0,0 +1,1197 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/environment.proto + +package com.google.cloud.notebooks.v1; + +/** + * + * + *
+ * Definition of a custom Compute Engine virtual machine image for starting a
+ * notebook instance with the environment installed directly on the VM.
+ * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.VmImage} + */ +public final class VmImage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.notebooks.v1.VmImage) + VmImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use VmImage.newBuilder() to construct. + private VmImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VmImage() { + project_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VmImage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VmImage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + imageCase_ = 2; + image_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + imageCase_ = 3; + image_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_VmImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_VmImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.VmImage.class, + com.google.cloud.notebooks.v1.VmImage.Builder.class); + } + + private int imageCase_ = 0; + private java.lang.Object image_; + + public enum ImageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IMAGE_NAME(2), + IMAGE_FAMILY(3), + IMAGE_NOT_SET(0); + private final int value; + + private ImageCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImageCase valueOf(int value) { + return forNumber(value); + } + + public static ImageCase forNumber(int value) { + switch (value) { + case 2: + return IMAGE_NAME; + case 3: + return IMAGE_FAMILY; + case 0: + return IMAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ImageCase getImageCase() { + return ImageCase.forNumber(imageCase_); + } + + public static final int PROJECT_FIELD_NUMBER = 1; + private volatile java.lang.Object project_; + /** + * + * + *
+   * Required. The name of the Google Cloud project that this VM image belongs to.
+   * Format: `projects/{project_id}`
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Google Cloud project that this VM image belongs to.
+   * Format: `projects/{project_id}`
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_NAME_FIELD_NUMBER = 2; + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return Whether the imageName field is set. + */ + public boolean hasImageName() { + return imageCase_ == 2; + } + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return The imageName. + */ + public java.lang.String getImageName() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 2) { + image_ = s; + } + return s; + } + } + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return The bytes for imageName. + */ + public com.google.protobuf.ByteString getImageNameBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 2) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_FAMILY_FIELD_NUMBER = 3; + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return Whether the imageFamily field is set. + */ + public boolean hasImageFamily() { + return imageCase_ == 3; + } + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return The imageFamily. + */ + public java.lang.String getImageFamily() { + java.lang.Object ref = ""; + if (imageCase_ == 3) { + ref = image_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 3) { + image_ = s; + } + return s; + } + } + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return The bytes for imageFamily. + */ + public com.google.protobuf.ByteString getImageFamilyBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 3) { + ref = image_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 3) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getProjectBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); + } + if (imageCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, image_); + } + if (imageCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getProjectBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); + } + if (imageCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, image_); + } + if (imageCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.notebooks.v1.VmImage)) { + return super.equals(obj); + } + com.google.cloud.notebooks.v1.VmImage other = (com.google.cloud.notebooks.v1.VmImage) obj; + + if (!getProject().equals(other.getProject())) return false; + if (!getImageCase().equals(other.getImageCase())) return false; + switch (imageCase_) { + case 2: + if (!getImageName().equals(other.getImageName())) return false; + break; + case 3: + if (!getImageFamily().equals(other.getImageFamily())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + switch (imageCase_) { + case 2: + hash = (37 * hash) + IMAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getImageName().hashCode(); + break; + case 3: + hash = (37 * hash) + IMAGE_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getImageFamily().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VmImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VmImage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.notebooks.v1.VmImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.notebooks.v1.VmImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Definition of a custom Compute Engine virtual machine image for starting a
+   * notebook instance with the environment installed directly on the VM.
+   * 
+ * + * Protobuf type {@code google.cloud.notebooks.v1.VmImage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.notebooks.v1.VmImage) + com.google.cloud.notebooks.v1.VmImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_VmImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_VmImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.notebooks.v1.VmImage.class, + com.google.cloud.notebooks.v1.VmImage.Builder.class); + } + + // Construct using com.google.cloud.notebooks.v1.VmImage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + project_ = ""; + + imageCase_ = 0; + image_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.notebooks.v1.EnvironmentProto + .internal_static_google_cloud_notebooks_v1_VmImage_descriptor; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImage getDefaultInstanceForType() { + return com.google.cloud.notebooks.v1.VmImage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImage build() { + com.google.cloud.notebooks.v1.VmImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImage buildPartial() { + com.google.cloud.notebooks.v1.VmImage result = + new com.google.cloud.notebooks.v1.VmImage(this); + result.project_ = project_; + if (imageCase_ == 2) { + result.image_ = image_; + } + if (imageCase_ == 3) { + result.image_ = image_; + } + result.imageCase_ = imageCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.notebooks.v1.VmImage) { + return mergeFrom((com.google.cloud.notebooks.v1.VmImage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.notebooks.v1.VmImage other) { + if (other == com.google.cloud.notebooks.v1.VmImage.getDefaultInstance()) return this; + if (!other.getProject().isEmpty()) { + project_ = other.project_; + onChanged(); + } + switch (other.getImageCase()) { + case IMAGE_NAME: + { + imageCase_ = 2; + image_ = other.image_; + onChanged(); + break; + } + case IMAGE_FAMILY: + { + imageCase_ = 3; + image_ = other.image_; + onChanged(); + break; + } + case IMAGE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.notebooks.v1.VmImage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.notebooks.v1.VmImage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int imageCase_ = 0; + private java.lang.Object image_; + + public ImageCase getImageCase() { + return ImageCase.forNumber(imageCase_); + } + + public Builder clearImage() { + imageCase_ = 0; + image_ = null; + onChanged(); + return this; + } + + private java.lang.Object project_ = ""; + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs to.
+     * Format: `projects/{project_id}`
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs to.
+     * Format: `projects/{project_id}`
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs to.
+     * Format: `projects/{project_id}`
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + project_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs to.
+     * Format: `projects/{project_id}`
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProject() { + + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Google Cloud project that this VM image belongs to.
+     * Format: `projects/{project_id}`
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + project_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @return Whether the imageName field is set. + */ + @java.lang.Override + public boolean hasImageName() { + return imageCase_ == 2; + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @return The imageName. + */ + @java.lang.Override + public java.lang.String getImageName() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 2) { + image_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @return The bytes for imageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageNameBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 2) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @param value The imageName to set. + * @return This builder for chaining. + */ + public Builder setImageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageCase_ = 2; + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearImageName() { + if (imageCase_ == 2) { + imageCase_ = 0; + image_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Use VM image name to find the image.
+     * 
+ * + * string image_name = 2; + * + * @param value The bytes for imageName to set. + * @return This builder for chaining. + */ + public Builder setImageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageCase_ = 2; + image_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @return Whether the imageFamily field is set. + */ + @java.lang.Override + public boolean hasImageFamily() { + return imageCase_ == 3; + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @return The imageFamily. + */ + @java.lang.Override + public java.lang.String getImageFamily() { + java.lang.Object ref = ""; + if (imageCase_ == 3) { + ref = image_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 3) { + image_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @return The bytes for imageFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageFamilyBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 3) { + ref = image_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 3) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @param value The imageFamily to set. + * @return This builder for chaining. + */ + public Builder setImageFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageCase_ = 3; + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @return This builder for chaining. + */ + public Builder clearImageFamily() { + if (imageCase_ == 3) { + imageCase_ = 0; + image_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Use this VM image family to find the image; the newest image in this
+     * family will be used.
+     * 
+ * + * string image_family = 3; + * + * @param value The bytes for imageFamily to set. + * @return This builder for chaining. + */ + public Builder setImageFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageCase_ = 3; + image_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.notebooks.v1.VmImage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.notebooks.v1.VmImage) + private static final com.google.cloud.notebooks.v1.VmImage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.notebooks.v1.VmImage(); + } + + public static com.google.cloud.notebooks.v1.VmImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VmImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VmImage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.notebooks.v1.VmImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VmImageOrBuilder.java b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VmImageOrBuilder.java new file mode 100644 index 00000000..39e6a959 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/java/com/google/cloud/notebooks/v1/VmImageOrBuilder.java @@ -0,0 +1,131 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/notebooks/v1/environment.proto + +package com.google.cloud.notebooks.v1; + +public interface VmImageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.notebooks.v1.VmImage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Google Cloud project that this VM image belongs to.
+   * Format: `projects/{project_id}`
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + java.lang.String getProject(); + /** + * + * + *
+   * Required. The name of the Google Cloud project that this VM image belongs to.
+   * Format: `projects/{project_id}`
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return Whether the imageName field is set. + */ + boolean hasImageName(); + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return The imageName. + */ + java.lang.String getImageName(); + /** + * + * + *
+   * Use VM image name to find the image.
+   * 
+ * + * string image_name = 2; + * + * @return The bytes for imageName. + */ + com.google.protobuf.ByteString getImageNameBytes(); + + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return Whether the imageFamily field is set. + */ + boolean hasImageFamily(); + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return The imageFamily. + */ + java.lang.String getImageFamily(); + /** + * + * + *
+   * Use this VM image family to find the image; the newest image in this
+   * family will be used.
+   * 
+ * + * string image_family = 3; + * + * @return The bytes for imageFamily. + */ + com.google.protobuf.ByteString getImageFamilyBytes(); + + public com.google.cloud.notebooks.v1.VmImage.ImageCase getImageCase(); +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/location/locations.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/location/locations.proto new file mode 100644 index 00000000..a91766c9 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/location/locations.proto @@ -0,0 +1,108 @@ +// 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. + +syntax = "proto3"; + +package google.cloud.location; + +import "google/api/annotations.proto"; +import "google/protobuf/any.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/location;location"; +option java_multiple_files = true; +option java_outer_classname = "LocationsProto"; +option java_package = "com.google.cloud.location"; + +// An abstract interface that provides location-related information for +// a service. Service-specific metadata is provided through the +// [Location.metadata][google.cloud.location.Location.metadata] field. +service Locations { + option (google.api.default_host) = "cloud.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists information about the supported locations for this service. + rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) { + option (google.api.http) = { + get: "/v1/{name=locations}" + additional_bindings { + get: "/v1/{name=projects/*}/locations" + } + }; + } + + // Gets information about a location. + rpc GetLocation(GetLocationRequest) returns (Location) { + option (google.api.http) = { + get: "/v1/{name=locations/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*}" + } + }; + } +} + +// The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations]. +message ListLocationsRequest { + // The resource that owns the locations collection, if applicable. + string name = 1; + + // The standard list filter. + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + string page_token = 4; +} + +// The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations]. +message ListLocationsResponse { + // A list of locations that matches the specified filter in the request. + repeated Location locations = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation]. +message GetLocationRequest { + // Resource name for the location. + string name = 1; +} + +// A resource that represents Google Cloud Platform location. +message Location { + // Resource name for the location, which may vary between implementations. + // For example: `"projects/example-project/locations/us-east1"` + string name = 1; + + // The canonical id for this location. For example: `"us-east1"`. + string location_id = 4; + + // The friendly name for this location, typically a nearby city name. + // For example, "Tokyo". + string display_name = 5; + + // Cross-service attributes for the location. For example + // + // {"cloud.googleapis.com/region": "us-east1"} + map labels = 2; + + // Service-specific metadata. For example the available capacity at the given + // location. + google.protobuf.Any metadata = 3; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/environment.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/environment.proto new file mode 100644 index 00000000..76b1a2ad --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/environment.proto @@ -0,0 +1,96 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Notebooks.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.notebooks.v1"; +option php_namespace = "Google\\Cloud\\Notebooks\\V1"; +option ruby_package = "Google::Cloud::Notebooks::V1"; + +// Definition of a software environment that is used to start a notebook +// instance. +message Environment { + option (google.api.resource) = { + type: "notebooks.googleapis.com/Environment" + pattern: "projects/{project}/environments/{environment}" + }; + + // Output only. Name of this environment. + // Format: + // `projects/{project_id}/locations/{location}/environments/{environment_id}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Display name of this environment for the UI. + string display_name = 2; + + // A brief description of this environment. + string description = 3; + + // Type of the environment; can be one of VM image, or container image. + oneof image_type { + // Use a Compute Engine VM image to start the notebook instance. + VmImage vm_image = 6; + + // Use a container image to start the notebook instance. + ContainerImage container_image = 7; + } + + // Path to a Bash script that automatically runs after a notebook instance + // fully boots up. The path must be a URL or + // Cloud Storage path. Example: `"gs://path-to-file/file-name"` + string post_startup_script = 8; + + // Output only. The time at which this environment was created. + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Definition of a custom Compute Engine virtual machine image for starting a +// notebook instance with the environment installed directly on the VM. +message VmImage { + // Required. The name of the Google Cloud project that this VM image belongs to. + // Format: `projects/{project_id}` + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // The reference to an external Compute Engine VM image. + oneof image { + // Use VM image name to find the image. + string image_name = 2; + + // Use this VM image family to find the image; the newest image in this + // family will be used. + string image_family = 3; + } +} + +// Definition of a container image for starting a notebook instance with the +// environment installed in a container. +message ContainerImage { + // Required. The path to the container image repository. For example: + // `gcr.io/{project_id}/{image_name}` + string repository = 1 [(google.api.field_behavior) = REQUIRED]; + + // The tag of the container image. If not specified, this defaults + // to the latest tag. + string tag = 2; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/event.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/event.proto new file mode 100644 index 00000000..8753de65 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/event.proto @@ -0,0 +1,42 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "EventProto"; +option java_package = "com.google.cloud.notebooks.v1"; + +// The definition of an Event for a managed / semi-managed notebook instance. +message Event { + // The definition of the even types. + enum EventType { + // Event is not specified. + EVENT_TYPE_UNSPECIFIED = 0; + + // The instance / runtime is idle + IDLE = 1; + } + + // Event report time. + google.protobuf.Timestamp report_time = 1; + + // Event type. + EventType type = 2; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/execution.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/execution.proto new file mode 100644 index 00000000..9d74e25a --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/execution.proto @@ -0,0 +1,321 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "ExecutionProto"; +option java_package = "com.google.cloud.notebooks.v1"; + +// The description a notebook execution workload. +message ExecutionTemplate { + // Definition of a hardware accelerator. Note that not all combinations + // of `type` and `core_count` are valid. Check GPUs on + // Compute Engine to find a valid + // combination. TPUs are not supported. + message SchedulerAcceleratorConfig { + // Type of this accelerator. + SchedulerAcceleratorType type = 1; + + // Count of cores of this accelerator. + int64 core_count = 2; + } + + // Parameters used in Dataproc JobType executions. + message DataprocParameters { + // URI for cluster used to run Dataproc execution. + // Format: 'projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME} + string cluster = 1; + } + + // Required. Specifies the machine types, the number of replicas for workers + // and parameter servers. + enum ScaleTier { + // Unspecified Scale Tier. + SCALE_TIER_UNSPECIFIED = 0; + + // A single worker instance. This tier is suitable for learning how to use + // Cloud ML, and for experimenting with new models using small datasets. + BASIC = 1; + + // Many workers and a few parameter servers. + STANDARD_1 = 2; + + // A large number of workers with many parameter servers. + PREMIUM_1 = 3; + + // A single worker instance with a K80 GPU. + BASIC_GPU = 4; + + // A single worker instance with a Cloud TPU. + BASIC_TPU = 5; + + // The CUSTOM tier is not a set tier, but rather enables you to use your + // own cluster specification. When you use this tier, set values to + // configure your processing cluster according to these guidelines: + // + // * You _must_ set `TrainingInput.masterType` to specify the type + // of machine to use for your master node. This is the only required + // setting. + // + // * You _may_ set `TrainingInput.workerCount` to specify the number of + // workers to use. If you specify one or more workers, you _must_ also + // set `TrainingInput.workerType` to specify the type of machine to use + // for your worker nodes. + // + // * You _may_ set `TrainingInput.parameterServerCount` to specify the + // number of parameter servers to use. If you specify one or more + // parameter servers, you _must_ also set + // `TrainingInput.parameterServerType` to specify the type of machine to + // use for your parameter servers. + // + // Note that all of your workers must use the same machine type, which can + // be different from your parameter server type and master type. Your + // parameter servers must likewise use the same machine type, which can be + // different from your worker type and master type. + CUSTOM = 6; + } + + // Hardware accelerator types for AI Platform Training jobs. + enum SchedulerAcceleratorType { + // Unspecified accelerator type. Default to no GPU. + SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; + + // Nvidia Tesla K80 GPU. + NVIDIA_TESLA_K80 = 1; + + // Nvidia Tesla P100 GPU. + NVIDIA_TESLA_P100 = 2; + + // Nvidia Tesla V100 GPU. + NVIDIA_TESLA_V100 = 3; + + // Nvidia Tesla P4 GPU. + NVIDIA_TESLA_P4 = 4; + + // Nvidia Tesla T4 GPU. + NVIDIA_TESLA_T4 = 5; + + // TPU v2. + TPU_V2 = 6; + + // TPU v3. + TPU_V3 = 7; + } + + // The backend used for this execution. + enum JobType { + // No type specified. + JOB_TYPE_UNSPECIFIED = 0; + + // Custom Job in `aiplatform.googleapis.com`. + // Default value for an execution. + VERTEX_AI = 1; + + // Run execution on a cluster with Dataproc as a job. + // https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs + DATAPROC = 2; + } + + // Required. Scale tier of the hardware used for notebook execution. + // DEPRECATED Will be discontinued. As right now only CUSTOM is supported. + ScaleTier scale_tier = 1 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; + + // Specifies the type of virtual machine to use for your training + // job's master worker. You must specify this field when `scaleTier` is set to + // `CUSTOM`. + // + // You can use certain Compute Engine machine types directly in this field. + // The following types are supported: + // + // - `n1-standard-4` + // - `n1-standard-8` + // - `n1-standard-16` + // - `n1-standard-32` + // - `n1-standard-64` + // - `n1-standard-96` + // - `n1-highmem-2` + // - `n1-highmem-4` + // - `n1-highmem-8` + // - `n1-highmem-16` + // - `n1-highmem-32` + // - `n1-highmem-64` + // - `n1-highmem-96` + // - `n1-highcpu-16` + // - `n1-highcpu-32` + // - `n1-highcpu-64` + // - `n1-highcpu-96` + // + // + // Alternatively, you can use the following legacy machine types: + // + // - `standard` + // - `large_model` + // - `complex_model_s` + // - `complex_model_m` + // - `complex_model_l` + // - `standard_gpu` + // - `complex_model_m_gpu` + // - `complex_model_l_gpu` + // - `standard_p100` + // - `complex_model_m_p100` + // - `standard_v100` + // - `large_model_v100` + // - `complex_model_m_v100` + // - `complex_model_l_v100` + // + // + // Finally, if you want to use a TPU for training, specify `cloud_tpu` in this + // field. Learn more about the [special configuration options for training + // with TPU. + string master_type = 2; + + // Configuration (count and accelerator type) for hardware running notebook + // execution. + SchedulerAcceleratorConfig accelerator_config = 3; + + // Labels for execution. + // If execution is scheduled, a field included will be 'nbs-scheduled'. + // Otherwise, it is an immediate execution, and an included field will be + // 'nbs-immediate'. Use fields to efficiently index between various types of + // executions. + map labels = 4; + + // Path to the notebook file to execute. + // Must be in a Google Cloud Storage bucket. + // Format: gs://{project_id}/{folder}/{notebook_file_name} + // Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb + string input_notebook_file = 5; + + // Container Image URI to a DLVM + // Example: 'gcr.io/deeplearning-platform-release/base-cu100' + // More examples can be found at: + // https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container + string container_image_uri = 6; + + // Path to the notebook folder to write to. + // Must be in a Google Cloud Storage bucket path. + // Format: gs://{project_id}/{folder} + // Ex: gs://notebook_user/scheduled_notebooks + string output_notebook_folder = 7; + + // Parameters to be overridden in the notebook during execution. + // Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on + // how to specifying parameters in the input notebook and pass them here + // in an YAML file. + // Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml + string params_yaml_file = 8; + + // Parameters used within the 'input_notebook_file' notebook. + string parameters = 9; + + // The email address of a service account to use when running the execution. + // You must have the `iam.serviceAccounts.actAs` permission for the specified + // service account. + string service_account = 10; + + // The type of Job to be used on this execution. + JobType job_type = 11; + + // Parameters for an execution type. + // NOTE: There are currently no extra parameters for VertexAI jobs. + oneof job_parameters { + // Parameters used in Dataproc JobType executions. + DataprocParameters dataproc_parameters = 12; + } +} + +// The definition of a single executed notebook. +message Execution { + option (google.api.resource) = { + type: "notebooks.googleapis.com/Execution" + pattern: "projects/{project}/location/{location}/executions/{execution}" + }; + + // Enum description of the state of the underlying AIP job. + enum State { + // The job state is unspecified. + STATE_UNSPECIFIED = 0; + + // The job has been just created and processing has not yet begun. + QUEUED = 1; + + // The service is preparing to execution the job. + PREPARING = 2; + + // The job is in progress. + RUNNING = 3; + + // The job completed successfully. + SUCCEEDED = 4; + + // The job failed. + // `error_message` should contain the details of the failure. + FAILED = 5; + + // The job is being cancelled. + // `error_message` should describe the reason for the cancellation. + CANCELLING = 6; + + // The job has been cancelled. + // `error_message` should describe the reason for the cancellation. + CANCELLED = 7; + + // The jobs has become expired (added for uCAIP jobs) + // https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState + EXPIRED = 9; + + // The Execution is being created. + INITIALIZING = 10; + } + + // execute metadata including name, hardware spec, region, labels, etc. + ExecutionTemplate execution_template = 1; + + // Output only. The resource name of the execute. Format: + // `projects/{project_id}/locations/{location}/execution/{execution_id} + string name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name used for UI purposes. + // Name can only contain alphanumeric characters and underscores '_'. + string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A brief description of this execution. + string description = 4; + + // Output only. Time the Execution was instantiated. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the Execution was last updated. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the underlying AI Platform job. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output notebook file generated by this execution + string output_notebook_file = 8; + + // Output only. The URI of the external job used to execute the notebook. + string job_uri = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/instance.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/instance.proto new file mode 100644 index 00000000..f9f6a2f0 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/instance.proto @@ -0,0 +1,520 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/notebooks/v1/environment.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Notebooks.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "InstanceProto"; +option java_package = "com.google.cloud.notebooks.v1"; +option php_namespace = "Google\\Cloud\\Notebooks\\V1"; +option ruby_package = "Google::Cloud::Notebooks::V1"; + +// Reservation Affinity for consuming Zonal reservation. +message ReservationAffinity { + // Indicates whether to consume capacity from an reservation or not. + enum Type { + // Default type. + TYPE_UNSPECIFIED = 0; + + // Do not consume from any allocated capacity. + NO_RESERVATION = 1; + + // Consume any reservation available. + ANY_RESERVATION = 2; + + // Must consume from a specific reservation. Must specify key value fields + // for specifying the reservations. + SPECIFIC_RESERVATION = 3; + } + + // Optional. Type of reservation to consume + Type consume_reservation_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label key of reservation resource. + string key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of reservation resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The definition of a notebook instance. +message Instance { + option (google.api.resource) = { + type: "notebooks.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" + }; + + // Definition of a hardware accelerator. Note that not all combinations + // of `type` and `core_count` are valid. Check [GPUs on + // Compute Engine](/compute/docs/gpus/#gpus-list) to find a valid + // combination. TPUs are not supported. + message AcceleratorConfig { + // Type of this accelerator. + AcceleratorType type = 1; + + // Count of cores of this accelerator. + int64 core_count = 2; + } + + // An instance-attached disk resource. + message Disk { + // Guest OS features for boot disk. + message GuestOsFeature { + // The ID of a supported feature. Read Enabling guest operating system + // features to see a list of available options. + // Valid values: + // FEATURE_TYPE_UNSPECIFIED + // MULTI_IP_SUBNET + // SECURE_BOOT + // UEFI_COMPATIBLE + // VIRTIO_SCSI_MULTIQUEUE + // WINDOWS + string type = 1; + } + + // Indicates whether the disk will be auto-deleted when the instance is + // deleted (but not when the disk is detached from the instance). + bool auto_delete = 1; + + // Indicates that this is a boot disk. The virtual machine will use the + // first partition of the disk for its root filesystem. + bool boot = 2; + + // Indicates a unique device name of your choice that is reflected into the + // /dev/disk/by-id/google-* tree of a Linux operating system running within + // the instance. This name can be used to reference the device for mounting, + // resizing, and so on, from within the instance. + // + // If not specified, the server chooses a default device name to apply to + // this disk, in the form persistent-disk-x, where x is a number assigned by + // Google Compute Engine.This field is only applicable for persistent disks. + string device_name = 3; + + // Indicates the size of the disk in base-2 GB. + int64 disk_size_gb = 4; + + // Indicates a list of features to enable on the guest operating system. + // Applicable only for bootable images. Read Enabling guest operating + // system features to see a list of available options. + repeated GuestOsFeature guest_os_features = 5; + + // A zero-based index to this disk, where 0 is reserved for the + // boot disk. If you have many disks attached to an instance, each disk + // would have a unique index number. + int64 index = 6; + + // Indicates the disk interface to use for attaching this disk, which is + // either SCSI or NVME. The default is SCSI. Persistent disks must always + // use SCSI and the request will fail if you attempt to attach a persistent + // disk in any other format than SCSI. Local SSDs can use either NVME or + // SCSI. For performance characteristics of SCSI over NVMe, see Local SSD + // performance. + // Valid values: + // NVME + // SCSI + string interface = 7; + + // Type of the resource. Always compute#attachedDisk for attached + // disks. + string kind = 8; + + // A list of publicly visible licenses. Reserved for Google's use. + // A License represents billing and aggregate usage data for public + // and marketplace images. + repeated string licenses = 9; + + // The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If + // not specified, the default is to attach the disk in READ_WRITE mode. + // Valid values: + // READ_ONLY + // READ_WRITE + string mode = 10; + + // Indicates a valid partial or full URL to an existing Persistent Disk + // resource. + string source = 11; + + // Indicates the type of the disk, either SCRATCH or PERSISTENT. + // Valid values: + // PERSISTENT + // SCRATCH + string type = 12; + } + + // A set of Shielded Instance options. + // Check [Images using supported Shielded VM features] + // Not all combinations are valid. + message ShieldedInstanceConfig { + // Defines whether the instance has Secure Boot enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. Disabled by default. + bool enable_secure_boot = 1; + + // Defines whether the instance has the vTPM enabled. Enabled by default. + bool enable_vtpm = 2; + + // Defines whether the instance has integrity monitoring enabled. + // + // Enables monitoring and attestation of the boot integrity of the instance. + // The attestation is performed against the integrity policy baseline. This + // baseline is initially derived from the implicitly trusted boot image when + // the instance is created. Enabled by default. + bool enable_integrity_monitoring = 3; + } + + // The entry of VM image upgrade history. + message UpgradeHistoryEntry { + // The definition of the states of this upgrade history entry. + enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // The instance upgrade is started. + STARTED = 1; + + // The instance upgrade is succeeded. + SUCCEEDED = 2; + + // The instance upgrade is failed. + FAILED = 3; + } + + // The definition of operations of this upgrade history entry. + enum Action { + // Operation is not specified. + ACTION_UNSPECIFIED = 0; + + // Upgrade. + UPGRADE = 1; + + // Rollback. + ROLLBACK = 2; + } + + // The snapshot of the boot disk of this notebook instance before upgrade. + string snapshot = 1; + + // The VM image before this instance upgrade. + string vm_image = 2; + + // The container image before this instance upgrade. + string container_image = 3; + + // The framework of this notebook instance. + string framework = 4; + + // The version of the notebook instance before this upgrade. + string version = 5; + + // The state of this instance upgrade history entry. + State state = 6; + + // The time that this instance upgrade history entry is created. + google.protobuf.Timestamp create_time = 7; + + // Target VM Image. Format: ainotebooks-vm/project/image-name/name. + string target_image = 8 [deprecated = true]; + + // Action. Rolloback or Upgrade. + Action action = 9; + + // Target VM Version, like m63. + string target_version = 10; + } + + // Definition of the types of hardware accelerators that can be used on this + // instance. + enum AcceleratorType { + // Accelerator type is not specified. + ACCELERATOR_TYPE_UNSPECIFIED = 0; + + // Accelerator type is Nvidia Tesla K80. + NVIDIA_TESLA_K80 = 1; + + // Accelerator type is Nvidia Tesla P100. + NVIDIA_TESLA_P100 = 2; + + // Accelerator type is Nvidia Tesla V100. + NVIDIA_TESLA_V100 = 3; + + // Accelerator type is Nvidia Tesla P4 GPU. + NVIDIA_TESLA_P4 = 4; + + // Accelerator type is Nvidia Tesla T4. + NVIDIA_TESLA_T4 = 5; + + // Accelerator type is Nvidia Tesla A100. + NVIDIA_TESLA_A100 = 11; + + // Accelerator type is NVIDIA Tesla T4 Virtual Workstations. + NVIDIA_TESLA_T4_VWS = 8; + + // Accelerator type is NVIDIA Tesla P100 Virtual Workstations. + NVIDIA_TESLA_P100_VWS = 9; + + // Accelerator type is Nvidia Tesla P4 GPU Virtual Workstations. + NVIDIA_TESLA_P4_VWS = 10; + + // (Coming soon) Accelerator type is TPU V2. + TPU_V2 = 6; + + // (Coming soon) Accelerator type is TPU V3. + TPU_V3 = 7; + } + + // The definition of the states of this instance. + enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // The control logic is starting the instance. + STARTING = 1; + + // The control logic is installing required frameworks and registering the + // instance with notebook proxy + PROVISIONING = 2; + + // The instance is running. + ACTIVE = 3; + + // The control logic is stopping the instance. + STOPPING = 4; + + // The instance is stopped. + STOPPED = 5; + + // The instance is deleted. + DELETED = 6; + + // The instance is upgrading. + UPGRADING = 7; + + // The instance is being created. + INITIALIZING = 8; + + // The instance is getting registered. + REGISTERING = 9; + } + + // Possible disk types for notebook instances. + enum DiskType { + // Disk type not set. + DISK_TYPE_UNSPECIFIED = 0; + + // Standard persistent disk type. + PD_STANDARD = 1; + + // SSD persistent disk type. + PD_SSD = 2; + + // Balanced persistent disk type. + PD_BALANCED = 3; + } + + // Definition of the disk encryption options. + enum DiskEncryption { + // Disk encryption is not specified. + DISK_ENCRYPTION_UNSPECIFIED = 0; + + // Use Google managed encryption keys to encrypt the boot disk. + GMEK = 1; + + // Use customer managed encryption keys to encrypt the boot disk. + CMEK = 2; + } + + // The type of vNIC driver. + // Default should be UNSPECIFIED_NIC_TYPE. + enum NicType { + // No type specified. + UNSPECIFIED_NIC_TYPE = 0; + + // VIRTIO + VIRTIO_NET = 1; + + // GVNIC + GVNIC = 2; + } + + // Output only. The name of this notebook instance. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Type of the environment; can be one of VM image, or container image. + oneof environment { + // Use a Compute Engine VM image to start the notebook instance. + VmImage vm_image = 2; + + // Use a container image to start the notebook instance. + ContainerImage container_image = 3; + } + + // Path to a Bash script that automatically runs after a notebook instance + // fully boots up. The path must be a URL or + // Cloud Storage path (gs://path-to-file/file-name). + string post_startup_script = 4; + + // Output only. The proxy endpoint that is used to access the Jupyter notebook. + string proxy_uri = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input only. The owner of this instance after creation. Format: `alias@example.com` + // + // Currently supports one owner only. If not specified, all of the service + // account users of your VM instance's service account can use + // the instance. + repeated string instance_owners = 6 [(google.api.field_behavior) = INPUT_ONLY]; + + // The service account on this instance, giving access to other Google + // Cloud services. + // You can use any service account within the same project, but you + // must have the service account user permission to use the instance. + // + // If not specified, the [Compute Engine default service + // account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + // is used. + string service_account = 7; + + // Optional. The URIs of service account scopes to be included in + // Compute Engine instances. + // + // If not specified, the following + // [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) + // are defined: + // - https://www.googleapis.com/auth/cloud-platform + // - https://www.googleapis.com/auth/userinfo.email + // If not using default scopes, you need at least: + // https://www.googleapis.com/auth/compute + repeated string service_account_scopes = 31 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The [Compute Engine machine type](/compute/docs/machine-types) of this + // instance. + string machine_type = 8 [(google.api.field_behavior) = REQUIRED]; + + // The hardware accelerator used on this instance. If you use + // accelerators, make sure that your configuration has + // [enough vCPUs and memory to support the `machine_type` you + // have selected](/compute/docs/gpus/#gpus-list). + AcceleratorConfig accelerator_config = 9; + + // Output only. The state of this instance. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether the end user authorizes Google Cloud to install GPU driver + // on this instance. + // If this field is empty or set to false, the GPU driver won't be installed. + // Only applicable to instances with GPUs. + bool install_gpu_driver = 11; + + // Specify a custom Cloud Storage path where the GPU driver is stored. + // If not specified, we'll automatically choose from official GPU drivers. + string custom_gpu_driver_path = 12; + + // Input only. The type of the boot disk attached to this instance, defaults to + // standard persistent disk (`PD_STANDARD`). + DiskType boot_disk_type = 13 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. The size of the boot disk in GB attached to this instance, up to a maximum + // of 64000 GB (64 TB). The minimum recommended value is + // 100 GB. If not specified, this defaults to 100. + int64 boot_disk_size_gb = 14 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. The type of the data disk attached to this instance, defaults to + // standard persistent disk (`PD_STANDARD`). + DiskType data_disk_type = 25 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. The size of the data disk in GB attached to this instance, up to a maximum + // of 64000 GB (64 TB). You can choose the size of the data disk + // based on how big your notebooks and data are. If not specified, this + // defaults to 100. + int64 data_disk_size_gb = 26 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. If true, the data disk will not be auto deleted when deleting the instance. + bool no_remove_data_disk = 27 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. + DiskEncryption disk_encryption = 15 [(google.api.field_behavior) = INPUT_ONLY]; + + // Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption + // is CMEK. + // Format: + // `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + // + // Learn more about [using your own encryption keys](/kms/docs/quickstart). + string kms_key = 16 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. Attached disks to notebook instance. + repeated Disk disks = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Shielded VM configuration. + // [Images using supported Shielded VM features] + // (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + ShieldedInstanceConfig shielded_instance_config = 30 [(google.api.field_behavior) = OPTIONAL]; + + // If true, no public IP will be assigned to this instance. + bool no_public_ip = 17; + + // If true, the notebook instance will not register with the proxy. + bool no_proxy_access = 18; + + // The name of the VPC that this instance is in. + // Format: + // `projects/{project_id}/global/networks/{network_id}` + string network = 19; + + // The name of the subnet that this instance is in. + // Format: + // `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + string subnet = 20; + + // Labels to apply to this instance. + // These can be later modified by the setLabels method. + map labels = 21; + + // Custom metadata to apply to this instance. + map metadata = 22; + + // Optional. The Compute Engine tags to add to runtime (see [Tagging + // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + repeated string tags = 32 [(google.api.field_behavior) = OPTIONAL]; + + // The upgrade history of this instance. + repeated UpgradeHistoryEntry upgrade_history = 29; + + // Optional. The type of vNIC to be used on this interface. This may be gVNIC or + // VirtioNet. + NicType nic_type = 33 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The optional reservation affinity. Setting this field will apply + // the specified [Zonal Compute + // Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + // to this notebook instance. + ReservationAffinity reservation_affinity = 34 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Instance creation time. + google.protobuf.Timestamp create_time = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Instance update time. + google.protobuf.Timestamp update_time = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/instance_config.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/instance_config.proto new file mode 100644 index 00000000..9e11e74b --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/instance_config.proto @@ -0,0 +1,35 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +option csharp_namespace = "Google.Cloud.Notebooks.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "InstanceConfigProto"; +option java_package = "com.google.cloud.notebooks.v1"; +option php_namespace = "Google\\Cloud\\Notebooks\\V1"; +option ruby_package = "Google::Cloud::Notebooks::V1"; + +// Notebook instance configurations that can be updated. +message InstanceConfig { + // Cron expression in UTC timezone, used to schedule instance auto upgrade. + // Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + string notebook_upgrade_schedule = 1; + + // Verifies core internal services are running. More info: go/notebooks-health + bool enable_health_monitoring = 2; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/managed_service.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/managed_service.proto new file mode 100644 index 00000000..453ad59a --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/managed_service.proto @@ -0,0 +1,283 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/notebooks/v1/event.proto"; +import "google/cloud/notebooks/v1/runtime.proto"; +import "google/longrunning/operations.proto"; + +option csharp_namespace = "Google.Cloud.Notebooks.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "ManagedNotebooksProto"; +option java_package = "com.google.cloud.notebooks.v1"; +option php_namespace = "Google\\Cloud\\Notebooks\\V1"; +option ruby_package = "Google::Cloud::Notebooks::V1"; + +// API v1 service for Managed Notebooks. +service ManagedNotebookService { + option (google.api.default_host) = "notebooks.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Runtimes in a given project and location. + rpc ListRuntimes(ListRuntimesRequest) returns (ListRuntimesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/runtimes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Runtime. The location must be a regional endpoint + // rather than zonal. + rpc GetRuntime(GetRuntimeRequest) returns (Runtime) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/runtimes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Runtime in a given project and location. + rpc CreateRuntime(CreateRuntimeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/runtimes" + body: "runtime" + }; + option (google.api.method_signature) = "parent,runtime_id,runtime"; + option (google.longrunning.operation_info) = { + response_type: "Runtime" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Runtime. + rpc DeleteRuntime(DeleteRuntimeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/runtimes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Starts a Managed Notebook Runtime. + // Perform "Start" on GPU instances; "Resume" on CPU instances + // See: + // https://cloud.google.com/compute/docs/instances/stop-start-instance + // https://cloud.google.com/compute/docs/instances/suspend-resume-instance + rpc StartRuntime(StartRuntimeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/runtimes/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Runtime" + metadata_type: "OperationMetadata" + }; + } + + // Stops a Managed Notebook Runtime. + // Perform "Stop" on GPU instances; "Suspend" on CPU instances + // See: + // https://cloud.google.com/compute/docs/instances/stop-start-instance + // https://cloud.google.com/compute/docs/instances/suspend-resume-instance + rpc StopRuntime(StopRuntimeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/runtimes/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Runtime" + metadata_type: "OperationMetadata" + }; + } + + // Switch a Managed Notebook Runtime. + rpc SwitchRuntime(SwitchRuntimeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/runtimes/*}:switch" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Runtime" + metadata_type: "OperationMetadata" + }; + } + + // Resets a Managed Notebook Runtime. + rpc ResetRuntime(ResetRuntimeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/runtimes/*}:reset" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Runtime" + metadata_type: "OperationMetadata" + }; + } + + // Report and process a runtime event. + rpc ReportRuntimeEvent(ReportRuntimeEventRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/runtimes/*}:reportEvent" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Runtime" + metadata_type: "OperationMetadata" + }; + } +} + +// Request for listing Managed Notebook Runtimes. +message ListRuntimesRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "notebooks.googleapis.com/Runtime" + } + ]; + + // Maximum return size of the list call. + int32 page_size = 2; + + // A previous returned page token that can be used to continue listing + // from the last result. + string page_token = 3; +} + +// Response for listing Managed Notebook Runtimes. +message ListRuntimesResponse { + // A list of returned Runtimes. + repeated Runtime runtimes = 1; + + // Page token that can be used to continue listing from the last result in the + // next list call. + string next_page_token = 2; + + // Locations that could not be reached. For example, + // ['us-west1', 'us-central1']. + // A ListRuntimesResponse will only contain either runtimes or unreachables, + repeated string unreachable = 3; +} + +// Request for getting a Managed Notebook Runtime. +message GetRuntimeRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Runtime" + } + ]; +} + +// Request for creating a Managed Notebook Runtime. +message CreateRuntimeRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Runtime" + } + ]; + + // Required. User-defined unique ID of this Runtime. + string runtime_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Runtime to be created. + Runtime runtime = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for deleting a Managed Notebook Runtime. +message DeleteRuntimeRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Runtime" + } + ]; +} + +// Request for starting a Managed Notebook Runtime. +message StartRuntimeRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for stopping a Managed Notebook Runtime. +message StopRuntimeRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for switching a Managed Notebook Runtime. +message SwitchRuntimeRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // machine type. + string machine_type = 2; + + // accelerator config. + RuntimeAcceleratorConfig accelerator_config = 3; +} + +// Request for reseting a Managed Notebook Runtime. +message ResetRuntimeRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for reporting a Managed Notebook Event. +message ReportRuntimeEventRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Runtime" + } + ]; + + // Required. The VM hardware token for authenticating the VM. + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + string vm_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Event to be reported. + Event event = 3 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/runtime.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/runtime.proto new file mode 100644 index 00000000..8af478f2 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/runtime.proto @@ -0,0 +1,535 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/notebooks/v1/environment.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Notebooks.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "RuntimeProto"; +option java_package = "com.google.cloud.notebooks.v1"; +option php_namespace = "Google\\Cloud\\Notebooks\\V1"; +option ruby_package = "Google::Cloud::Notebooks::V1"; + +// The definition of a Runtime for a managed notebook instance. +message Runtime { + option (google.api.resource) = { + type: "notebooks.googleapis.com/Runtime" + pattern: "projects/{project}/locations/{location}/runtimes/{runtime}" + }; + + // The definition of the states of this runtime. + enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // The compute layer is starting the runtime. It is not ready for use. + STARTING = 1; + + // The compute layer is installing required frameworks and registering the + // runtime with notebook proxy. It cannot be used. + PROVISIONING = 2; + + // The runtime is currently running. It is ready for use. + ACTIVE = 3; + + // The control logic is stopping the runtime. It cannot be used. + STOPPING = 4; + + // The runtime is stopped. It cannot be used. + STOPPED = 5; + + // The runtime is being deleted. It cannot be used. + DELETING = 6; + + // The runtime is upgrading. It cannot be used. + UPGRADING = 7; + + // The runtime is being created and set up. It is not ready for use. + INITIALIZING = 8; + } + + // The runtime substate. + enum HealthState { + // The runtime substate is unknown. + HEALTH_STATE_UNSPECIFIED = 0; + + // The runtime is known to be in an healthy state + // (for example, critical daemons are running) + // Applies to ACTIVE state. + HEALTHY = 1; + + // The runtime is known to be in an unhealthy state + // (for example, critical daemons are not running) + // Applies to ACTIVE state. + UNHEALTHY = 2; + } + + // Output only. The resource name of the runtime. + // Format: + // `projects/{project}/locations/{location}/runtimes/{runtimeId}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Type of the runtime; currently only supports Compute Engine VM. + oneof runtime_type { + // Use a Compute Engine VM image to start the managed notebook instance. + VirtualMachine virtual_machine = 2; + } + + // Output only. Runtime state. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Runtime health_state. + HealthState health_state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The config settings for accessing runtime. + RuntimeAccessConfig access_config = 5; + + // The config settings for software inside the runtime. + RuntimeSoftwareConfig software_config = 6; + + // Output only. Contains Runtime daemon metrics such as Service status and JupyterLab + // stats. + RuntimeMetrics metrics = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Runtime creation time. + google.protobuf.Timestamp create_time = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Runtime update time. + google.protobuf.Timestamp update_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Definition of the types of hardware accelerators that can be used. +// Definition of the types of hardware accelerators that can be used. +// See [Compute Engine +// AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes). +// Examples: +// +// * `nvidia-tesla-k80` +// * `nvidia-tesla-p100` +// * `nvidia-tesla-v100` +// * `nvidia-tesla-t4` +// * `nvidia-tesla-a100` +message RuntimeAcceleratorConfig { + // Type of this accelerator. + enum AcceleratorType { + // Accelerator type is not specified. + ACCELERATOR_TYPE_UNSPECIFIED = 0; + + // Accelerator type is Nvidia Tesla K80. + NVIDIA_TESLA_K80 = 1; + + // Accelerator type is Nvidia Tesla P100. + NVIDIA_TESLA_P100 = 2; + + // Accelerator type is Nvidia Tesla V100. + NVIDIA_TESLA_V100 = 3; + + // Accelerator type is Nvidia Tesla P4 GPU. + NVIDIA_TESLA_P4 = 4; + + // Accelerator type is Nvidia Tesla T4. + NVIDIA_TESLA_T4 = 5; + + // Accelerator type is Nvidia Tesla A100. + NVIDIA_TESLA_A100 = 6; + + // (Coming soon) Accelerator type is TPU V2. + TPU_V2 = 7; + + // (Coming soon) Accelerator type is TPU V3. + TPU_V3 = 8; + + // Accelerator type is NVIDIA Tesla T4 Virtual Workstations. + NVIDIA_TESLA_T4_VWS = 9; + + // Accelerator type is NVIDIA Tesla P100 Virtual Workstations. + NVIDIA_TESLA_P100_VWS = 10; + + // Accelerator type is Nvidia Tesla P.4 GPU Virtual Workstations. + NVIDIA_TESLA_P4_VWS = 11; + } + + // Accelerator model. + AcceleratorType type = 1; + + // Count of cores of this accelerator. + int64 core_count = 2; +} + +// Represents a custom encryption key configuration that can be applied to +// a resource. This will encrypt all disks in Virtual Machine. +message EncryptionConfig { + // The Cloud KMS resource identifier of the customer-managed encryption key + // used to protect a resource, such as a disks. It has the following + // format: + // `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` + string kms_key = 1; +} + +// An Local attached disk resource. +message LocalDisk { + // Optional. A list of features to enable on the guest operating system. + // Applicable only for bootable images. + // Read [Enabling guest operating system + // features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) + // to see a list of available options. + // Guest OS features for boot disk. + message RuntimeGuestOsFeature { + // The ID of a supported feature. Read [Enabling guest operating system + // features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) + // to see a list of available options. + // + // Valid values: + // + // * FEATURE_TYPE_UNSPECIFIED + // * MULTI_IP_SUBNET + // * SECURE_BOOT + // * UEFI_COMPATIBLE + // * VIRTIO_SCSI_MULTIQUEUE + // * WINDOWS + string type = 1; + } + + // Optional. Output only. Specifies whether the disk will be auto-deleted when the + // instance is deleted (but not when the disk is detached from the instance). + bool auto_delete = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Output only. Indicates that this is a boot disk. The virtual machine + // will use the first partition of the disk for its root filesystem. + bool boot = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Output only. Specifies a unique device name + // of your choice that is reflected into the + // /dev/disk/by-id/google-* tree of a Linux operating system running within + // the instance. This name can be used to reference the device for mounting, + // resizing, and so on, from within the instance. + // + // If not specified, the server chooses a default device name to apply to this + // disk, in the form persistent-disk-x, where x is a number assigned by Google + // Compute Engine. This field is only applicable for persistent disks. + string device_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates a list of features to enable on the guest operating system. + // Applicable only for bootable images. Read Enabling guest operating + // system features to see a list of available options. + repeated RuntimeGuestOsFeature guest_os_features = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A zero-based index to this disk, where 0 is reserved for the + // boot disk. If you have many disks attached to an instance, each disk would + // have a unique index number. + int32 index = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input only. Specifies the parameters for a new disk that will be created + // alongside the new instance. Use initialization parameters to create boot + // disks or local SSDs attached to the new instance. + // + // This property is mutually exclusive with the source property; you can only + // define one or the other, but not both. + LocalDiskInitializeParams initialize_params = 6 [(google.api.field_behavior) = INPUT_ONLY]; + + // Specifies the disk interface to use for attaching this disk, which is + // either SCSI or NVME. The default is SCSI. Persistent disks must always use + // SCSI and the request will fail if you attempt to attach a persistent disk + // in any other format than SCSI. Local SSDs can use either NVME or SCSI. For + // performance characteristics of SCSI over NVMe, see Local SSD performance. + // Valid values: + // NVME + // SCSI + string interface = 7; + + // Output only. Type of the resource. Always compute#attachedDisk for attached disks. + string kind = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Any valid publicly visible licenses. + repeated string licenses = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If + // not specified, the default is to attach the disk in READ_WRITE mode. + // Valid values: + // READ_ONLY + // READ_WRITE + string mode = 10; + + // Specifies a valid partial or full URL to an existing Persistent Disk + // resource. + string source = 11; + + // Specifies the type of the disk, either SCRATCH or PERSISTENT. If not + // specified, the default is PERSISTENT. + // Valid values: + // PERSISTENT + // SCRATCH + string type = 12; +} + +// Input only. Specifies the parameters for a new disk that will be created +// alongside the new instance. Use initialization parameters to create boot +// disks or local SSDs attached to the new runtime. +// This property is mutually exclusive with the source property; you can only +// define one or the other, but not both. +message LocalDiskInitializeParams { + // Possible disk types. + enum DiskType { + // Disk type not set. + DISK_TYPE_UNSPECIFIED = 0; + + // Standard persistent disk type. + PD_STANDARD = 1; + + // SSD persistent disk type. + PD_SSD = 2; + + // Balanced persistent disk type. + PD_BALANCED = 3; + } + + // Optional. Provide this property when creating the disk. + string description = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the disk name. If not specified, the default is to use the name + // of the instance. If the disk with the instance name exists already in the + // given zone/region, a new name will be automatically generated. + string disk_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk + // will be the same size as the image (usually 10GB). If specified, the size + // must be equal to or larger than 10GB. Default 100 GB. + int64 disk_size_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Input only. The type of the boot disk attached to this instance, defaults to + // standard persistent disk (`PD_STANDARD`). + DiskType disk_type = 4 [(google.api.field_behavior) = INPUT_ONLY]; + + // Optional. Labels to apply to this disk. These can be later modified by the + // disks.setLabels method. This field is only applicable for persistent disks. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Specifies the login configuration for Runtime +message RuntimeAccessConfig { + // Possible ways to access runtime. Authentication mode. + // Currently supports: Single User only. + enum RuntimeAccessType { + // Unspecified access. + RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; + + // Single user login. + SINGLE_USER = 1; + } + + // The type of access mode this instance. + RuntimeAccessType access_type = 1; + + // The owner of this runtime after creation. Format: `alias@example.com` + // Currently supports one owner only. + string runtime_owner = 2; + + // Output only. The proxy endpoint that is used to access the runtime. + string proxy_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specifies the selection and configuration of software inside the runtime. +// The properties to set on runtime. +// Properties keys are specified in `key:value` format, for example: +// +// * `idle_shutdown: true` +// * `idle_shutdown_timeout: 180` +// * `report-system-health: true` +message RuntimeSoftwareConfig { + // Cron expression in UTC timezone, used to schedule instance auto upgrade. + // Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + string notebook_upgrade_schedule = 1; + + // Verifies core internal services are running. + // Default: True + optional bool enable_health_monitoring = 2; + + // Runtime will automatically shutdown after idle_shutdown_time. + // Default: True + optional bool idle_shutdown = 3; + + // Time in minutes to wait before shuting down runtime. Default: 180 minutes + int32 idle_shutdown_timeout = 4; + + // Install Nvidia Driver automatically. + bool install_gpu_driver = 5; + + // Specify a custom Cloud Storage path where the GPU driver is stored. + // If not specified, we'll automatically choose from official GPU drivers. + string custom_gpu_driver_path = 6; + + // Path to a Bash script that automatically runs after a notebook instance + // fully boots up. The path must be a URL or + // Cloud Storage path (gs://path-to-file/file-name). + string post_startup_script = 7; +} + +// Contains runtime daemon metrics, such as OS and kernels and sessions stats. +message RuntimeMetrics { + // Output only. The system metrics. + map system_metrics = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A set of Shielded Instance options. +// Check [Images using supported Shielded VM +// features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). +// Not all combinations are valid. +message RuntimeShieldedInstanceConfig { + // Defines whether the instance has Secure Boot enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. Disabled by default. + bool enable_secure_boot = 1; + + // Defines whether the instance has the vTPM enabled. Enabled by default. + bool enable_vtpm = 2; + + // Defines whether the instance has integrity monitoring enabled. + // + // Enables monitoring and attestation of the boot integrity of the instance. + // The attestation is performed against the integrity policy baseline. This + // baseline is initially derived from the implicitly trusted boot image when + // the instance is created. Enabled by default. + bool enable_integrity_monitoring = 3; +} + +// Runtime using Virtual Machine for computing. +message VirtualMachine { + // Output only. The user-friendly name of the Managed Compute Engine instance. + string instance_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The unique identifier of the Managed Compute Engine instance. + string instance_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Virtual Machine configuration settings. + VirtualMachineConfig virtual_machine_config = 3; +} + +// The config settings for virtual machine. +message VirtualMachineConfig { + // The type of vNIC driver. + // Default should be UNSPECIFIED_NIC_TYPE. + enum NicType { + // No type specified. + UNSPECIFIED_NIC_TYPE = 0; + + // VIRTIO + VIRTIO_NET = 1; + + // GVNIC + GVNIC = 2; + } + + // Output only. The zone where the virtual machine is located. + // If using regional request, the notebooks service will pick a location + // in the corresponding runtime region. + // On a get request, zone will always be present. Example: + // * `us-central1-b` + string zone = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The Compute Engine machine type used for runtimes. + // Short name is valid. Examples: + // * `n1-standard-2` + // * `e2-standard-8` + string machine_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Use a list of container images to start the notebook instance. + repeated ContainerImage container_images = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Data disk option configuration settings. + LocalDisk data_disk = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Encryption settings for virtual machine data disk. + EncryptionConfig encryption_config = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Shielded VM Instance configuration settings. + RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine accelerator configuration for this runtime. + RuntimeAcceleratorConfig accelerator_config = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine network to be used for machine + // communications. Cannot be specified with subnetwork. If neither + // `network` nor `subnet` is specified, the "default" network of + // the project is used, if it exists. + // + // A full URL or partial URI. Examples: + // + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default` + // * `projects/[project_id]/regions/global/default` + // + // Runtimes are managed resources inside Google Infrastructure. + // Runtimes support the following network configurations: + // + // * Google Managed Network (Network & subnet are empty) + // * Consumer Project VPC (network & subnet are required). Requires + // configuring Private Service Access. + // * Shared VPC (network & subnet are required). Requires configuring Private + // Service Access. + string network = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine subnetwork to be used for machine + // communications. Cannot be specified with network. + // + // A full URL or partial URI are valid. Examples: + // + // * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` + // * `projects/[project_id]/regions/us-east1/subnetworks/sub0` + string subnet = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, runtime will only have internal IP + // addresses. By default, runtimes are not restricted to internal IP + // addresses, and will have ephemeral external IP addresses assigned to each + // vm. This `internal_ip_only` restriction can only be enabled for + // subnetwork enabled networks, and all dependencies must be + // configured to be accessible without external IP addresses. + bool internal_ip_only = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine tags to add to runtime (see [Tagging + // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + repeated string tags = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Compute Engine guest attributes. (see + // [Project and instance + // guest + // attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). + map guest_attributes = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The Compute Engine metadata entries to add to virtual machine. (see + // [Project and instance + // metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). + map metadata = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The labels to associate with this runtime. + // Label **keys** must contain 1 to 63 characters, and must conform to + // [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + // Label **values** may be empty, but, if present, must contain 1 to 63 + // characters, and must conform to [RFC + // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + // associated with a cluster. + map labels = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of vNIC to be used on this interface. This may be gVNIC or + // VirtioNet. + NicType nic_type = 17 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/schedule.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/schedule.proto new file mode 100644 index 00000000..7eb57d36 --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/schedule.proto @@ -0,0 +1,107 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/notebooks/v1/execution.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "ScheduleProto"; +option java_package = "com.google.cloud.notebooks.v1"; + +// The definition of a schedule. +message Schedule { + option (google.api.resource) = { + type: "notebooks.googleapis.com/Schedule" + pattern: "projects/{project}/location/{location}/schedules/{schedule}" + }; + + // State of the job. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The job is executing normally. + ENABLED = 1; + + // The job is paused by the user. It will not execute. A user can + // intentionally pause the job using + // [PauseJobRequest][]. + PAUSED = 2; + + // The job is disabled by the system due to error. The user + // cannot directly set a job to be disabled. + DISABLED = 3; + + // The job state resulting from a failed [CloudScheduler.UpdateJob][] + // operation. To recover a job from this state, retry + // [CloudScheduler.UpdateJob][] until a successful response is received. + UPDATE_FAILED = 4; + + // The schedule resource is being created. + INITIALIZING = 5; + + // The schedule resource is being deleted. + DELETING = 6; + } + + // Output only. The name of this schedule. Format: + // `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Display name used for UI purposes. + // Name can only contain alphanumeric characters, hyphens '-', + // and underscores '_'. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A brief description of this environment. + string description = 3; + + State state = 4; + + // Cron-tab formatted schedule by which the job will execute + // Format: minute, hour, day of month, month, day of week + // e.g. 0 0 * * WED = every Wednesday + // More examples: https://crontab.guru/examples.html + string cron_schedule = 5; + + // Timezone on which the cron_schedule. + // The value of this field must be a time zone name from the tz database. + // TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + // + // Note that some time zones include a provision for daylight savings time. + // The rules for daylight saving time are determined by the chosen tz. + // For UTC use the string "utc". If a time zone is not specified, + // the default will be in UTC (also known as GMT). + string time_zone = 6; + + // Output only. Time the schedule was created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the schedule was last updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Notebook Execution Template corresponding to this schedule. + ExecutionTemplate execution_template = 9; + + // Output only. The most recent execution names triggered from this schedule and their + // corresponding states. + repeated Execution recent_executions = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/service.proto b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/service.proto new file mode 100644 index 00000000..aee7612a --- /dev/null +++ b/proto-google-cloud-notebooks-v1/src/main/proto/google/cloud/notebooks/v1/service.proto @@ -0,0 +1,931 @@ +// Copyright 2021 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. + +syntax = "proto3"; + +package google.cloud.notebooks.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/notebooks/v1/environment.proto"; +import "google/cloud/notebooks/v1/execution.proto"; +import "google/cloud/notebooks/v1/instance.proto"; +import "google/cloud/notebooks/v1/instance_config.proto"; +import "google/cloud/notebooks/v1/schedule.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Notebooks.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks"; +option java_multiple_files = true; +option java_outer_classname = "NotebooksProto"; +option java_package = "com.google.cloud.notebooks.v1"; +option php_namespace = "Google\\Cloud\\Notebooks\\V1"; +option ruby_package = "Google::Cloud::Notebooks::V1"; + +// API v1 service for Cloud AI Platform Notebooks. +service NotebookService { + option (google.api.default_host) = "notebooks.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Lists instances in a given project and location. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/instances" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Instance in a given project and location. + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/instances" + body: "instance" + }; + option (google.api.method_signature) = "parent,instance,instance_id"; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Registers an existing legacy notebook instance to the Notebooks API server. + // Legacy instances are instances created with the legacy Compute Engine + // calls. They are not manageable by the Notebooks API out of the box. This + // call makes these instances manageable by the Notebooks API. + rpc RegisterInstance(RegisterInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/instances:register" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Updates the guest accelerators of a single Instance. + rpc SetInstanceAccelerator(SetInstanceAcceleratorRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/instances/*}:setAccelerator" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Updates the machine type of a single Instance. + rpc SetInstanceMachineType(SetInstanceMachineTypeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/instances/*}:setMachineType" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Update Notebook Instance configurations. + rpc UpdateInstanceConfig(UpdateInstanceConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/instances/*}:updateConfig" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Updates the Shielded instance configuration of a single Instance. + rpc UpdateShieldedInstanceConfig(UpdateShieldedInstanceConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/instances/*}:updateShieldedInstanceConfig" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Replaces all the labels of an Instance. + rpc SetInstanceLabels(SetInstanceLabelsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/instances/*}:setLabels" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Instance. + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Starts a notebook instance. + rpc StartInstance(StartInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:start" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Stops a notebook instance. + rpc StopInstance(StopInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:stop" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Resets a notebook instance. + rpc ResetInstance(ResetInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:reset" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Allows notebook instances to + // report their latest instance information to the Notebooks + // API server. The server will merge the reported information to + // the instance metadata store. Do not use this method directly. + rpc ReportInstanceInfo(ReportInstanceInfoRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:report" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Check if a notebook instance is upgradable. + rpc IsInstanceUpgradeable(IsInstanceUpgradeableRequest) returns (IsInstanceUpgradeableResponse) { + option (google.api.http) = { + get: "/v1/{notebook_instance=projects/*/locations/*/instances/*}:isUpgradeable" + }; + } + + // Check if a notebook instance is healthy. + rpc GetInstanceHealth(GetInstanceHealthRequest) returns (GetInstanceHealthResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}:getInstanceHealth" + }; + option (google.api.method_signature) = "name"; + } + + // Upgrades a notebook instance to the latest version. + rpc UpgradeInstance(UpgradeInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:upgrade" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Rollbacks a notebook instance to the previous version. + rpc RollbackInstance(RollbackInstanceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:rollback" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Allows notebook instances to + // call this endpoint to upgrade themselves. Do not use this method directly. + rpc UpgradeInstanceInternal(UpgradeInstanceInternalRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/instances/*}:upgradeInternal" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Instance" + metadata_type: "OperationMetadata" + }; + } + + // Lists environments in a project. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Environment. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Environment. + rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment,environment_id"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Environment. + rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists schedules in a given project and location. + rpc ListSchedules(ListSchedulesRequest) returns (ListSchedulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/schedules" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of schedule + rpc GetSchedule(GetScheduleRequest) returns (Schedule) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schedules/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes schedule and all underlying jobs + rpc DeleteSchedule(DeleteScheduleRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/schedules/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new Scheduled Notebook in a given project and location. + rpc CreateSchedule(CreateScheduleRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/schedules" + body: "schedule" + }; + option (google.api.method_signature) = "parent,schedule,schedule_id"; + option (google.longrunning.operation_info) = { + response_type: "Schedule" + metadata_type: "OperationMetadata" + }; + } + + // Triggers execution of an existing schedule. + rpc TriggerSchedule(TriggerScheduleRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/schedules/*}:trigger" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Schedule" + metadata_type: "OperationMetadata" + }; + } + + // Lists executions in a given project and location + rpc ListExecutions(ListExecutionsRequest) returns (ListExecutionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/executions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of executions + rpc GetExecution(GetExecutionRequest) returns (Execution) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/executions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes execution + rpc DeleteExecution(DeleteExecutionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/executions/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new Scheduled Notebook in a given project and location. + rpc CreateExecution(CreateExecutionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/executions" + body: "execution" + }; + option (google.api.method_signature) = "parent,execution,execution_id"; + option (google.longrunning.operation_info) = { + response_type: "Execution" + metadata_type: "OperationMetadata" + }; + } +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Server-defined resource path for the target of the operation. + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_message = 5; + + // Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6; + + // API version used to start the operation. + string api_version = 7; + + // API endpoint name of this operation. + string endpoint = 8; +} + +// Request for listing notebook instances. +message ListInstancesRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Maximum return size of the list call. + int32 page_size = 2; + + // A previous returned page token that can be used to continue listing + // from the last result. + string page_token = 3; +} + +// Response for listing notebook instances. +message ListInstancesResponse { + // A list of returned instances. + repeated Instance instances = 1; + + // Page token that can be used to continue listing from the last result in the + // next list call. + string next_page_token = 2; + + // Locations that could not be reached. For example, + // ['us-west1-a', 'us-central1-b']. + // A ListInstancesResponse will only contain either instances or unreachables, + repeated string unreachable = 3; +} + +// Request for getting a notebook instance. +message GetInstanceRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for creating a notebook instance. +message CreateInstanceRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. User-defined unique ID of this instance. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The instance to be created. + Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for registering a notebook instance. +message RegisterInstanceRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. User defined unique ID of this instance. The `instance_id` must + // be 1 to 63 characters long and contain only lowercase letters, + // numeric characters, and dashes. The first character must be a lowercase + // letter and the last character cannot be a dash. + string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for setting instance accelerator. +message SetInstanceAcceleratorRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Type of this accelerator. + Instance.AcceleratorType type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Count of cores of this accelerator. Note that not all combinations + // of `type` and `core_count` are valid. Check [GPUs on + // Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to + // find a valid combination. TPUs are not supported. + int64 core_count = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for setting instance machine type. +message SetInstanceMachineTypeRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The [Compute Engine machine + // type](https://cloud.google.com/compute/docs/machine-types). + string machine_type = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for updating instance configurations. +message UpdateInstanceConfigRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The instance configurations to be updated. + InstanceConfig config = 2; +} + +// Request for setting instance labels. +message SetInstanceLabelsRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Labels to apply to this instance. + // These can be later modified by the setLabels method + map labels = 2; +} + +// Request for updating the Shielded Instance config for a notebook instance. +// You can only use this method on a stopped instance +message UpdateShieldedInstanceConfigRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // ShieldedInstance configuration to be updated. + Instance.ShieldedInstanceConfig shielded_instance_config = 2; +} + +// Request for deleting a notebook instance. +message DeleteInstanceRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for starting a notebook instance +message StartInstanceRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for stopping a notebook instance +message StopInstanceRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for reseting a notebook instance +message ResetInstanceRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for notebook instances to report information to Notebooks API. +message ReportInstanceInfoRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The VM hardware token for authenticating the VM. + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + string vm_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The metadata reported to Notebooks API. This will be merged to the instance + // metadata store + map metadata = 3; +} + +// Request for checking if a notebook instance is upgradeable. +message IsInstanceUpgradeableRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string notebook_instance = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response for checking if a notebook instance is upgradeable. +message IsInstanceUpgradeableResponse { + // If an instance is upgradeable. + bool upgradeable = 1; + + // The version this instance will be upgraded to if calling the upgrade + // endpoint. This field will only be populated if field upgradeable is true. + string upgrade_version = 2; + + // Additional information about upgrade. + string upgrade_info = 3; + + // The new image self link this instance will be upgraded to if calling the + // upgrade endpoint. This field will only be populated if field upgradeable + // is true. + string upgrade_image = 4; +} + +// Request for checking if a notebook instance is healthy. +message GetInstanceHealthRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Instance" + } + ]; +} + +// Response for checking if a notebook instance is healthy. +message GetInstanceHealthResponse { + // If an instance is healthy or not. + enum HealthState { + // The instance substate is unknown. + HEALTH_STATE_UNSPECIFIED = 0; + + // The instance is known to be in an healthy state + // (for example, critical daemons are running) + // Applies to ACTIVE state. + HEALTHY = 1; + + // The instance is known to be in an unhealthy state + // (for example, critical daemons are not running) + // Applies to ACTIVE state. + UNHEALTHY = 2; + + // The instance has not installed health monitoring agent. + // Applies to ACTIVE state. + AGENT_NOT_INSTALLED = 3; + + // The instance health monitoring agent is not running. + // Applies to ACTIVE state. + AGENT_NOT_RUNNING = 4; + } + + // Output only. Runtime health_state. + HealthState health_state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about instance health. + // Example: + // healthInfo": { + // "docker_proxy_agent_status": "1", + // "docker_status": "1", + // "jupyterlab_api_status": "-1", + // "jupyterlab_status": "-1", + // "updated": "2020-10-18 09:40:03.573409" + // } + map health_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for upgrading a notebook instance +message UpgradeInstanceRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for rollbacking a notebook instance +message RollbackInstanceRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The snapshot for rollback. + // Example: "projects/test-project/global/snapshots/krwlzipynril". + string target_snapshot = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for upgrading a notebook instance from within the VM +message UpgradeInstanceInternalRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The VM hardware token for authenticating the VM. + // https://cloud.google.com/compute/docs/instances/verifying-instance-identity + string vm_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for listing environments. +message ListEnvironmentsRequest { + // Required. Format: `projects/{project_id}/locations/{location}` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Maximum return size of the list call. + int32 page_size = 2; + + // A previous returned page token that can be used to continue listing from + // the last result. + string page_token = 3; +} + +// Response for listing environments. +message ListEnvironmentsResponse { + // A list of returned environments. + repeated Environment environments = 1; + + // A page token that can be used to continue listing from the last result + // in the next list call. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for getting a notebook environment. +message GetEnvironmentRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/environments/{environment_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for creating a notebook environment. +message CreateEnvironmentRequest { + // Required. Format: `projects/{project_id}/locations/{location}` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. User-defined unique ID of this environment. The `environment_id` must + // be 1 to 63 characters long and contain only lowercase letters, + // numeric characters, and dashes. The first character must be a lowercase + // letter and the last character cannot be a dash. + string environment_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The environment to be created. + Environment environment = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for deleting a notebook environment. +message DeleteEnvironmentRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/environments/{environment_id}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for listing scheduled notebook job. +message ListSchedulesRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Schedule" + } + ]; + + // Maximum return size of the list call. + int32 page_size = 2; + + // A previous returned page token that can be used to continue listing + // from the last result. + string page_token = 3; + + // Filter applied to resulting schedules. + string filter = 4; + + // Field to order results by. + string order_by = 5; +} + +// Response for listing scheduled notebook job. +message ListSchedulesResponse { + // A list of returned instances. + repeated Schedule schedules = 1; + + // Page token that can be used to continue listing from the last result in the + // next list call. + string next_page_token = 2; + + // Schedules that could not be reached. For example, + // ['projects/{project_id}/location/{location}/schedules/monthly_digest', + // 'projects/{project_id}/location/{location}/schedules/weekly_sentiment']. + repeated string unreachable = 3; +} + +// Request for getting scheduled notebook. +message GetScheduleRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Schedule" + } + ]; +} + +// Request for deleting an Schedule +message DeleteScheduleRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Schedule" + } + ]; +} + +// Request for created scheduled notebooks +message CreateScheduleRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Schedule" + } + ]; + + // Required. User-defined unique ID of this schedule. + string schedule_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The schedule to be created. + Schedule schedule = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for created scheduled notebooks +message TriggerScheduleRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Schedule" + } + ]; +} + +// Request for listing scheduled notebook executions. +message ListExecutionsRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Execution" + } + ]; + + // Maximum return size of the list call. + int32 page_size = 2; + + // A previous returned page token that can be used to continue listing + // from the last result. + string page_token = 3; + + // Filter applied to resulting executions. Currently only supports filtering + // executions by a specified schedule_id. + // Format: "schedule_id=" + string filter = 4; + + // Sort by field. + string order_by = 5; +} + +// Response for listing scheduled notebook executions +message ListExecutionsResponse { + // A list of returned instances. + repeated Execution executions = 1; + + // Page token that can be used to continue listing from the last result in the + // next list call. + string next_page_token = 2; + + // Executions IDs that could not be reached. For example, + // ['projects/{project_id}/location/{location}/executions/imagenet_test1', + // 'projects/{project_id}/location/{location}/executions/classifier_train1']. + repeated string unreachable = 3; +} + +// Request for getting scheduled notebook execution +message GetExecutionRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/executions/{execution_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Execution" + } + ]; +} + +// Request for deleting a scheduled notebook execution +message DeleteExecutionRequest { + // Required. Format: + // `projects/{project_id}/locations/{location}/executions/{execution_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Execution" + } + ]; +} + +// Request to create notebook execution +message CreateExecutionRequest { + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "notebooks.googleapis.com/Execution" + } + ]; + + // Required. User-defined unique ID of this execution. + string execution_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The execution to be created. + Execution execution = 3 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/versions.txt b/versions.txt index 609c70b6..8697932d 100644 --- a/versions.txt +++ b/versions.txt @@ -3,4 +3,6 @@ google-cloud-notebooks:0.5.0:0.5.1-SNAPSHOT grpc-google-cloud-notebooks-v1beta1:0.5.0:0.5.1-SNAPSHOT +grpc-google-cloud-notebooks-v1:0.5.0:0.5.1-SNAPSHOT proto-google-cloud-notebooks-v1beta1:0.5.0:0.5.1-SNAPSHOT +proto-google-cloud-notebooks-v1:0.5.0:0.5.1-SNAPSHOT From b716228f888501f9b5716d60220cca63064d61da Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 22 Sep 2021 17:52:16 +0200 Subject: [PATCH 04/10] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.0.3 (#260) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.0.2` -> `1.0.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.0.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.0.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.0.3/compatibility-slim/1.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.0.3/confidence-slim/1.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.0.3`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​103-httpswwwgithubcomgoogleapisjava-shared-configcomparev102v103-2021-09-21) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.0.2...v1.0.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-notebooks). --- google-cloud-notebooks-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-notebooks-bom/pom.xml b/google-cloud-notebooks-bom/pom.xml index 637adf33..0d687323 100644 --- a/google-cloud-notebooks-bom/pom.xml +++ b/google-cloud-notebooks-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.0.2 + 1.0.3 Google AI Platform Notebooks BOM diff --git a/pom.xml b/pom.xml index 644afa1e..0b08325f 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.0.2 + 1.0.3 From 50910c1e35f7f8c281d5c640b986b858ee124a3a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 22 Sep 2021 22:32:26 +0200 Subject: [PATCH 05/10] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 (#261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.2.1` -> `2.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.3.0/compatibility-slim/2.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.3.0/confidence-slim/2.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.3.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​230-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare221v230-2021-09-22) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.2.1...v2.3.0) ##### Dependencies - keep protobuf at 3.17.3 (not the latest 3.18.0) ([#​476](https://www.togithub.com/googleapis/java-shared-dependencies/issues/476)) ([e207c81](https://www.github.com/googleapis/java-shared-dependencies/commit/e207c818f220967e3618d7a9d36f2cf26c07892e)) - update gax.version to v2.5.0 ([#​479](https://www.togithub.com/googleapis/java-shared-dependencies/issues/479)) ([e22e62a](https://www.github.com/googleapis/java-shared-dependencies/commit/e22e62a3b248023ae94da2a02ec50006377a5157)) - update google.core.version to v2.1.4 ([#​473](https://www.togithub.com/googleapis/java-shared-dependencies/issues/473)) ([116f278](https://www.github.com/googleapis/java-shared-dependencies/commit/116f2783dfc18f215905ceaff9f85f331f83472b)) - update google.core.version to v2.1.6 ([#​478](https://www.togithub.com/googleapis/java-shared-dependencies/issues/478)) ([9e09728](https://www.github.com/googleapis/java-shared-dependencies/commit/9e0972834764b25e5e194e0e805efc5453120df3)) - update iam.version to v1.1.1 ([#​470](https://www.togithub.com/googleapis/java-shared-dependencies/issues/470)) ([3b6e960](https://www.github.com/googleapis/java-shared-dependencies/commit/3b6e96050af8d976a30165481d764d8226143a39)) - update iam.version to v1.1.2 ([#​472](https://www.togithub.com/googleapis/java-shared-dependencies/issues/472)) ([85329cc](https://www.github.com/googleapis/java-shared-dependencies/commit/85329cc6c13d16fe2eeeb076959ee16a752c1f9e)) ##### [2.2.1](https://www.github.com/googleapis/java-shared-dependencies/compare/2.2.0...v2.2.1) (2021-09-13) ##### Dependencies - update gax.version to v2.4.1 ([#​464](https://www.togithub.com/googleapis/java-shared-dependencies/issues/464)) ([bc7c6d7](https://www.github.com/googleapis/java-shared-dependencies/commit/bc7c6d7ca161ebfa31895c375d65bca29d4c7336)) - update google.core.version to v2.1.3 ([#​465](https://www.togithub.com/googleapis/java-shared-dependencies/issues/465)) ([848f608](https://www.github.com/googleapis/java-shared-dependencies/commit/848f608ae850bd2dd80ec56034eb0c9a18f0415b))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-notebooks). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0b08325f..53358354 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.2.1 + 2.3.0 pom import From b04db17fd330d5a460ab764cd6d4a102b9b57f05 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 24 Sep 2021 15:43:27 +0000 Subject: [PATCH 06/10] chore(java): remove dependencyDashboardLabel config from renovate.json (#1220) (#262) --- .github/.OwlBot.lock.yaml | 2 +- renovate.json | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b6721276..9fb406b3 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:8c50e7bab0ae5ad41ee29420b558542637104500f6256b8fe74282b0cf6144db + digest: sha256:52b5557b7155a80e6f1684c2376d5eef0df6d8d5c785551e1ff8cc000603b62a diff --git a/renovate.json b/renovate.json index fc558e8b..279e572c 100644 --- a/renovate.json +++ b/renovate.json @@ -70,8 +70,5 @@ } ], "semanticCommits": true, - "dependencyDashboard": true, - "dependencyDashboardLabels": [ - "type: process" - ] + "dependencyDashboard": true } From 419770d303bc83795725dd6dce789193195b0b44 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Fri, 24 Sep 2021 10:16:44 -0700 Subject: [PATCH 07/10] chore: relocate owl bot post processor (#259) chore: relocate owl bot post processor --- .github/.OwlBot.lock.yaml | 2 +- .github/.OwlBot.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9fb406b3..afb21e42 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - image: gcr.io/repo-automation-bots/owlbot-java:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest digest: sha256:52b5557b7155a80e6f1684c2376d5eef0df6d8d5c785551e1ff8cc000603b62a diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 0ae9a6ac..a5734254 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -13,7 +13,7 @@ # limitations under the License. docker: - image: "gcr.io/repo-automation-bots/owlbot-java:latest" + image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" deep-remove-regex: - "/grpc-google-.*/src" From 8b3fe395d86c9230e27ad881e1a2c19942ea2512 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 14:58:22 -0400 Subject: [PATCH 08/10] build: add jdk 17 to java units and dependency builds (#1216) (#264) * update dependencies.sh to not pass MaxPermSize when jdk 17 is used. MaxPermSize is an unrecognized flag in jdk 17. Source-Link: https://github.com/googleapis/synthtool/commit/a4be3384ccb92364795d981f2863f6986fcee620 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:13b7387edb404234610d30473ac48210ae7fe42a136335ee2b2f8a07c4c7f6a5 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- .github/blunderbuss.yml | 2 +- .github/workflows/ci.yaml | 21 +++++++++++++-------- .kokoro/dependencies.sh | 23 ++++++++++++++++++++++- README.md | 8 ++++---- 5 files changed, 41 insertions(+), 15 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index afb21e42..5ff6c87c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:52b5557b7155a80e6f1684c2376d5eef0df6d8d5c785551e1ff8cc000603b62a + digest: sha256:13b7387edb404234610d30473ac48210ae7fe42a136335ee2b2f8a07c4c7f6a5 diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index 1a23ea42..2176b054 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -1,5 +1,5 @@ # Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss assign_prs_by: - labels: - samples diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3becb5c0..2425d723 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ on: push: branches: - - master + - main pull_request: name: ci jobs: @@ -9,14 +9,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/build.sh @@ -29,8 +30,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.bat @@ -40,14 +42,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh @@ -58,8 +61,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh @@ -72,8 +76,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9030ba8f..9a5105d7 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -28,7 +28,28 @@ source ${scriptDir}/common.sh java -version echo $JOB_TYPE -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" +function determineMavenOpts() { + local javaVersion=$( + # filter down to the version line, then pull out the version between quotes, + # then trim the version number down to its minimal number (removing any + # update or suffix number). + java -version 2>&1 | grep "version" \ + | sed -E 's/^.*"(.*?)".*$/\1/g' \ + | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' + ) + + case $javaVersion in + "17") + # MaxPermSize is no longer supported as of jdk 17 + echo -n "-Xmx1024m" + ;; + *) + echo -n "-Xmx1024m -XX:MaxPermSize=128m" + ;; + esac +} + +export MAVEN_OPTS=$(determineMavenOpts) # this should run maven enforcer retry_with_backoff 3 10 \ diff --git a/README.md b/README.md index 7631fc8c..a5279d9f 100644 --- a/README.md +++ b/README.md @@ -187,10 +187,10 @@ Java is a registered trademark of Oracle and/or its affiliates. [developer-console]: https://console.developers.google.com/ [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/master/troubleshooting/readme.md#troubleshooting -[contributing]: https://github.com/googleapis/java-notebooks/blob/master/CONTRIBUTING.md -[code-of-conduct]: https://github.com/googleapis/java-notebooks/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct -[license]: https://github.com/googleapis/java-notebooks/blob/master/LICENSE +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-notebooks/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-notebooks/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-notebooks/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=notebooks.googleapis.com [libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM From eff3c3d752effe51962b23a6544c15d4b5acd3b4 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Mon, 27 Sep 2021 15:27:04 -0400 Subject: [PATCH 09/10] chore: change branch master to main in sync-repo-settings.yaml (#266) --- .github/sync-repo-settings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 32e0ea5a..6f09d695 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -2,7 +2,7 @@ rebaseMergeAllowed: false squashMergeAllowed: true mergeCommitAllowed: false branchProtectionRules: - - pattern: master + - pattern: main isAdminEnforced: true requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true From 2d8f22ac4fd9a8d9dc8eef556827fde834149cf4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 20:42:50 +0000 Subject: [PATCH 10/10] chore: release 0.6.0 (#265) :robot: I have created a release \*beep\* \*boop\* --- ## [0.6.0](https://www.github.com/googleapis/java-notebooks/compare/v0.5.0...v0.6.0) (2021-09-27) ### Features * added support for Notebooks v1 ([#242](https://www.github.com/googleapis/java-notebooks/issues/242)) ([28ce44f](https://www.github.com/googleapis/java-notebooks/commit/28ce44f5c390c4de2d366f283a59927f220c09c7)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#261](https://www.github.com/googleapis/java-notebooks/issues/261)) ([50910c1](https://www.github.com/googleapis/java-notebooks/commit/50910c1e35f7f8c281d5c640b986b858ee124a3a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 12 ++++++++++++ google-cloud-notebooks-bom/pom.xml | 12 ++++++------ google-cloud-notebooks/pom.xml | 4 ++-- grpc-google-cloud-notebooks-v1/pom.xml | 4 ++-- grpc-google-cloud-notebooks-v1beta1/pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-notebooks-v1/pom.xml | 4 ++-- proto-google-cloud-notebooks-v1beta1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 10 +++++----- 10 files changed, 40 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 127eda74..1956275b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.6.0](https://www.github.com/googleapis/java-notebooks/compare/v0.5.0...v0.6.0) (2021-09-27) + + +### Features + +* added support for Notebooks v1 ([#242](https://www.github.com/googleapis/java-notebooks/issues/242)) ([28ce44f](https://www.github.com/googleapis/java-notebooks/commit/28ce44f5c390c4de2d366f283a59927f220c09c7)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#261](https://www.github.com/googleapis/java-notebooks/issues/261)) ([50910c1](https://www.github.com/googleapis/java-notebooks/commit/50910c1e35f7f8c281d5c640b986b858ee124a3a)) + ## [0.5.0](https://www.github.com/googleapis/java-notebooks/compare/v0.4.1...v0.5.0) (2021-09-14) diff --git a/google-cloud-notebooks-bom/pom.xml b/google-cloud-notebooks-bom/pom.xml index 0d687323..16fa1b5a 100644 --- a/google-cloud-notebooks-bom/pom.xml +++ b/google-cloud-notebooks-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-notebooks-bom - 0.5.1-SNAPSHOT + 0.6.0 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-notebooks - 0.5.1-SNAPSHOT + 0.6.0 com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.5.1-SNAPSHOT + 0.6.0 com.google.api.grpc grpc-google-cloud-notebooks-v1 - 0.5.1-SNAPSHOT + 0.6.0 com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.5.1-SNAPSHOT + 0.6.0 com.google.api.grpc proto-google-cloud-notebooks-v1 - 0.5.1-SNAPSHOT + 0.6.0 diff --git a/google-cloud-notebooks/pom.xml b/google-cloud-notebooks/pom.xml index 25d7ba9b..23d73f47 100644 --- a/google-cloud-notebooks/pom.xml +++ b/google-cloud-notebooks/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-notebooks - 0.5.1-SNAPSHOT + 0.6.0 jar Google AI Platform Notebooks https://github.com/googleapis/java-notebooks @@ -11,7 +11,7 @@ com.google.cloud google-cloud-notebooks-parent - 0.5.1-SNAPSHOT + 0.6.0 google-cloud-notebooks diff --git a/grpc-google-cloud-notebooks-v1/pom.xml b/grpc-google-cloud-notebooks-v1/pom.xml index c22a58f6..a29264b5 100644 --- a/grpc-google-cloud-notebooks-v1/pom.xml +++ b/grpc-google-cloud-notebooks-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-notebooks-v1 - 0.5.1-SNAPSHOT + 0.6.0 grpc-google-cloud-notebooks-v1 GRPC library for google-cloud-notebooks com.google.cloud google-cloud-notebooks-parent - 0.5.1-SNAPSHOT + 0.6.0 diff --git a/grpc-google-cloud-notebooks-v1beta1/pom.xml b/grpc-google-cloud-notebooks-v1beta1/pom.xml index 280622cf..27b42cba 100644 --- a/grpc-google-cloud-notebooks-v1beta1/pom.xml +++ b/grpc-google-cloud-notebooks-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.5.1-SNAPSHOT + 0.6.0 grpc-google-cloud-notebooks-v1beta1 GRPC library for grpc-google-cloud-notebooks-v1beta1 com.google.cloud google-cloud-notebooks-parent - 0.5.1-SNAPSHOT + 0.6.0 diff --git a/pom.xml b/pom.xml index 53358354..742b7fd9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-notebooks-parent pom - 0.5.1-SNAPSHOT + 0.6.0 Google AI Platform Notebooks Parent https://github.com/googleapis/java-notebooks @@ -61,27 +61,27 @@ com.google.cloud google-cloud-notebooks - 0.5.1-SNAPSHOT + 0.6.0 com.google.api.grpc proto-google-cloud-notebooks-v1 - 0.5.1-SNAPSHOT + 0.6.0 com.google.api.grpc grpc-google-cloud-notebooks-v1 - 0.5.1-SNAPSHOT + 0.6.0 com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.5.1-SNAPSHOT + 0.6.0 com.google.api.grpc grpc-google-cloud-notebooks-v1beta1 - 0.5.1-SNAPSHOT + 0.6.0 diff --git a/proto-google-cloud-notebooks-v1/pom.xml b/proto-google-cloud-notebooks-v1/pom.xml index ba2ed47e..5095e66f 100644 --- a/proto-google-cloud-notebooks-v1/pom.xml +++ b/proto-google-cloud-notebooks-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-notebooks-v1 - 0.5.1-SNAPSHOT + 0.6.0 proto-google-cloud-notebooks-v1 Proto library for google-cloud-notebooks com.google.cloud google-cloud-notebooks-parent - 0.5.1-SNAPSHOT + 0.6.0 diff --git a/proto-google-cloud-notebooks-v1beta1/pom.xml b/proto-google-cloud-notebooks-v1beta1/pom.xml index c752193f..e91b129c 100644 --- a/proto-google-cloud-notebooks-v1beta1/pom.xml +++ b/proto-google-cloud-notebooks-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-notebooks-v1beta1 - 0.5.1-SNAPSHOT + 0.6.0 proto-google-cloud-notebooks-v1beta1 PROTO library for proto-google-cloud-notebooks-v1beta1 com.google.cloud google-cloud-notebooks-parent - 0.5.1-SNAPSHOT + 0.6.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 17afd91d..77cb28a3 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-notebooks - 0.5.1-SNAPSHOT + 0.6.0 diff --git a/versions.txt b/versions.txt index 8697932d..1fd0c523 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-notebooks:0.5.0:0.5.1-SNAPSHOT -grpc-google-cloud-notebooks-v1beta1:0.5.0:0.5.1-SNAPSHOT -grpc-google-cloud-notebooks-v1:0.5.0:0.5.1-SNAPSHOT -proto-google-cloud-notebooks-v1beta1:0.5.0:0.5.1-SNAPSHOT -proto-google-cloud-notebooks-v1:0.5.0:0.5.1-SNAPSHOT +google-cloud-notebooks:0.6.0:0.6.0 +grpc-google-cloud-notebooks-v1beta1:0.6.0:0.6.0 +grpc-google-cloud-notebooks-v1:0.6.0:0.6.0 +proto-google-cloud-notebooks-v1beta1:0.6.0:0.6.0 +proto-google-cloud-notebooks-v1:0.6.0:0.6.0